diff options
author | Michael W <baddaemon87@gmail.com> | 2016-09-18 11:17:28 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-09-18 10:15:27 -0700 |
commit | 4b03da7757caf8a0dff2864ab6a2fac3afd91e39 (patch) | |
tree | a8db9da0743246451e24d4fc4c6e5a212a21fcbd /src | |
parent | e94c0727f5fa5cf95f832b9d2a457c01c1fe1b0c (diff) | |
download | packages_apps_Settings-4b03da7757caf8a0dff2864ab6a2fac3afd91e39.zip packages_apps_Settings-4b03da7757caf8a0dff2864ab6a2fac3afd91e39.tar.gz packages_apps_Settings-4b03da7757caf8a0dff2864ab6a2fac3afd91e39.tar.bz2 |
Settings: Fix possible NPE
Checking applicationInfo on a null object causes a NPE
Check for null first and make the menu entry invisible in that case
Change-Id: I9c6c1156e8d809abf9f13a80eaa908317cba8bdc
Reference: BugDumps 20160909-15 L#39
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/settings/applications/InstalledAppDetails.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 43c3489..ef3788c 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -413,9 +413,8 @@ public class InstalledAppDetails extends AppInfoBase mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; menu.findItem(UNINSTALL_UPDATES).setVisible(mUpdatedSysApp && !mAppControlRestricted); - if (mPackageInfo.applicationInfo != null) { - menu.findItem(OPEN_PROTECTED_APPS).setVisible(mPackageInfo.applicationInfo.protect); - } + menu.findItem(OPEN_PROTECTED_APPS).setVisible(mPackageInfo != null && + mPackageInfo.applicationInfo != null && mPackageInfo.applicationInfo.protect); } @Override |