Remove experimental settings
Bug: 5314288 Change-Id: I31cbc6da0ca5e61a5fa4a893c774f2110a5698f1main
parent
ea843f2a24
commit
c9c54a84bc
|
@ -98,20 +98,6 @@
|
||||||
android:title="@string/prefs_usability_study_mode"
|
android:title="@string/prefs_usability_study_mode"
|
||||||
android:persistent="true"
|
android:persistent="true"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="enable_logging"
|
|
||||||
android:title="@string/prefs_enable_log"
|
|
||||||
android:summary="@string/prefs_description_log"
|
|
||||||
android:persistent="true"
|
|
||||||
android:defaultValue="true" />
|
|
||||||
<ListPreference
|
|
||||||
android:key="pref_keyboard_layout_20100902"
|
|
||||||
android:title="@string/keyboard_layout"
|
|
||||||
android:persistent="true"
|
|
||||||
android:entryValues="@array/keyboard_layout_modes_values"
|
|
||||||
android:entries="@array/keyboard_layout_modes"
|
|
||||||
android:defaultValue="@string/config_default_keyboard_theme_id" />
|
|
||||||
</PreferenceCategory>
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="pref_advanced_settings"
|
android:key="pref_advanced_settings"
|
||||||
android:title="@string/advanced_settings"
|
android:title="@string/advanced_settings"
|
||||||
|
@ -138,7 +124,8 @@
|
||||||
android:summary="@string/enable_span_insert_summary"
|
android:summary="@string/enable_span_insert_summary"
|
||||||
android:persistent="true"
|
android:persistent="true"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
<!-- TODO: evaluate results and revive this option. The code already supports it. -->
|
<!-- TODO: evaluate results and revive this option. The code
|
||||||
|
already supports it. -->
|
||||||
<!-- <CheckBoxPreference -->
|
<!-- <CheckBoxPreference -->
|
||||||
<!-- android:key="bigram_prediction" -->
|
<!-- android:key="bigram_prediction" -->
|
||||||
<!-- android:dependency="bigram_suggestion" -->
|
<!-- android:dependency="bigram_suggestion" -->
|
||||||
|
@ -147,12 +134,5 @@
|
||||||
<!-- android:persistent="true" -->
|
<!-- android:persistent="true" -->
|
||||||
<!-- android:defaultValue="false" /> -->
|
<!-- android:defaultValue="false" /> -->
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
<!-- <Preference
|
</PreferenceCategory>
|
||||||
android:title="Debug Settings"
|
|
||||||
android:key="debug_settings">
|
|
||||||
<intent
|
|
||||||
android:action="android.intent.action.MAIN"
|
|
||||||
android:targetPackage="com.android.inputmethod.latin"
|
|
||||||
android:targetClass="com.android.inputmethod.latin.DebugSettings" />
|
|
||||||
</Preference>-->
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
|
@ -55,6 +55,8 @@ public class Settings extends InputMethodSettingsActivity
|
||||||
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
||||||
private static final String TAG = Settings.class.getSimpleName();
|
private static final String TAG = Settings.class.getSimpleName();
|
||||||
|
|
||||||
|
public static final boolean ENABLE_EXPERIMENTAL_SETTINGS = false;
|
||||||
|
|
||||||
public static final String PREF_GENERAL_SETTINGS_KEY = "general_settings";
|
public static final String PREF_GENERAL_SETTINGS_KEY = "general_settings";
|
||||||
public static final String PREF_VIBRATE_ON = "vibrate_on";
|
public static final String PREF_VIBRATE_ON = "vibrate_on";
|
||||||
public static final String PREF_SOUND_ON = "sound_on";
|
public static final String PREF_SOUND_ON = "sound_on";
|
||||||
|
@ -397,6 +399,8 @@ public class Settings extends InputMethodSettingsActivity
|
||||||
(PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY);
|
(PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY);
|
||||||
final PreferenceGroup textCorrectionGroup =
|
final PreferenceGroup textCorrectionGroup =
|
||||||
(PreferenceGroup) findPreference(PREF_CORRECTION_SETTINGS_KEY);
|
(PreferenceGroup) findPreference(PREF_CORRECTION_SETTINGS_KEY);
|
||||||
|
final PreferenceGroup miscSettings =
|
||||||
|
(PreferenceGroup) findPreference(PREF_MISC_SETTINGS_KEY);
|
||||||
|
|
||||||
if (!Values.isShowSettingsKeyOption(res)) {
|
if (!Values.isShowSettingsKeyOption(res)) {
|
||||||
generalSettings.removePreference(mShowSettingsKeyPreference);
|
generalSettings.removePreference(mShowSettingsKeyPreference);
|
||||||
|
@ -437,12 +441,6 @@ public class Settings extends InputMethodSettingsActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showUsabilityModeStudyOption = res.getBoolean(
|
|
||||||
R.bool.config_enable_usability_study_mode_option);
|
|
||||||
if (!showUsabilityModeStudyOption) {
|
|
||||||
getPreferenceScreen().removePreference(findPreference(PREF_USABILITY_STUDY_MODE));
|
|
||||||
}
|
|
||||||
|
|
||||||
mKeyPreviewPopupDismissDelay =
|
mKeyPreviewPopupDismissDelay =
|
||||||
(ListPreference)findPreference(PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
|
(ListPreference)findPreference(PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
|
||||||
final String[] entries = new String[] {
|
final String[] entries = new String[] {
|
||||||
|
@ -467,6 +465,15 @@ public class Settings extends InputMethodSettingsActivity
|
||||||
if (0 >= number) {
|
if (0 >= number) {
|
||||||
textCorrectionGroup.removePreference(dictionaryLink);
|
textCorrectionGroup.removePreference(dictionaryLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final boolean showUsabilityModeStudyOption = res.getBoolean(
|
||||||
|
R.bool.config_enable_usability_study_mode_option);
|
||||||
|
if (!showUsabilityModeStudyOption || !ENABLE_EXPERIMENTAL_SETTINGS) {
|
||||||
|
final Preference pref = findPreference(PREF_USABILITY_STUDY_MODE);
|
||||||
|
if (pref != null) {
|
||||||
|
miscSettings.removePreference(pref);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
|
Loading…
Reference in New Issue