am 3fc7bfd9: Merge "Fix bug #21025020 Stability: JCs in Settings: Caused by: java.lang.NullPointerException" into mnc-dev

* commit '3fc7bfd9d9a4aa5b89b714ef18385366fde2b946':
  Fix bug #21025020 Stability: JCs in Settings: Caused by: java.lang.NullPointerException
This commit is contained in:
Fabrice Di Meglio
2015-05-14 21:51:07 +00:00
committed by Android Git Automerger

View File

@@ -284,12 +284,15 @@ public class InstalledAppDetails extends AppInfoBase
mBatteryPreference.setOnPreferenceClickListener(this); mBatteryPreference.setOnPreferenceClickListener(this);
mLaunchPreference = findPreference(KEY_LAUNCH); mLaunchPreference = findPreference(KEY_LAUNCH);
if ((mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0) { if (mAppEntry.info != null) {
mLaunchPreference.setEnabled(false); if ((mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0 ||
} else if (!mAppEntry.info.enabled) { !mAppEntry.info.enabled) {
mLaunchPreference.setEnabled(false); mLaunchPreference.setEnabled(false);
} else {
mLaunchPreference.setOnPreferenceClickListener(this);
}
} else { } else {
mLaunchPreference.setOnPreferenceClickListener(this); mLaunchPreference.setEnabled(false);
} }
} }