summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-08-06 19:05:57 -0700
committerSvetoslav <svetoslavganov@google.com>2014-08-06 19:05:57 -0700
commit318f91b784e8f71b25e6de2f22d8e24412477ae2 (patch)
treef11fc2c49364dffee844731314ae109a98a4c595 /services/devicepolicy
parentdbed893ba88b76f88ea51d8666653458955cdc67 (diff)
downloadframeworks_base-318f91b784e8f71b25e6de2f22d8e24412477ae2.zip
frameworks_base-318f91b784e8f71b25e6de2f22d8e24412477ae2.tar.gz
frameworks_base-318f91b784e8f71b25e6de2f22d8e24412477ae2.tar.bz2
Fix NPE in device policy manager service.
Change-Id: I796359f903077eb0ef825ed926557f1a13b2e4c4
Diffstat (limited to 'services/devicepolicy')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 899a821..7a7eaf1 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -4584,6 +4584,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
DevicePolicyData policy = getUserData(profileId);
ActiveAdmin admin = policy.mAdminMap.get(ownerComponent);
+ if (admin == null) {
+ return Collections.emptyList();
+ }
+
if (admin.crossProfileWidgetProviders == null
|| admin.crossProfileWidgetProviders.isEmpty()) {
return Collections.emptyList();