summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRubin Xu <rubinxu@google.com>2015-02-09 19:33:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-09 19:33:48 +0000
commitcd6bf0248616d0313e7ccc527f64b8015a4b8f02 (patch)
treec5d7044a0ce3c7b0b308f3a21b3f23229d67bc18 /services
parentd0579b177c3a31c5942a677d0ee95d555220ea23 (diff)
parent3d521c0a0165dfef53e3c9d3d562bc0ec45405a8 (diff)
downloadframeworks_base-cd6bf0248616d0313e7ccc527f64b8015a4b8f02.zip
frameworks_base-cd6bf0248616d0313e7ccc527f64b8015a4b8f02.tar.gz
frameworks_base-cd6bf0248616d0313e7ccc527f64b8015a4b8f02.tar.bz2
am 3d521c0a: Merge "Perform post installation operations directly if backup manager is disabled" into lmp-mr1-dev
* commit '3d521c0a0165dfef53e3c9d3d562bc0ec45405a8': Perform post installation operations directly if backup manager is disabled
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) {