Settings key always exists in more keys of shortcut/f1 key

This change also
  * Fix comman/f1 key for Arabic keyboard.
  * Removes "show settings key option" and related stuff.
  * Renames and simplifies F2 key to shortcut key on 7 inch tablet.

Change-Id: Ib1cf99ad00d9780a2f0d170260e756771e161521
main
Tadashi G. Takaoka 2012-02-16 16:24:03 -08:00
parent fed72d6038
commit 97bde43740
36 changed files with 154 additions and 329 deletions

View File

@ -70,17 +70,13 @@
<!-- U+066B: "٫" ARABIC DECIMAL SEPARATOR <!-- U+066B: "٫" ARABIC DECIMAL SEPARATOR
U+066C: "٬" ARABIC THOUSANDS SEPARATOR --> U+066C: "٬" ARABIC THOUSANDS SEPARATOR -->
<string name="additional_more_keys_for_symbols_0">0,&#x066B;,&#x066C;</string> <string name="additional_more_keys_for_symbols_0">0,&#x066B;,&#x066C;</string>
<!-- U+060C: "،" ARABIC COMMA -->
<string name="keylabel_for_comma">&#x060C;</string> <string name="keylabel_for_comma">&#x060C;</string>
<string name="keylabel_for_f1">&#x060C;</string> <string name="more_keys_for_comma">"\\,"</string>
<string name="keylabel_for_symbols_question">&#x061F;</string> <string name="keylabel_for_symbols_question">&#x061F;</string>
<string name="keylabel_for_symbols_semicolon">&#x061B;</string> <string name="keylabel_for_symbols_semicolon">&#x061B;</string>
<!-- U+066A: "٪" ARABIC PERCENT SIGN --> <!-- U+066A: "٪" ARABIC PERCENT SIGN -->
<string name="keylabel_for_symbols_percent">&#x066A;</string> <string name="keylabel_for_symbols_percent">&#x066A;</string>
<string name="more_keys_for_comma">,</string>
<!-- U+060C: "،" ARABIC COMMA -->
<string name="more_keys_for_f1">&#x060C;</string>
<string name="more_keys_for_f1_settings">\\,,\@icon/settingsKey|\@integer/key_settings</string>
<string name="more_keys_for_f1_navigate">\\,,\@icon/tabKey|\@integer/key_tab</string>
<string name="more_keys_for_symbols_question">\?</string> <string name="more_keys_for_symbols_question">\?</string>
<string name="more_keys_for_symbols_semicolon">;</string> <string name="more_keys_for_symbols_semicolon">;</string>
<!-- U+2030: "‰" PER MILLE SIGN --> <!-- U+2030: "‰" PER MILLE SIGN -->

View File

@ -19,8 +19,6 @@
--> -->
<resources> <resources>
<bool name="config_enable_show_settings_key_option">true</bool>
<bool name="config_default_show_settings_key">false</bool>
<bool name="config_enable_show_voice_key_option">false</bool> <bool name="config_enable_show_voice_key_option">false</bool>
<bool name="config_enable_show_popup_on_keypress_option">false</bool> <bool name="config_enable_show_popup_on_keypress_option">false</bool>
<bool name="config_enable_bigram_suggestions_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool>

View File

@ -19,8 +19,6 @@
--> -->
<resources> <resources>
<bool name="config_enable_show_settings_key_option">false</bool>
<bool name="config_default_show_settings_key">true</bool>
<bool name="config_enable_show_voice_key_option">false</bool> <bool name="config_enable_show_voice_key_option">false</bool>
<bool name="config_enable_show_popup_on_keypress_option">false</bool> <bool name="config_enable_show_popup_on_keypress_option">false</bool>
<bool name="config_enable_bigram_suggestions_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool>

View File

@ -357,14 +357,6 @@
</attr> </attr>
<attr name="navigateAction" format="boolean" /> <attr name="navigateAction" format="boolean" />
<attr name="passwordInput" format="boolean" /> <attr name="passwordInput" format="boolean" />
<attr name="hasSettingsKey" format="boolean" />
<!-- This should be aligned with KeyboardID.F2KEY_MODE_* -->
<attr name="f2KeyMode" format="enum">
<enum name="none" value="0" />
<enum name="settings" value="1" />
<enum name="shortcutIme" value="2" />
<enum name="shortcutImeOrSettings" value="3" />
</attr>
<attr name="clobberSettingsKey" format="boolean" /> <attr name="clobberSettingsKey" format="boolean" />
<attr name="shortcutKeyEnabled" format="boolean" /> <attr name="shortcutKeyEnabled" format="boolean" />
<attr name="hasShortcutKey" format="boolean" /> <attr name="hasShortcutKey" format="boolean" />

View File

@ -20,8 +20,6 @@
<resources> <resources>
<bool name="config_use_fullscreen_mode">false</bool> <bool name="config_use_fullscreen_mode">false</bool>
<bool name="config_enable_show_settings_key_option">true</bool>
<bool name="config_default_show_settings_key">false</bool>
<bool name="config_enable_show_voice_key_option">true</bool> <bool name="config_enable_show_voice_key_option">true</bool>
<bool name="config_enable_show_popup_on_keypress_option">true</bool> <bool name="config_enable_show_popup_on_keypress_option">true</bool>
<bool name="config_enable_bigram_suggestions_option">true</bool> <bool name="config_enable_bigram_suggestions_option">true</bool>

