summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/DevicePolicyManagerService.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-11-11 11:44:37 -0800
committerAmith Yamasani <yamasani@google.com>2013-11-11 11:44:37 -0800
commitf65c0a99583cfaa8119836b8691d3a79db21dbbf (patch)
treed207f658297e11058ba699ba6d1cfd2c51c7fd3b /services/java/com/android/server/DevicePolicyManagerService.java
parente8c51298a43f607fea7418ced7cc783e6065fe87 (diff)
downloadframeworks_base-f65c0a99583cfaa8119836b8691d3a79db21dbbf.zip
frameworks_base-f65c0a99583cfaa8119836b8691d3a79db21dbbf.tar.gz
frameworks_base-f65c0a99583cfaa8119836b8691d3a79db21dbbf.tar.bz2
Fix inconsistency in reporting device admin active state.
When a device admin goes away due to a package change, only one of two lists was being updated, causing an inconsistency in the query for active admins depending on which API was being called. This makes sure that mAdminMap stays in sync with mAdminList so that isActiveAdmin() and getActiveAdmins() returns the same results. Bug: 11588094 Change-Id: I232608738249492d9fca7e4d7aa7566d96fccf46
Diffstat (limited to 'services/java/com/android/server/DevicePolicyManagerService.java')
-rw-r--r--services/java/com/android/server/DevicePolicyManagerService.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 8cc80f7..1c3b9bb 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -522,6 +522,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|| pm.getReceiverInfo(aa.info.getComponent(), 0, userHandle) == null) {
removed = true;
policy.mAdminList.remove(i);
+ policy.mAdminMap.remove(aa.info.getComponent());
}
} catch (RemoteException re) {
// Shouldn't happen