OSDN Git Service

[RefactoredBMS] Do not perform backup/restore of instant apps
authorMichal Karpinski <mkarpinski@google.com>
Tue, 19 Sep 2017 09:34:07 +0000 (10:34 +0100)
committerMichal Karpinski <mkarpinski@google.com>
Tue, 19 Sep 2017 09:34:12 +0000 (10:34 +0100)
This CL replicates ag/2256021 in RefactoredBMS.

Test: runtest -p com.android.server.backup frameworks-services
Bug: 37973765
Change-Id: Icf615b97025aa09681f9d25b1de3f94e60a45ee4

services/backup/java/com/android/server/backup/utils/AppBackupUtils.java

index 86877ba..d7cac77 100644 (file)
@@ -61,6 +61,11 @@ public class AppBackupUtils {
             return false;
         }
 
+        // 4. it is an "instant" app
+        if (app.isInstantApp()) {
+            return false;
+        }
+
         // Everything else checks out; the only remaining roadblock would be if the
         // package were disabled
         return !appIsDisabled(app, pm);