summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudheer Shanka <sudheersai@google.com>2015-03-04 10:50:59 +0000
committerSudheer Shanka <sudheersai@google.com>2015-04-13 15:26:59 +0100
commitd957f80ced65b4151c4fe1fcd9815cc2dcc00c99 (patch)
tree6261ac9e063a0949ebe4fbf0f3f094772baff671
parenta7b212d9f10bb4f2b7fb2f926587f6e904a85579 (diff)
downloadframeworks_base-d957f80ced65b4151c4fe1fcd9815cc2dcc00c99.zip
frameworks_base-d957f80ced65b4151c4fe1fcd9815cc2dcc00c99.tar.gz
frameworks_base-d957f80ced65b4151c4fe1fcd9815cc2dcc00c99.tar.bz2
Clear defaults of an application installed in multiple users.
Bug: 19120156 Change-Id: I6c85b62d121df84e5f86dd359e8555376fea9701
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 668dd1a..0b925b0 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -11224,7 +11224,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if (DEBUG_REMOVE) Slog.d(TAG, "Still installed by other users");
removeUser = user.getIdentifier();
appId = ps.appId;
- mSettings.writePackageRestrictionsLPr(removeUser);
+ scheduleWritePackageRestrictionsLocked(removeUser);
} else {
// We need to set it back to 'installed' so the uninstall
// broadcasts will be sent correctly.
@@ -11239,7 +11239,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if (DEBUG_REMOVE) Slog.d(TAG, "Deleting system app");
removeUser = user.getIdentifier();
appId = ps.appId;
- mSettings.writePackageRestrictionsLPr(removeUser);
+ scheduleWritePackageRestrictionsLocked(removeUser);
}
}
}
@@ -11256,6 +11256,11 @@ public class PackageManagerService extends IPackageManager.Stub {
mInstaller.clearUserData(packageName, removeUser);
removeKeystoreDataIfNeeded(removeUser, appId);
schedulePackageCleaning(packageName, removeUser, false);
+ synchronized (mPackages) {
+ if (clearPackagePreferredActivitiesLPw(packageName, removeUser)) {
+ scheduleWritePackageRestrictionsLocked(removeUser);
+ }
+ }
return true;
}