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
This commit is contained in:
6
src/com/android/settings/applications/AppStateAppOpsBridge.java
Normal file → Executable file
6
src/com/android/settings/applications/AppStateAppOpsBridge.java
Normal file → Executable file
@@ -187,7 +187,11 @@ public abstract class AppStateAppOpsBridge extends AppStateBaseBridge {
|
|||||||
* PermissionState, which describes a particular package.
|
* PermissionState, which describes a particular package.
|
||||||
*/
|
*/
|
||||||
private void loadPermissionsStates(SparseArray<ArrayMap<String, PermissionState>> entries) {
|
private void loadPermissionsStates(SparseArray<ArrayMap<String, PermissionState>> 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 {
|
try {
|
||||||
for (final UserHandle profile : mProfiles) {
|
for (final UserHandle profile : mProfiles) {
|
||||||
final int profileId = profile.getIdentifier();
|
final int profileId = profile.getIdentifier();
|
||||||
|
Reference in New Issue
Block a user