commit | 4e68b6572306fb4a44e78b3cf2b48fb943e69cbe | [log] [tgz] |
---|---|---|
author | Adili Muguro <adili.muguro@sonymobile.com> | Fri Jul 25 16:42:39 2014 +0200 |
committer | Sean Wan <swan@google.com> | Wed Jul 30 14:10:16 2014 -0700 |
tree | a4dd1e194fe93da6bafaf93556beff46550d4bf5 | |
parent | 0bc94550b46a9eef515e395fb7975781ed5b95e6 [diff] [blame] |
Fixed a NullPointerException in AccountManagerService. Change-Id: If65d7870c609ae6c7467e26978ffd0ce0d52f518
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 9a86136..2a66baf 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -3144,6 +3144,9 @@ DevicePolicyManager dpm = (DevicePolicyManager) mContext .getSystemService(Context.DEVICE_POLICY_SERVICE); String[] typesArray = dpm.getAccountTypesWithManagementDisabledAsUser(userId); + if (typesArray == null) { + return true; + } for (String forbiddenType : typesArray) { if (forbiddenType.equals(accountType)) { return false;