Refactor android:backupAllowed query

Refactor the query to check for the nonexistence of the
`android:allowBackup` attribute being set to false.

The default value is true, so we need to check for it being explicitly
marked false.
This commit is contained in:
Ed Minnix
2022-08-22 12:02:27 -04:00
parent a036639ecd
commit de36372d1c

View File

@@ -79,8 +79,6 @@ class AndroidApplicationXmlElement extends XmlElement {
* https://developer.android.com/guide/topics/data/autobackup
*/
predicate allowsBackup() {
// The default value for the attribute `android:allowBackup` is `true`.
// Therefore we also check if it is not present.
not exists(AndroidXmlAttribute attr |
this.getAnAttribute() = attr and
attr.getName() = "allowBackup" and