Loading java/res/values/setup-wizard.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2013, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <resources> <bool name="config_setup_wizard_available">false</bool> </resources> java/src/com/android/inputmethod/latin/Settings.java +5 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,11 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public static boolean readShowSetupWizardIcon(final SharedPreferences prefs, final Context context) { final boolean enableSetupWizardByConfig = context.getResources().getBoolean( R.bool.config_setup_wizard_available); if (!enableSetupWizardByConfig) { return false; } if (!prefs.contains(Settings.PREF_SHOW_SETUP_WIZARD_ICON)) { final ApplicationInfo appInfo = context.getApplicationInfo(); final boolean isApplicationInSystemImage = Loading java/src/com/android/inputmethod/latin/SettingsFragment.java +7 −1 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment Settings.readKeyPreviewPopupEnabled(prefs, res)); } if (!res.getBoolean(R.bool.config_setup_wizard_available)) { removePreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON, advancedSettings); } setPreferenceEnabled(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST, Settings.readShowsLanguageSwitchKey(prefs)); Loading Loading @@ -203,7 +207,9 @@ public final class SettingsFragment extends InputMethodSettingsFragment final SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); final CheckBoxPreference showSetupWizardIcon = (CheckBoxPreference)findPreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON); if (showSetupWizardIcon != null) { showSetupWizardIcon.setChecked(Settings.readShowSetupWizardIcon(prefs, getActivity())); } updateShowCorrectionSuggestionsSummary(); updateKeyPreviewPopupDelaySummary(); updateCustomInputStylesSummary(); Loading Loading
java/res/values/setup-wizard.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2013, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <resources> <bool name="config_setup_wizard_available">false</bool> </resources>
java/src/com/android/inputmethod/latin/Settings.java +5 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,11 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public static boolean readShowSetupWizardIcon(final SharedPreferences prefs, final Context context) { final boolean enableSetupWizardByConfig = context.getResources().getBoolean( R.bool.config_setup_wizard_available); if (!enableSetupWizardByConfig) { return false; } if (!prefs.contains(Settings.PREF_SHOW_SETUP_WIZARD_ICON)) { final ApplicationInfo appInfo = context.getApplicationInfo(); final boolean isApplicationInSystemImage = Loading
java/src/com/android/inputmethod/latin/SettingsFragment.java +7 −1 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment Settings.readKeyPreviewPopupEnabled(prefs, res)); } if (!res.getBoolean(R.bool.config_setup_wizard_available)) { removePreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON, advancedSettings); } setPreferenceEnabled(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST, Settings.readShowsLanguageSwitchKey(prefs)); Loading Loading @@ -203,7 +207,9 @@ public final class SettingsFragment extends InputMethodSettingsFragment final SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); final CheckBoxPreference showSetupWizardIcon = (CheckBoxPreference)findPreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON); if (showSetupWizardIcon != null) { showSetupWizardIcon.setChecked(Settings.readShowSetupWizardIcon(prefs, getActivity())); } updateShowCorrectionSuggestionsSummary(); updateKeyPreviewPopupDelaySummary(); updateCustomInputStylesSummary(); Loading