diff options
author | Rubin Xu <rubinxu@google.com> | 2015-02-09 11:29:37 +0000 |
---|---|---|
committer | Rubin Xu <rubinxu@google.com> | 2015-02-09 15:36:30 +0000 |
commit | 99abeed2bb74a15d2336ad3b75dfeb30e64d135d (patch) | |
tree | b1b95eebb1b478234afee38205e129936d9c504d /services | |
parent | 07c745b525d39309a9ea93605fb5f85c295502f1 (diff) | |
download | frameworks_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.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) { |