summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRubin Xu <rubinxu@google.com>2015-02-09 11:29:37 +0000
committerRubin Xu <rubinxu@google.com>2015-02-09 15:36:30 +0000
commit99abeed2bb74a15d2336ad3b75dfeb30e64d135d (patch)
treeb1b95eebb1b478234afee38205e129936d9c504d /services
parent07c745b525d39309a9ea93605fb5f85c295502f1 (diff)
downloadframeworks_base-99abeed2bb74a15d2336ad3b75dfeb30e64d135d.zip
frameworks_base-99abeed2bb74a15d2336ad3b75dfeb30e64d135d.tar.gz
frameworks_base-99abeed2bb74a15d2336ad3b75dfeb30e64d135d.tar.bz2
Perform post installation operations directly if backup manager is disabled
bug: 19312753 Change-Id: I4acdd1e3af6a6be0c51affc42de167993c736b2f
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 5b17eaa..cc0a30a 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -8636,7 +8636,11 @@ public class PackageManagerService extends IPackageManager.Stub {
if (DEBUG_INSTALL) Log.v(TAG, "token " + token
+ " to BM for possible restore");
try {
- bm.restoreAtInstall(res.pkg.applicationInfo.packageName, token);
+ if (bm.isBackupServiceActive(UserHandle.USER_OWNER)) {
+ bm.restoreAtInstall(res.pkg.applicationInfo.packageName, token);
+ } else {
+ doRestore = false;
+ }
} catch (RemoteException e) {
// can't happen; the backup manager is local
} catch (Exception e) {