View File

@ -115,15 +115,12 @@
<!-- U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N <!-- U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N
U+2205: "∅" EMPTY SET --> U+2205: "∅" EMPTY SET -->
<string name="more_keys_for_symbols_0">&#x207F;,&#x2205;</string> <string name="more_keys_for_symbols_0">&#x207F;,&#x2205;</string>
<string name="settings_as_more_key">\@icon/settingsKey|\@integer/key_settings</string>
<string name="keylabel_for_comma">,</string> <string name="keylabel_for_comma">,</string>
<string name="keylabel_for_f1">,</string> <string name="more_keys_for_comma"></string>
<string name="keylabel_for_symbols_question">\?</string> <string name="keylabel_for_symbols_question">\?</string>
<string name="keylabel_for_symbols_semicolon">;</string> <string name="keylabel_for_symbols_semicolon">;</string>
<string name="keylabel_for_symbols_percent">%</string> <string name="keylabel_for_symbols_percent">%</string>
<string name="more_keys_for_comma"></string>
<string name="more_keys_for_f1"></string>
<string name="more_keys_for_f1_settings">\@icon/settingsKey|\@integer/key_settings</string>
<string name="more_keys_for_f1_navigate">\@icon/tabKey|\@integer/key_tab</string>
<!-- U+00BF: "¿" INVERTED QUESTION MARK --> <!-- U+00BF: "¿" INVERTED QUESTION MARK -->
<string name="more_keys_for_symbols_question">&#x00BF;</string> <string name="more_keys_for_symbols_question">&#x00BF;</string>
<string name="more_keys_for_symbols_semicolon"></string> <string name="more_keys_for_symbols_semicolon"></string>

View File

@ -95,9 +95,6 @@
<string name="prefs_suggestion_visibility_show_only_portrait_name">Show on portrait mode</string> <string name="prefs_suggestion_visibility_show_only_portrait_name">Show on portrait mode</string>
<string name="prefs_suggestion_visibility_hide_name">Always hide</string> <string name="prefs_suggestion_visibility_hide_name">Always hide</string>
<!-- Option to show/hide the settings key -->
<string name="prefs_settings_key">Show settings key</string>
<!-- Option to decide the auto correction threshold score --> <!-- Option to decide the auto correction threshold score -->
<!-- Option to enable auto correction [CHAR LIMIT=20]--> <!-- Option to enable auto correction [CHAR LIMIT=20]-->
<string name="auto_correction">Auto correction</string> <string name="auto_correction">Auto correction</string>

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2011, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<switch>
<case
latin:f2KeyMode="settings"
>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="fillBoth" />
</case>
<case
latin:f2KeyMode="shortcutIme"
>
<switch>
<case
latin:shortcutKeyEnabled="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyWidth="fillBoth" />
</case>
<!-- shortcutKeyEnabled="false" -->
<default>
<Spacer />
</default>
</switch>
</case>
<case
latin:f2KeyMode="shortcutImeOrSettings"
>
<switch>
<case
latin:shortcutKeyEnabled="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyWidth="fillBoth" />
</case>
<!-- shortcutKeyEnabled="false" -->
<default>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="fillBoth" />
</default>
</switch>
</case>
<!-- f2KeyMode="none" -->
<default>
<Spacer />
</default>
</switch>
</merge>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<switch>
<case
latin:shortcutKeyEnabled="true"
latin:clobberSettingsKey="false"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/settings_as_more_key"
latin:keyWidth="fillBoth" />
</case>
<case
latin:shortcutKeyEnabled="true"
latin:clobberSettingsKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyWidth="fillBoth" />
</case>
<case
latin:shortcutKeyEnabled="false"
latin:clobberSettingsKey="false"
>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="fillBoth" />
</case>
<!-- shortcutKeyEnabled="false" clobberSettingsKey="true" -->
<default>
<Spacer />
</default>
</switch>
</merge>

View File

@ -21,23 +21,6 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<!-- Base key style for the key which may have settings key as popup key -->
<switch>
<case
latin:clobberSettingsKey="true"
>
<key-style
latin:styleName="f2PopupStyle"
latin:backgroundType="functional" />
</case>
<default>
<key-style
latin:styleName="f2PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="\@icon/settingsKey|\@integer/key_settings"
latin:backgroundType="functional" />
</default>
</switch>
<switch> <switch>
<case <case
latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted" latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
@ -112,7 +95,7 @@
latin:keyIconDisabled="iconDisabledShortcutKey" latin:keyIconDisabled="iconDisabledShortcutKey"
latin:keyLabelFlags="preserveCase" latin:keyLabelFlags="preserveCase"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
latin:parentStyle="f2PopupStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="settingsKeyStyle" latin:styleName="settingsKeyStyle"
latin:code="@integer/key_settings" latin:code="@integer/key_settings"

View File

@ -71,6 +71,6 @@
latin:keyXPos="-10.00%p" latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -133,6 +133,6 @@
latin:keyXPos="-11.00%p" latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -76,6 +76,6 @@
latin:keyXPos="-11.00%p" latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -127,6 +127,6 @@
latin:keyXPos="-11.00%p" latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -167,6 +167,6 @@
latin:keyXPos="-10.00%p" latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -148,6 +148,6 @@
latin:keyXPos="-10.00%p" latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
<include <include
latin:keyboardLayout="@xml/key_f2" /> latin:keyboardLayout="@xml/key_shortcut" />
</Row> </Row>
</merge> </merge>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<switch>
<case
latin:clobberSettingsKey="false"
>
<Key
latin:keyStyle="settingsKeyStyle" />
</case>
<default>
<Spacer />
</default>
</switch>
</merge>

