Fix a NPE when clicking encryption interstitial header
Pref tree handler cannot assume preference has non-null key. Change-Id: I790e75f3b4c888e2a48b297bea89cda0b8dbaabd Fix: 35855587 Test: runtest --path tests/app/src/com/android/settings/EncryptionInterstitialTest.java
This commit is contained in:
@@ -196,6 +196,9 @@ public class EncryptionInterstitial extends SettingsActivity {
|
||||
@Override
|
||||
public boolean onPreferenceTreeClick(Preference preference) {
|
||||
final String key = preference.getKey();
|
||||
if (key == null) {
|
||||
return super.onPreferenceTreeClick(preference);
|
||||
}
|
||||
if (key.equals(KEY_ENCRYPT_REQUIRE_PASSWORD)) {
|
||||
final boolean accEn = AccessibilityManager.getInstance(getActivity()).isEnabled();
|
||||
if (accEn && !mPasswordRequired) {
|
||||
|
Reference in New Issue
Block a user