Skip to content

Instantly share code, notes, and snippets.

View mister11's full-sized avatar

Sven Vidak mister11

View GitHub Profile
int main(int argc, char** argv) {
Point * p = new Point(1, 42);
cout << *p << endl;
return 0;
}
class ExportedActivityDetectorTest {
private val validXmlFile = xml(
"AndroidManifest.xml",
"""
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.infinum.lint">
<application
android:allowBackup="true"
class ExportedActivityDetector : Detector(), Detector.XmlScanner {
override fun getApplicableAttributes() = listOf("exported")
override fun visitAttribute(context: XmlContext, attribute: Attr) {
if (attribute.isParentActivity() && attribute.value == "true") {
val location = context.getLocation(attribute)
context.report(
issue = ISSUE_EXPORTED_ACTIVITY,
scope = attribute,