View File

@ -24,15 +24,8 @@
<Row <Row
latin:keyWidth="8.047%p" latin:keyWidth="8.047%p"
> >
<switch> <include
<case latin:keyboardLayout="@xml/key_settings" />
latin:hasSettingsKey="true"
>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case>
</switch>
<Spacer <Spacer
latin:keyXPos="15.157%p" latin:keyXPos="15.157%p"
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />

View File

@ -115,18 +115,9 @@
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
</Row> </Row>
<Row> <Row>
<switch> <include
<case latin:hasSettingsKey="true"> latin:keyboardLayout="@xml/key_settings"
<Key latin:keyWidth="8.047%p" />
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case>
<default>
<!-- Note: This Spacer prevents the below key from being marked as a left edge key. -->
<Spacer
latin:keyWidth="8.047%p" />
</default>
</switch>
<Key <Key
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle" latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
latin:keyXPos="13.829%p" latin:keyXPos="13.829%p"

View File

@ -110,18 +110,9 @@
latin:keyWidth="0%p" /> latin:keyWidth="0%p" />
</Row> </Row>
<Row> <Row>
<switch> <include
<case latin:hasSettingsKey="true"> latin:keyboardLayout="@xml/key_settings"
<Key latin:keyWidth="8.047%p" />
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case>
<default>
<!-- Note: This Spacer prevents the below key from being marked as a left edge key. -->
<Spacer
latin:keyWidth="8.047%p" />
</default>
</switch>
<Key <Key
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle" latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
latin:keyXPos="13.829%p" latin:keyXPos="13.829%p"

View File

@ -155,15 +155,8 @@
<Row <Row
latin:keyWidth="8.047%p" latin:keyWidth="8.047%p"
> >
<switch> <include
<case latin:keyboardLayout="@xml/key_settings" />
latin:hasSettingsKey="true"
>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case>
</switch>
<Key <Key
latin:keyLabel="/" latin:keyLabel="/"
latin:keyXPos="15.157%p" /> latin:keyXPos="15.157%p" />

View File

@ -145,13 +145,8 @@
<Row <Row
latin:keyWidth="8.047%p" latin:keyWidth="8.047%p"
> >
<switch> <include
<case latin:hasSettingsKey="true"> latin:keyboardLayout="@xml/key_settings" />
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case>
</switch>
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyXPos="31.250%p" latin:keyXPos="31.250%p"

View File

@ -23,7 +23,6 @@
> >
<switch> <switch>
<case <case
latin:hasSettingsKey="false"
latin:navigateAction="false" latin:navigateAction="false"
> >
<switch> <switch>
@ -51,11 +50,14 @@
<default> <default>
<Key <Key
latin:keyLabel="@string/keylabel_for_comma" latin:keyLabel="@string/keylabel_for_comma"
latin:keyLabelFlags="hasPopupHint"
latin:additionalMoreKeys="@string/more_keys_for_comma"
latin:keyStyle="f1PopupStyle" /> latin:keyStyle="f1PopupStyle" />
</default> </default>
</switch> </switch>
</case> </case>
<!-- hasSettingsKey="true" or navigateAction="true" --> <!-- TODO: Remove dedicated navigation tab key. -->
<!-- navigateAction="true" -->
<default> <default>
<switch> <switch>
<case <case
@ -85,9 +87,10 @@
<default> <default>
<Key <Key
latin:keyLabel="@string/keylabel_for_comma" latin:keyLabel="@string/keylabel_for_comma"
latin:keyWidth="9.2%p" latin:additionalMoreKeys="@string/more_keys_for_comma"
latin:keyStyle="f1PopupStyle" /> latin:keyStyle="f1PopupStyle"
</default> latin:keyWidth="9.2%p" />
</default>
</switch> </switch>
</default> </default>
</switch> </switch>

View File

@ -22,17 +22,6 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<switch> <switch>
<case
latin:hasSettingsKey="true"
>
<!-- Because this settings key is not adjacent to the space key, this key should be
just ignored while typing (altCode=CODE_UNSPECIFIED). -->
<Key
latin:keyStyle="settingsKeyStyle"
latin:altCode="@integer/key_unspecified"
latin:keyWidth="9.2%p" />
</case>
<!-- hasSettingsKey="false" -->
<case <case
latin:navigateAction="true" latin:navigateAction="true"
> >

View File

@ -28,36 +28,14 @@
> >
<key-style <key-style
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
</case> </case>
<!-- clobberSettingsKey="false --> <!-- clobberSettingsKey="false" -->
<case
latin:hasSettingsKey="false"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_settings"
latin:backgroundType="functional" />
</case>
<!-- clobberSettingsKey="false" hasSettingsKey="true" -->
<case
latin:navigateAction="true"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_navigate"
latin:backgroundType="functional" />
</case>
<!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" -->
<default> <default>
<key-style <key-style
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1" latin:moreKeys="@string/settings_as_more_key"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
</default> </default>
</switch> </switch>

View File

