summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-10-15 00:07:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-15 00:07:27 +0000
commit1a55dcceaa37d224312ab4b3e4ee31034fa3636d (patch)
tree88b092d3f7ac12d28a694f03064a3f394b913e1b /services
parent27f80673a0bc8997a8f878d2a062defd0f43379e (diff)
parentdc876b56217c588596661ca514b4bdb8a6cfe843 (diff)
downloadframeworks_base-1a55dcceaa37d224312ab4b3e4ee31034fa3636d.zip
frameworks_base-1a55dcceaa37d224312ab4b3e4ee31034fa3636d.tar.gz
frameworks_base-1a55dcceaa37d224312ab4b3e4ee31034fa3636d.tar.bz2
am dc876b56: Merge "Fix a NPE in device policy manager service." into lmp-dev
* commit 'dc876b56217c588596661ca514b4bdb8a6cfe843': Fix a NPE in device policy manager service.
Diffstat (limited to 'services')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java3
1 files changed, 3 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 f8f20dc..a5a622c 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -5320,6 +5320,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public List<String> getCrossProfileWidgetProviders(int profileId) {
synchronized (DevicePolicyManagerService.this) {
+ if (mDeviceOwner == null) {
+ return Collections.emptyList();
+ }
ComponentName ownerComponent = mDeviceOwner.getProfileOwnerComponent(profileId);
if (ownerComponent == null) {
return Collections.emptyList();