diff options
Diffstat (limited to 'src/com')
4 files changed, 21 insertions, 22 deletions
diff --git a/src/com/android/settings/LocalePicker.java b/src/com/android/settings/LocalePicker.java index 6600703..c6158b1 100644 --- a/src/com/android/settings/LocalePicker.java +++ b/src/com/android/settings/LocalePicker.java @@ -48,15 +48,6 @@ public class LocalePicker extends com.android.internal.app.LocalePicker } @Override - protected boolean isInDeveloperMode() { - final boolean showDev = getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE, - Context.MODE_PRIVATE).getBoolean( - DevelopmentSettings.PREF_SHOW, - android.os.Build.TYPE.equals("eng")); - return showDev; - } - - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null && savedInstanceState.containsKey(SAVE_TARGET_LOCALE)) { diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index d3a290b..7798937 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -225,7 +225,8 @@ public class SecuritySettings extends SettingsPreferenceFragment // Trust Agent preferences PreferenceGroup securityCategory = (PreferenceGroup) root.findPreference(KEY_SECURITY_CATEGORY); - if (securityCategory != null && mLockPatternUtils.isSecure()) { + if (securityCategory != null) { + final boolean hasSecurity = mLockPatternUtils.isSecure(); ArrayList<TrustAgentComponentInfo> agents = getActiveTrustAgents(getPackageManager(), mLockPatternUtils); for (int i = 0; i < agents.size(); i++) { @@ -242,6 +243,10 @@ public class SecuritySettings extends SettingsPreferenceFragment trustAgentPreference.setIntent(intent); // Add preference to the settings menu. securityCategory.addPreference(trustAgentPreference); + if (!hasSecurity) { + trustAgentPreference.setEnabled(false); + trustAgentPreference.setSummary(R.string.disabled_because_no_backup_security); + } } } @@ -340,9 +345,12 @@ public class SecuritySettings extends SettingsPreferenceFragment // Advanced Security features PreferenceGroup advancedCategory = (PreferenceGroup)root.findPreference(KEY_ADVANCED_SECURITY); - if (advancedCategory != null && !mLockPatternUtils.isSecure()) { + if (advancedCategory != null) { Preference manageAgents = advancedCategory.findPreference(KEY_MANAGE_TRUST_AGENTS); - if (manageAgents != null) advancedCategory.removePreference(manageAgents); + if (manageAgents != null && !mLockPatternUtils.isSecure()) { + manageAgents.setEnabled(false); + manageAgents.setSummary(R.string.disabled_because_no_backup_security); + } } // The above preferences come and go based on security state, so we need to update diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index d0bc0cc..e1bcac5 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -335,16 +335,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment // and want to pretend that the language is valid for all locales. // We need a way to support languages that aren't tied to a particular // locale instead of hiding the locale qualifier. - if (language.equals("zz")) { - String country = conf.locale.getCountry(); - if (country.equals("ZZ")) { - localeName = "[Developer] Accented English (zz_ZZ)"; - } else if (country.equals("ZY")) { - localeName = "[Developer] Fake Bi-Directional (zz_ZY)"; - } else { - localeName = ""; - } - } else if (hasOnlyOneLanguageInstance(language, + if (hasOnlyOneLanguageInstance(language, Resources.getSystem().getAssets().getLocales())) { localeName = conf.locale.getDisplayLanguage(conf.locale); } else { diff --git a/src/com/android/settings/vpn2/VpnSettings.java b/src/com/android/settings/vpn2/VpnSettings.java index ab84654..7516392 100644 --- a/src/com/android/settings/vpn2/VpnSettings.java +++ b/src/com/android/settings/vpn2/VpnSettings.java @@ -350,6 +350,15 @@ public class VpnSettings extends SettingsPreferenceFragment implements if (preference instanceof VpnPreference) { VpnProfile profile = ((VpnPreference) preference).getProfile(); + if (mInfo != null && profile.key.equals(mInfo.key) && + mInfo.state == LegacyVpnInfo.STATE_CONNECTED) { + try { + mInfo.intent.send(); + return true; + } catch (Exception e) { + // ignore + } + } mDialog = new VpnDialog(getActivity(), this, profile, false); } else { // Generate a new key. Here we just use the current time. |