@ -23,7 +23,6 @@
> >
<switch> <switch>
<case <case
latin:hasSettingsKey="false"
latin:navigateAction="false" latin:navigateAction="false"
> >
<switch> <switch>
@ -36,12 +35,14 @@
<!-- latin:hasShortcutKey="false" --> <!-- latin:hasShortcutKey="false" -->
<default> <default>
<Key <Key
latin:keyLabel="@string/keylabel_for_f1" latin:keyLabel="@string/keylabel_for_comma"
latin:keyLabelFlags="hasPopupHint"
latin:additionalMoreKeys="@string/more_keys_for_comma"
latin:keyStyle="f1PopupStyle" /> latin:keyStyle="f1PopupStyle" />
</default> </default>
</switch> </switch>
</case> </case>
<!-- hasSettingsKey="true" or navigateAction="true" --> <!-- navigateAction="true" -->
<default> <default>
<switch> <switch>
<case <case
@ -54,10 +55,12 @@
<!-- latin:hasShortcutKey="false" --> <!-- latin:hasShortcutKey="false" -->
<default> <default>
<Key <Key
latin:keyLabel="@string/keylabel_for_f1" latin:keyLabel="@string/keylabel_for_comma"
latin:keyWidth="9.2%p" latin:keyLabelFlags="hasPopupHint"
latin:keyStyle="f1PopupStyle" /> latin:additionalMoreKeys="@string/more_keys_for_comma"
</default> latin:keyStyle="f1PopupStyle"
latin:keyWidth="9.2%p" />
</default>
</switch> </switch>
</default> </default>
</switch> </switch>

View File

@ -44,11 +44,6 @@
android:title="@string/popup_on_keypress" android:title="@string/popup_on_keypress"
android:persistent="true" android:persistent="true"
android:defaultValue="@bool/config_default_popup_preview" /> android:defaultValue="@bool/config_default_popup_preview" />
<CheckBoxPreference
android:key="show_settings_key"
android:title="@string/prefs_settings_key"
android:persistent="true"
android:defaultValue="@bool/config_default_show_settings_key" />
<ListPreference <ListPreference
android:key="voice_mode" android:key="voice_mode"
android:title="@string/voice_input" android:title="@string/voice_input"

View File

@ -26,7 +26,6 @@
> >
<switch> <switch>
<case <case
latin:hasSettingsKey="false"
latin:navigateAction="false" latin:navigateAction="false"
> >
<Key <Key
@ -43,13 +42,14 @@
latin:keyStyle="enterKeyStyle" latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />
</case> </case>
<!-- hasSettingsKey="true" or navigateAction="true" --> <!-- TODO: Remove dedicated navigation tab key. -->
<!-- navigateAction="true" -->
<default> <default>
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="13.75%p" /> latin:keyWidth="13.75%p" />
<include <include
latin:keyboardLayout="@xml/key_settings_or_tab" /> latin:keyboardLayout="@xml/key_navigation_tab" />
<include <include
latin:keyboardLayout="@xml/key_f1" /> latin:keyboardLayout="@xml/key_f1" />
<Key <Key

View File

@ -26,7 +26,6 @@
> >
<switch> <switch>
<case <case
latin:hasSettingsKey="false"
latin:navigateAction="false" latin:navigateAction="false"
> >
<Key <Key
@ -43,13 +42,14 @@
latin:keyStyle="enterKeyStyle" latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />
</case> </case>
<!-- hasSettingsKey="true" or navigateAction="true" --> <!-- TODO: Remove dedicated navigation tab key. -->
<!-- navigateAction="true" -->
<default> <default>
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" /> latin:keyWidth="13.75%p" />
<include <include
latin:keyboardLayout="@xml/key_settings_or_tab" /> latin:keyboardLayout="@xml/key_navigation_tab" />
<include <include
latin:keyboardLayout="@xml/key_f1" /> latin:keyboardLayout="@xml/key_f1" />
<Key <Key

View File

@ -26,7 +26,6 @@
> >
<switch> <switch>
<case <case
latin:hasSettingsKey="false"
latin:navigateAction="false" latin:navigateAction="false"
> >
<Key <Key
@ -51,13 +50,14 @@
latin:keyStyle="enterKeyStyle" latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />
</case> </case>
<!-- hasSettingsKey="true" or navigateAction="true" --> <!-- TODO: Remove dedicated navigation tab key. -->
<!-- navigateAction="true" -->
<default> <default>
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" /> latin:keyWidth="13.75%p" />
<include <include
latin:keyboardLayout="@xml/key_settings_or_tab" /> latin:keyboardLayout="@xml/key_navigation_tab" />
<!-- U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK --> <!-- U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
<!-- TODO: Neither DroidSans nor Roboto have the glyph for U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK. --> <!-- TODO: Neither DroidSans nor Roboto have the glyph for U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
<!-- latin:keyLabelFlags="hasPopupHint" --> <!-- latin:keyLabelFlags="hasPopupHint" -->

View File

