diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-08-06 19:05:57 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2014-08-06 19:05:57 -0700 |
commit | 318f91b784e8f71b25e6de2f22d8e24412477ae2 (patch) | |
tree | f11fc2c49364dffee844731314ae109a98a4c595 /services | |
parent | dbed893ba88b76f88ea51d8666653458955cdc67 (diff) | |
download | frameworks_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')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 4 |
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(); |