From 6995fee9aa2b92f2707df7e83dfb19559af35b79 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Thu, 14 May 2015 14:20:45 -0700 Subject: [PATCH 1/3] Fix bug #21025020 Stability: JCs in Settings: Caused by: java.lang.NullPointerException - prevent the NPE Change-Id: Ief5a618e789e50eebcaa4386bd9ecec2192b4565 --- .../settings/applications/InstalledAppDetails.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 5b510ebc2ed..c3645853ac4 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -284,12 +284,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); } } From c3fb482ffe7afa224aa01d7990d27dbe5a4ed514 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Wed, 13 May 2015 14:14:05 -0700 Subject: [PATCH 2/3] Fix crash when removing fingerprint Also fix a strings in fingerprint enrollment. Bug: 21030545 Change-Id: I2d250b51a01f02bee014d4bc8e192d11199113e3 --- res/values/strings.xml | 4 ++-- src/com/android/settings/fingerprint/FingerprintSettings.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 6e8fba43902..0ffaf582549 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -761,7 +761,7 @@ To use your fingerprint to unlock your screen or confirm purchases, you\u2019ll need to: - Setup your backup screen lock method + Set up your backup screen lock method Add your fingerprint @@ -791,7 +791,7 @@ Whenever you see this icon, you can use your fingerprint for identification or to authorize a purchase. - Setup screen lock + Set up screen lock Done diff --git a/src/com/android/settings/fingerprint/FingerprintSettings.java b/src/com/android/settings/fingerprint/FingerprintSettings.java index 5a69147236b..56f3ff6b35a 100644 --- a/src/com/android/settings/fingerprint/FingerprintSettings.java +++ b/src/com/android/settings/fingerprint/FingerprintSettings.java @@ -259,9 +259,9 @@ public class FingerprintSettings extends SubSettings { protected void removeFingerprintPreference(int fingerprintId) { String name = genKey(fingerprintId); - Preference prefToRemove = mManageCategory.findPreference(name); + Preference prefToRemove = findPreference(name); if (prefToRemove != null) { - if (!mManageCategory.removePreference(prefToRemove)) { + if (!getPreferenceScreen().removePreference(prefToRemove)) { Log.w(TAG, "Failed to remove preference with key " + name); } } else { From 874c97a35cb7f771791351c9d398641a10bfe6b3 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Fri, 15 May 2015 11:35:45 -0400 Subject: [PATCH 3/3] Banish the memory page to Apps > Advanced Bug: 21129029 Change-Id: I5ea6c88505e553a4340e9c60377952af7e802a44 --- res/xml/advanced_apps.xml | 4 ++++ res/xml/dashboard_categories.xml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/res/xml/advanced_apps.xml b/res/xml/advanced_apps.xml index 1bb9c586719..323dca19b02 100644 --- a/res/xml/advanced_apps.xml +++ b/res/xml/advanced_apps.xml @@ -50,4 +50,8 @@ android:value="com.android.settings.Settings$HighPowerApplicationsActivity" /> + + diff --git a/res/xml/dashboard_categories.xml b/res/xml/dashboard_categories.xml index cdc1166fa89..14a4db62316 100644 --- a/res/xml/dashboard_categories.xml +++ b/res/xml/dashboard_categories.xml @@ -134,13 +134,13 @@ android:icon="@drawable/ic_settings_multiuser" /> - +