@ -1073,10 +1073,6 @@ public class Keyboard {
R.styleable.Keyboard_Case_navigateAction, id.navigateAction()); R.styleable.Keyboard_Case_navigateAction, id.navigateAction());
final boolean passwordInputMatched = matchBoolean(a, final boolean passwordInputMatched = matchBoolean(a,
R.styleable.Keyboard_Case_passwordInput, id.passwordInput()); R.styleable.Keyboard_Case_passwordInput, id.passwordInput());
final boolean hasSettingsKeyMatched = matchBoolean(a,
R.styleable.Keyboard_Case_hasSettingsKey, id.hasSettingsKey());
final boolean f2KeyModeMatched = matchInteger(a,
R.styleable.Keyboard_Case_f2KeyMode, id.f2KeyMode());
final boolean clobberSettingsKeyMatched = matchBoolean(a, final boolean clobberSettingsKeyMatched = matchBoolean(a,
R.styleable.Keyboard_Case_clobberSettingsKey, id.mClobberSettingsKey); R.styleable.Keyboard_Case_clobberSettingsKey, id.mClobberSettingsKey);
final boolean shortcutKeyEnabledMatched = matchBoolean(a, final boolean shortcutKeyEnabledMatched = matchBoolean(a,
@ -1094,14 +1090,13 @@ public class Keyboard {
final boolean countryCodeMatched = matchString(a, final boolean countryCodeMatched = matchString(a,
R.styleable.Keyboard_Case_countryCode, id.mLocale.getCountry()); R.styleable.Keyboard_Case_countryCode, id.mLocale.getCountry());
final boolean selected = keyboardSetElementMatched && modeMatched final boolean selected = keyboardSetElementMatched && modeMatched
&& navigateActionMatched && passwordInputMatched && hasSettingsKeyMatched && navigateActionMatched && passwordInputMatched
&& f2KeyModeMatched && clobberSettingsKeyMatched && clobberSettingsKeyMatched && shortcutKeyEnabledMatched
&& shortcutKeyEnabledMatched && hasShortcutKeyMatched && isMultiLineMatched && hasShortcutKeyMatched && isMultiLineMatched && imeActionMatched
&& imeActionMatched && localeCodeMatched && languageCodeMatched && localeCodeMatched && languageCodeMatched && countryCodeMatched;
&& countryCodeMatched;
if (DEBUG) { if (DEBUG) {
startTag("<%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s>%s", TAG_CASE, startTag("<%s%s%s%s%s%s%s%s%s%s%s%s%s>%s", TAG_CASE,
textAttr(a.getString(R.styleable.Keyboard_Case_keyboardSetElement), textAttr(a.getString(R.styleable.Keyboard_Case_keyboardSetElement),
"keyboardSetElement"), "keyboardSetElement"),
textAttr(a.getString(R.styleable.Keyboard_Case_mode), "mode"), textAttr(a.getString(R.styleable.Keyboard_Case_mode), "mode"),
@ -1109,11 +1104,6 @@ public class Keyboard {
"navigateAction"), "navigateAction"),
booleanAttr(a, R.styleable.Keyboard_Case_passwordInput, booleanAttr(a, R.styleable.Keyboard_Case_passwordInput,
"passwordInput"), "passwordInput"),
booleanAttr(a, R.styleable.Keyboard_Case_hasSettingsKey,
"hasSettingsKey"),
textAttr(KeyboardId.f2KeyModeName(
a.getInt(R.styleable.Keyboard_Case_f2KeyMode, -1)),
"f2KeyMode"),
booleanAttr(a, R.styleable.Keyboard_Case_clobberSettingsKey, booleanAttr(a, R.styleable.Keyboard_Case_clobberSettingsKey,
"clobberSettingsKey"), "clobberSettingsKey"),
booleanAttr(a, R.styleable.Keyboard_Case_shortcutKeyEnabled, booleanAttr(a, R.styleable.Keyboard_Case_shortcutKeyEnabled,

View File

@ -48,11 +48,6 @@ public class KeyboardId {
public static final int ELEMENT_PHONE_SYMBOLS = 8; public static final int ELEMENT_PHONE_SYMBOLS = 8;
public static final int ELEMENT_NUMBER = 9; public static final int ELEMENT_NUMBER = 9;
private static final int F2KEY_MODE_NONE = 0;
private static final int F2KEY_MODE_SETTINGS = 1;
private static final int F2KEY_MODE_SHORTCUT_IME = 2;
private static final int F2KEY_MODE_SHORTCUT_IME_OR_SETTINGS = 3;
private static final int IME_ACTION_CUSTOM_LABEL = EditorInfo.IME_MASK_ACTION + 1; private static final int IME_ACTION_CUSTOM_LABEL = EditorInfo.IME_MASK_ACTION + 1;
public final Locale mLocale; public final Locale mLocale;
@ -61,7 +56,6 @@ public class KeyboardId {
public final int mMode; public final int mMode;
public final int mElementId; public final int mElementId;
private final EditorInfo mEditorInfo; private final EditorInfo mEditorInfo;
private final boolean mSettingsKeyEnabled;
public final boolean mClobberSettingsKey; public final boolean mClobberSettingsKey;
public final boolean mShortcutKeyEnabled; public final boolean mShortcutKeyEnabled;
public final boolean mHasShortcutKey; public final boolean mHasShortcutKey;
@ -70,15 +64,14 @@ public class KeyboardId {
private final int mHashCode; private final int mHashCode;
public KeyboardId(int elementId, Locale locale, int orientation, int width, int mode, public KeyboardId(int elementId, Locale locale, int orientation, int width, int mode,
EditorInfo editorInfo, boolean settingsKeyEnabled, boolean clobberSettingsKey, EditorInfo editorInfo, boolean clobberSettingsKey, boolean shortcutKeyEnabled,
boolean shortcutKeyEnabled, boolean hasShortcutKey) { boolean hasShortcutKey) {
this.mLocale = locale; this.mLocale = locale;
this.mOrientation = orientation; this.mOrientation = orientation;
this.mWidth = width; this.mWidth = width;
this.mMode = mode; this.mMode = mode;
this.mElementId = elementId; this.mElementId = elementId;
this.mEditorInfo = editorInfo; this.mEditorInfo = editorInfo;
this.mSettingsKeyEnabled = settingsKeyEnabled;
this.mClobberSettingsKey = clobberSettingsKey; this.mClobberSettingsKey = clobberSettingsKey;
this.mShortcutKeyEnabled = shortcutKeyEnabled; this.mShortcutKeyEnabled = shortcutKeyEnabled;
this.mHasShortcutKey = hasShortcutKey; this.mHasShortcutKey = hasShortcutKey;
@ -96,7 +89,6 @@ public class KeyboardId {
id.mWidth, id.mWidth,
id.navigateAction(), id.navigateAction(),
id.passwordInput(), id.passwordInput(),
id.mSettingsKeyEnabled,
id.mClobberSettingsKey, id.mClobberSettingsKey,
id.mShortcutKeyEnabled, id.mShortcutKeyEnabled,
id.mHasShortcutKey, id.mHasShortcutKey,
@ -116,7 +108,6 @@ public class KeyboardId {
&& other.mWidth == this.mWidth && other.mWidth == this.mWidth
&& other.navigateAction() == this.navigateAction() && other.navigateAction() == this.navigateAction()
&& other.passwordInput() == this.passwordInput() && other.passwordInput() == this.passwordInput()
&& other.mSettingsKeyEnabled == this.mSettingsKeyEnabled
&& other.mClobberSettingsKey == this.mClobberSettingsKey && other.mClobberSettingsKey == this.mClobberSettingsKey
&& other.mShortcutKeyEnabled == this.mShortcutKeyEnabled && other.mShortcutKeyEnabled == this.mShortcutKeyEnabled
&& other.mHasShortcutKey == this.mHasShortcutKey && other.mHasShortcutKey == this.mHasShortcutKey
@ -183,25 +174,6 @@ public class KeyboardId {
} }
} }
public boolean hasSettingsKey() {
return mSettingsKeyEnabled && !mClobberSettingsKey;
}
public int f2KeyMode() {
if (mClobberSettingsKey) {
// Never shows the Settings key
return KeyboardId.F2KEY_MODE_SHORTCUT_IME;
}
if (mSettingsKeyEnabled) {
return KeyboardId.F2KEY_MODE_SETTINGS;
} else {
// It should be alright to fall back to the Settings key on 7-inch layouts
// even when the Settings key is not explicitly enabled.
return KeyboardId.F2KEY_MODE_SHORTCUT_IME_OR_SETTINGS;
}
}
@Override @Override
public boolean equals(Object other) { public boolean equals(Object other) {
return other instanceof KeyboardId && equals((KeyboardId) other); return other instanceof KeyboardId && equals((KeyboardId) other);
@ -214,17 +186,15 @@ public class KeyboardId {
@Override @Override
public String toString() { public String toString() {
return String.format("[%s %s %s%d %s %s %s%s%s%s%s%s%s]", return String.format("[%s %s %s%d %s %s %s%s%s%s%s]",
elementIdToName(mElementId), elementIdToName(mElementId),
mLocale, mLocale,
(mOrientation == 1 ? "port" : "land"), mWidth, (mOrientation == 1 ? "port" : "land"), mWidth,
modeName(mMode), modeName(mMode),
imeAction(), imeAction(),
f2KeyModeName(f2KeyMode()),
(mClobberSettingsKey ? " clobberSettingsKey" : ""), (mClobberSettingsKey ? " clobberSettingsKey" : ""),
(navigateAction() ? " navigateAction" : ""), (navigateAction() ? " navigateAction" : ""),
(passwordInput() ? " passwordInput" : ""), (passwordInput() ? " passwordInput" : ""),
(hasSettingsKey() ? " hasSettingsKey" : ""),
(mShortcutKeyEnabled ? " shortcutKeyEnabled" : ""), (mShortcutKeyEnabled ? " shortcutKeyEnabled" : ""),
(mHasShortcutKey ? " hasShortcutKey" : "") (mHasShortcutKey ? " hasShortcutKey" : "")
); );
@ -270,14 +240,4 @@ public class KeyboardId {
return (actionId == IME_ACTION_CUSTOM_LABEL) ? "actionCustomLabel" return (actionId == IME_ACTION_CUSTOM_LABEL) ? "actionCustomLabel"
: EditorInfoCompatUtils.imeActionName(actionId); : EditorInfoCompatUtils.imeActionName(actionId);
} }
public static String f2KeyModeName(int f2KeyMode) {
switch (f2KeyMode) {
case F2KEY_MODE_NONE: return "none";
case F2KEY_MODE_SETTINGS: return "settings";
case F2KEY_MODE_SHORTCUT_IME: return "shortcutIme";
case F2KEY_MODE_SHORTCUT_IME_OR_SETTINGS: return "shortcutImeOrSettings";
default: return null;
}
}
} }

View File

@ -98,7 +98,6 @@ public class KeyboardSet {
int mMode; int mMode;
EditorInfo mEditorInfo; EditorInfo mEditorInfo;
boolean mTouchPositionCorrectionEnabled; boolean mTouchPositionCorrectionEnabled;
boolean mSettingsKeyEnabled;
boolean mVoiceKeyEnabled; boolean mVoiceKeyEnabled;
boolean mVoiceKeyOnMain; boolean mVoiceKeyOnMain;
boolean mNoSettingsKey; boolean mNoSettingsKey;
@ -193,8 +192,8 @@ public class KeyboardSet {
final boolean hasShortcutKey = params.mVoiceKeyEnabled final boolean hasShortcutKey = params.mVoiceKeyEnabled
&& (isSymbols != params.mVoiceKeyOnMain); && (isSymbols != params.mVoiceKeyOnMain);
return new KeyboardId(keyboardSetElementId, params.mLocale, params.mOrientation, return new KeyboardId(keyboardSetElementId, params.mLocale, params.mOrientation,
params.mWidth, params.mMode, params.mEditorInfo, params.mSettingsKeyEnabled, params.mWidth, params.mMode, params.mEditorInfo, params.mNoSettingsKey,
params.mNoSettingsKey, params.mVoiceKeyEnabled, hasShortcutKey); params.mVoiceKeyEnabled, hasShortcutKey);
} }
public static class Builder { public static class Builder {
@ -237,9 +236,7 @@ public class KeyboardSet {
return this; return this;
} }
public Builder setOptions(boolean settingsKeyEnabled, boolean voiceKeyEnabled, public Builder setOptions(boolean voiceKeyEnabled, boolean voiceKeyOnMain) {
boolean voiceKeyOnMain) {
mParams.mSettingsKeyEnabled = settingsKeyEnabled;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
final boolean deprecatedNoMicrophone = Utils.inPrivateImeOptions( final boolean deprecatedNoMicrophone = Utils.inPrivateImeOptions(
null, LatinIME.IME_OPTION_NO_MICROPHONE_COMPAT, mEditorInfo); null, LatinIME.IME_OPTION_NO_MICROPHONE_COMPAT, mEditorInfo);

View File

@ -35,7 +35,6 @@ import com.android.inputmethod.latin.InputView;
import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinIME;
import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.Settings;
import com.android.inputmethod.latin.SettingsValues; import com.android.inputmethod.latin.SettingsValues;
import com.android.inputmethod.latin.SubtypeSwitcher; import com.android.inputmethod.latin.SubtypeSwitcher;
import com.android.inputmethod.latin.Utils; import com.android.inputmethod.latin.Utils;
@ -133,7 +132,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
mSubtypeSwitcher.currentSubtypeContainsExtraValueKey( mSubtypeSwitcher.currentSubtypeContainsExtraValueKey(
LatinIME.SUBTYPE_EXTRA_VALUE_SUPPORT_TOUCH_POSITION_CORRECTION)); LatinIME.SUBTYPE_EXTRA_VALUE_SUPPORT_TOUCH_POSITION_CORRECTION));
builder.setOptions( builder.setOptions(
settingsValues.isSettingsKeyEnabled(),
settingsValues.isVoiceKeyEnabled(editorInfo), settingsValues.isVoiceKeyEnabled(editorInfo),
settingsValues.isVoiceKeyOnMain()); settingsValues.isVoiceKeyOnMain());
mKeyboardSet = builder.build(); mKeyboardSet = builder.build();
@ -404,8 +402,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
if (PREF_KEYBOARD_LAYOUT.equals(key)) { if (PREF_KEYBOARD_LAYOUT.equals(key)) {
final int themeIndex = getKeyboardThemeIndex(mInputMethodService, sharedPreferences); final int themeIndex = getKeyboardThemeIndex(mInputMethodService, sharedPreferences);
postSetInputView(createInputView(themeIndex, false)); postSetInputView(createInputView(themeIndex, false));
} else if (Settings.PREF_SHOW_SETTINGS_KEY.equals(key)) {
postSetInputView(createInputView(mThemeIndex, true));
} }
} }

View File

@ -65,7 +65,6 @@ public class Settings extends InputMethodSettingsActivity
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";
public static final String PREF_POPUP_ON = "popup_on"; public static final String PREF_POPUP_ON = "popup_on";
public static final String PREF_SHOW_SETTINGS_KEY = "show_settings_key";
public static final String PREF_VOICE_MODE = "voice_mode"; public static final String PREF_VOICE_MODE = "voice_mode";
public static final String PREF_CORRECTION_SETTINGS = "correction_settings"; public static final String PREF_CORRECTION_SETTINGS = "correction_settings";
public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key"; public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key";
@ -96,7 +95,6 @@ public class Settings extends InputMethodSettingsActivity
private PreferenceScreen mKeypressVibrationDurationSettingsPref; private PreferenceScreen mKeypressVibrationDurationSettingsPref;
private PreferenceScreen mKeypressSoundVolumeSettingsPref; private PreferenceScreen mKeypressSoundVolumeSettingsPref;
private ListPreference mVoicePreference; private ListPreference mVoicePreference;
private CheckBoxPreference mShowSettingsKeyPreference;
private ListPreference mShowCorrectionSuggestionsPreference; private ListPreference mShowCorrectionSuggestionsPreference;
private ListPreference mAutoCorrectionThresholdPreference; private ListPreference mAutoCorrectionThresholdPreference;
private ListPreference mKeyPreviewPopupDismissDelay; private ListPreference mKeyPreviewPopupDismissDelay;
@ -147,7 +145,6 @@ public class Settings extends InputMethodSettingsActivity
mInputLanguageSelection = (PreferenceScreen) findPreference(PREF_SUBTYPES_SETTINGS); mInputLanguageSelection = (PreferenceScreen) findPreference(PREF_SUBTYPES_SETTINGS);
mInputLanguageSelection.setOnPreferenceClickListener(this); mInputLanguageSelection.setOnPreferenceClickListener(this);
mVoicePreference = (ListPreference) findPreference(PREF_VOICE_MODE); mVoicePreference = (ListPreference) findPreference(PREF_VOICE_MODE);
mShowSettingsKeyPreference = (CheckBoxPreference) findPreference(PREF_SHOW_SETTINGS_KEY);
mShowCorrectionSuggestionsPreference = mShowCorrectionSuggestionsPreference =
(ListPreference) findPreference(PREF_SHOW_SUGGESTIONS_SETTING); (ListPreference) findPreference(PREF_SHOW_SUGGESTIONS_SETTING);
SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
@ -178,10 +175,6 @@ public class Settings extends InputMethodSettingsActivity
final PreferenceGroup miscSettings = final PreferenceGroup miscSettings =
(PreferenceGroup) findPreference(PREF_MISC_SETTINGS); (PreferenceGroup) findPreference(PREF_MISC_SETTINGS);
if (!SettingsValues.isShowSettingsKeyOptionEnabled(res)) {
generalSettings.removePreference(mShowSettingsKeyPreference);
}
final boolean showVoiceKeyOption = res.getBoolean( final boolean showVoiceKeyOption = res.getBoolean(
R.bool.config_enable_show_voice_key_option); R.bool.config_enable_show_voice_key_option);
if (!showVoiceKeyOption) { if (!showVoiceKeyOption) {

View File

@ -49,7 +49,6 @@ public class SettingsValues {
public final boolean mVibrateOn; public final boolean mVibrateOn;
public final boolean mSoundOn; public final boolean mSoundOn;
public final boolean mKeyPreviewPopupOn; public final boolean mKeyPreviewPopupOn;
private final boolean mShowSettingsKey;
private final String mVoiceMode; private final String mVoiceMode;
private final String mAutoCorrectionThresholdRawValue; private final String mAutoCorrectionThresholdRawValue;
public final String mShowSuggestionsSetting; public final String mShowSuggestionsSetting;
@ -118,7 +117,6 @@ public class SettingsValues {
mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON,
res.getBoolean(R.bool.config_default_sound_enabled)); res.getBoolean(R.bool.config_default_sound_enabled));
mKeyPreviewPopupOn = isKeyPreviewPopupEnabled(prefs, res); mKeyPreviewPopupOn = isKeyPreviewPopupEnabled(prefs, res);
mShowSettingsKey = isSettingsKeyShown(prefs, res);
final String voiceModeMain = res.getString(R.string.voice_mode_main); final String voiceModeMain = res.getString(R.string.voice_mode_main);
final String voiceModeOff = res.getString(R.string.voice_mode_off); final String voiceModeOff = res.getString(R.string.voice_mode_off);
mVoiceMode = prefs.getString(Settings.PREF_VOICE_MODE, voiceModeMain); mVoiceMode = prefs.getString(Settings.PREF_VOICE_MODE, voiceModeMain);
@ -202,19 +200,6 @@ public class SettingsValues {
return wordSeparators; return wordSeparators;
} }
private static boolean isSettingsKeyShown(final SharedPreferences prefs, final Resources res) {
final boolean defaultShowSettingsKey = res.getBoolean(
R.bool.config_default_show_settings_key);
return isShowSettingsKeyOptionEnabled(res)
? prefs.getBoolean(Settings.PREF_SHOW_SETTINGS_KEY, defaultShowSettingsKey)
: defaultShowSettingsKey;
}
public static boolean isShowSettingsKeyOptionEnabled(final Resources resources) {
// TODO: Read this once and for all into a public final member
return resources.getBoolean(R.bool.config_enable_show_settings_key_option);
}
private static boolean isVibrateOn(final Context context, final SharedPreferences prefs, private static boolean isVibrateOn(final Context context, final SharedPreferences prefs,
final Resources res) { final Resources res) {
final boolean hasVibrator = VibratorCompatWrapper.getInstance(context).hasVibrator(); final boolean hasVibrator = VibratorCompatWrapper.getInstance(context).hasVibrator();
@ -306,10 +291,6 @@ public class SettingsValues {
return autoCorrectionThreshold; return autoCorrectionThreshold;
} }
public boolean isSettingsKeyEnabled() {
return mShowSettingsKey;
}
public boolean isVoiceKeyEnabled(final EditorInfo editorInfo) { public boolean isVoiceKeyEnabled(final EditorInfo editorInfo) {
final boolean shortcutImeEnabled = SubtypeSwitcher.getInstance().isShortcutImeEnabled(); final boolean shortcutImeEnabled = SubtypeSwitcher.getInstance().isShortcutImeEnabled();
final int inputType = (editorInfo != null) ? editorInfo.inputType : 0; final int inputType = (editorInfo != null) ? editorInfo.inputType : 0;