From 2b7e3f228d00563e9fea49fee49fb0dc503caee9 Mon Sep 17 00:00:00 2001 From: Jian Zhou Date: Tue, 27 Sep 2016 16:29:16 +0800 Subject: [PATCH] Settings: Fix SparseArray null pointer issue in monkey issues SparseArray null pointer causes monkey test exception, add a protect for this. Change-Id: Iade3148a846962875f5f38c5d2bf5631d0d9ac42 Bug: 62685823 --- .../android/settings/applications/AppStateAppOpsBridge.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/com/android/settings/applications/AppStateAppOpsBridge.java diff --git a/src/com/android/settings/applications/AppStateAppOpsBridge.java b/src/com/android/settings/applications/AppStateAppOpsBridge.java old mode 100644 new mode 100755 index cfbb2fcfc8f..c74699f4b94 --- a/src/com/android/settings/applications/AppStateAppOpsBridge.java +++ b/src/com/android/settings/applications/AppStateAppOpsBridge.java @@ -187,7 +187,11 @@ public abstract class AppStateAppOpsBridge extends AppStateBaseBridge { * PermissionState, which describes a particular package. */ private void loadPermissionsStates(SparseArray> entries) { - // Load the packages that have been granted the permission specified in mPermission. + // Load the packages that have been granted the permission specified in mPermission. + if (entries == null) { + return; + } + try { for (final UserHandle profile : mProfiles) { final int profileId = profile.getIdentifier();