Skip to content

Commit de36372

Browse files
committed
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.
1 parent a036639 commit de36372

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

java/ql/lib/semmle/code/xml/AndroidManifest.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ class AndroidApplicationXmlElement extends XmlElement {
7979
* https://developer.android.com/guide/topics/data/autobackup
8080
*/
8181
predicate allowsBackup() {
82-
// The default value for the attribute `android:allowBackup` is `true`.
83-
// Therefore we also check if it is not present.
8482
not exists(AndroidXmlAttribute attr |
8583
this.getAnAttribute() = attr and
8684
attr.getName() = "allowBackup" and

0 commit comments

Comments
 (0)