diff options
author | Benjamin Franz <bfranz@google.com> | 2015-01-26 11:04:41 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-26 11:04:41 +0000 |
commit | 8e1b6d949be6d71cfb137f22d0b36bcf511568e2 (patch) | |
tree | 2929cfb970aa13d28d08b94f7456c5512e89e774 /services/devicepolicy | |
parent | 43daa008f3e5287b6bec27289c96440e71b5fbf7 (diff) | |
parent | ad66480838189332b82cd2861bca4357aa2b93da (diff) | |
download | frameworks_base-8e1b6d949be6d71cfb137f22d0b36bcf511568e2.zip frameworks_base-8e1b6d949be6d71cfb137f22d0b36bcf511568e2.tar.gz frameworks_base-8e1b6d949be6d71cfb137f22d0b36bcf511568e2.tar.bz2 |
am ad664808: am 6d16b861: Merge "Avoid NullPointerException if createUser returns null" into lmp-mr1-dev automerge: 2805669
* commit 'ad66480838189332b82cd2861bca4357aa2b93da':
Avoid NullPointerException if createUser returns null
Diffstat (limited to 'services/devicepolicy')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 3 |
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 8e66325..e4d0b77 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -4723,6 +4723,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { public UserHandle createAndInitializeUser(ComponentName who, String name, String ownerName, ComponentName profileOwnerComponent, Bundle adminExtras) { UserHandle user = createUser(who, name); + if (user == null) { + return null; + } long id = Binder.clearCallingIdentity(); try { String profileOwnerPkg = profileOwnerComponent.getPackageName(); |