diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 99d0172e2a7..0cc046b0aed 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -283,12 +283,15 @@ public class InstalledAppDetails extends AppInfoBase mBatteryPreference.setOnPreferenceClickListener(this); mLaunchPreference = findPreference(KEY_LAUNCH); - if ((mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0) { - mLaunchPreference.setEnabled(false); - } else if (!mAppEntry.info.enabled) { - mLaunchPreference.setEnabled(false); + if (mAppEntry.info != null) { + if ((mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0 || + !mAppEntry.info.enabled) { + mLaunchPreference.setEnabled(false); + } else { + mLaunchPreference.setOnPreferenceClickListener(this); + } } else { - mLaunchPreference.setOnPreferenceClickListener(this); + mLaunchPreference.setEnabled(false); } }