excluded action main from query results, added unit test

This commit is contained in:
Jami Cogswell
2022-08-12 09:22:39 -04:00
parent c5526ffef8
commit eee12264c3
2 changed files with 10 additions and 3 deletions

View File

@@ -9,10 +9,10 @@ class ImplicitlyExportedAndroidComponent extends AndroidComponentXmlElement {
this.hasAnIntentFilterElement() and
not this.getAnIntentFilterElement().getACategoryElement().getCategoryName() =
"android.intent.category.LAUNCHER" and
not this.getAnIntentFilterElement().getAnActionElement().getActionName() =
"android.intent.action.MAIN" and
not this.requiresPermissions() and
not this.getParent().(AndroidApplicationXmlElement).requiresPermissions() and
not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory() //and
//not this.getAnIntentFilterElement().getAnActionElement().getActionName() =
// "android.intent.action.MAIN"
not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
}
}

View File

@@ -102,6 +102,13 @@
</intent-filter>
</activity>
<!-- Safe: has action 'android.intent.category.MAIN' --> <activity
android:name=".Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>