Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca9a78f2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check for missing preference before setting title." into nyc-mr1-dev

parents e162563e 06458be2
Loading
Loading
Loading
Loading
+12 −8
Original line number Original line Diff line number Diff line
@@ -355,14 +355,18 @@ public class ChooseLockGeneric extends SettingsActivity {


        private void updatePreferenceText() {
        private void updatePreferenceText() {
            if (mForFingerprint) {
            if (mForFingerprint) {
                Preference pattern = findPreference(KEY_UNLOCK_SET_PATTERN);
                final String key[] = { KEY_UNLOCK_SET_PATTERN,
                pattern.setTitle(R.string.fingerprint_unlock_set_unlock_pattern);
                        KEY_UNLOCK_SET_PIN,

                        KEY_UNLOCK_SET_PASSWORD };
                Preference pin = findPreference(KEY_UNLOCK_SET_PIN);
                final int res[] = { R.string.fingerprint_unlock_set_unlock_pattern,
                pin.setTitle(R.string.fingerprint_unlock_set_unlock_pin);
                        R.string.fingerprint_unlock_set_unlock_pin,

                        R.string.fingerprint_unlock_set_unlock_password };
                Preference password = findPreference(KEY_UNLOCK_SET_PASSWORD);
                for (int i = 0; i < key.length; i++) {
                password.setTitle(R.string.fingerprint_unlock_set_unlock_password);
                    Preference pref = findPreference(key[i]);
                    if (pref != null) { // can be removed by device admin
                        pref.setTitle(res[i]);
                    }
                }
            }
            }


            if (mManagedPasswordProvider.isSettingManagedPasswordSupported()) {
            if (mManagedPasswordProvider.isSettingManagedPasswordSupported()) {