@@ -113,7 +113,7 @@ class AndroidProviderXmlElement extends AndroidComponentXmlElement {
113113 * `android:permission` attribute or its `android:readPermission` and `android:writePermission`
114114 * attributes.
115115 */
116- predicate requiresPermissions ( ) {
116+ override predicate requiresPermissions ( ) {
117117 this .getAnAttribute ( ) .( AndroidPermissionXmlAttribute ) .isFull ( )
118118 or
119119 this .getAnAttribute ( ) .( AndroidPermissionXmlAttribute ) .isWrite ( ) and
@@ -236,16 +236,10 @@ class AndroidComponentXmlElement extends XmlElement {
236236 */
237237 predicate hasExportedAttribute ( ) { this .hasAttribute ( "exported" ) }
238238
239- // /** Holds if this component element has an attribute with the name `permission`. */
240- // predicate hasPermissionAttribute() { exists(this.getAttribute("permission")) }
241- predicate isImplicitlyExported ( ) {
242- not this .hasExportedAttribute ( ) and
243- this .hasAnIntentFilterElement ( ) and // Note: did not use getAnIntentFilterElement since don't need a return value
244- not this .hasAttribute ( "permission" ) and // not seeing how isFull() is any better than this..., this seems to more directly check what I want...
245- not this .getParent ( ) .( AndroidApplicationXmlElement ) .hasAttribute ( "permission" ) and
246- not this .getAnIntentFilterElement ( ) .hasLauncherCategoryElement ( ) and
247- not this .getFile ( ) .( AndroidManifestXmlFile ) .isInBuildDirectory ( )
248- }
239+ /**
240+ * Holds if this component element has explicitly set a value for its `android:permission` attribute.
241+ */
242+ predicate requiresPermissions ( ) { this .getAnAttribute ( ) .( AndroidPermissionXmlAttribute ) .isFull ( ) }
249243}
250244
251245/**
@@ -268,10 +262,10 @@ class AndroidIntentFilterXmlElement extends XmlElement {
268262
269263 /**
270264 * Holds if this `<intent-filter>` element has a `<category>` child element
271- * named " android.intent.category.LAUNCHER" .
265+ * named ` android.intent.category.LAUNCHER` .
272266 */
273267 predicate hasLauncherCategoryElement ( ) {
274- this .getACategoryElement ( ) .getAttributeValue ( "name" ) = "android.intent.category.LAUNCHER"
268+ this .getACategoryElement ( ) .getCategoryName ( ) = "android.intent.category.LAUNCHER"
275269 }
276270}
277271
0 commit comments