summaryrefslogtreecommitdiffstats
path: root/services/backup
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2015-03-11 14:16:15 -0700
committerChristopher Tate <ctate@google.com>2015-03-11 16:35:12 -0700
commitb538d3c06f37979a617c7c23644c23cc424f3f6a (patch)
tree71845945670d55c35813507270d5b732c3990d40 /services/backup
parenteb803aef3b0f55785624e6a51deae867c1a95e88 (diff)
downloadframeworks_base-b538d3c06f37979a617c7c23644c23cc424f3f6a.zip
frameworks_base-b538d3c06f37979a617c7c23644c23cc424f3f6a.tar.gz
frameworks_base-b538d3c06f37979a617c7c23644c23cc424f3f6a.tar.bz2
Don't run full backups on stopped packages
We already decline to run key/value backup passes for (participating) apps that are in the 'stopped' state. Now we also properly avoid full-data backup passes on such apps. Bug 19684052 Change-Id: Ieafc07b5531a91a243d57238c53db41ad3459140
Diffstat (limited to 'services/backup')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 26510328..d35609e 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -3862,6 +3862,14 @@ public class BackupManagerService {
Slog.d(TAG, "Ignoring non-agent system package " + pkg);
}
continue;
+ } else if ((info.applicationInfo.flags & ApplicationInfo.FLAG_STOPPED) != 0) {
+ // Cull any packages in the 'stopped' state: they've either just been
+ // installed or have explicitly been force-stopped by the user. In both
+ // cases we do not want to launch them for backup.
+ if (MORE_DEBUG) {
+ Slog.d(TAG, "Ignoring stopped package " + pkg);
+ }
+ continue;
}
mPackages.add(info);
} catch (NameNotFoundException e) {