diff options
author | Rubin Xu <rubinxu@google.com> | 2015-02-09 19:25:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-09 19:25:20 +0000 |
commit | 3d521c0a0165dfef53e3c9d3d562bc0ec45405a8 (patch) | |
tree | 7c3abb0a6f385f6723c56f2727cf98881670fefc | |
parent | 991db77a44f3352a8cf6351f79cad67bf955e4e4 (diff) | |
parent | 99abeed2bb74a15d2336ad3b75dfeb30e64d135d (diff) | |
download | frameworks_base-3d521c0a0165dfef53e3c9d3d562bc0ec45405a8.zip frameworks_base-3d521c0a0165dfef53e3c9d3d562bc0ec45405a8.tar.gz frameworks_base-3d521c0a0165dfef53e3c9d3d562bc0ec45405a8.tar.bz2 |
Merge "Perform post installation operations directly if backup manager is disabled" into lmp-mr1-dev
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 6 |
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) { |