@@ -113,7 +113,7 @@ class AndroidProviderXmlElement extends AndroidComponentXmlElement {
113
113
* `android:permission` attribute or its `android:readPermission` and `android:writePermission`
114
114
* attributes.
115
115
*/
116
- predicate requiresPermissions ( ) {
116
+ override predicate requiresPermissions ( ) {
117
117
this .getAnAttribute ( ) .( AndroidPermissionXmlAttribute ) .isFull ( )
118
118
or
119
119
this .getAnAttribute ( ) .( AndroidPermissionXmlAttribute ) .isWrite ( ) and
@@ -236,16 +236,10 @@ class AndroidComponentXmlElement extends XmlElement {
236
236
*/
237
237
predicate hasExportedAttribute ( ) { this .hasAttribute ( "exported" ) }
238
238
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 ( ) }
249
243
}
250
244
251
245
/**
@@ -268,10 +262,10 @@ class AndroidIntentFilterXmlElement extends XmlElement {
268
262
269
263
/**
270
264
* Holds if this `<intent-filter>` element has a `<category>` child element
271
- * named " android.intent.category.LAUNCHER" .
265
+ * named ` android.intent.category.LAUNCHER` .
272
266
*/
273
267
predicate hasLauncherCategoryElement ( ) {
274
- this .getACategoryElement ( ) .getAttributeValue ( "name" ) = "android.intent.category.LAUNCHER"
268
+ this .getACategoryElement ( ) .getCategoryName ( ) = "android.intent.category.LAUNCHER"
275
269
}
276
270
}
277
271
0 commit comments