Rename LatinKeyboardView to MainKeyboardView
Change-Id: I8f3123b8d727c7beb72e226f80c17794f89c8b60main
parent
a4f762ff98
commit
c8e45ddb03
|
@ -32,7 +32,7 @@
|
||||||
*;
|
*;
|
||||||
}
|
}
|
||||||
|
|
||||||
-keep class com.android.inputmethod.keyboard.LatinKeyboardView {
|
-keep class com.android.inputmethod.keyboard.MainKeyboardView {
|
||||||
# Keep getter/setter methods for ObjectAnimator
|
# Keep getter/setter methods for ObjectAnimator
|
||||||
int getLanguageOnSpacebarAnimAlpha();
|
int getLanguageOnSpacebarAnimAlpha();
|
||||||
void setLanguageOnSpacebarAnimAlpha(int);
|
void setLanguageOnSpacebarAnimAlpha(int);
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
style="?attr/suggestionsStripBackgroundStyle" />
|
style="?attr/suggestionsStripBackgroundStyle" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.android.inputmethod.keyboard.LatinKeyboardView
|
<com.android.inputmethod.keyboard.MainKeyboardView
|
||||||
android:id="@+id/keyboard_view"
|
android:id="@+id/keyboard_view"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<string name="config_default_keyboard_theme_index" translatable="false">5</string>
|
<string name="config_default_keyboard_theme_index" translatable="false">5</string>
|
||||||
<integer name="config_max_more_keys_column">5</integer>
|
<integer name="config_max_more_keys_column">5</integer>
|
||||||
<!--
|
<!--
|
||||||
Configuration for LatinKeyboardView
|
Configuration for MainKeyboardView
|
||||||
-->
|
-->
|
||||||
<dimen name="config_key_hysteresis_distance">40.0dp</dimen>
|
<dimen name="config_key_hysteresis_distance">40.0dp</dimen>
|
||||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<string name="config_default_keyboard_theme_index" translatable="false">5</string>
|
<string name="config_default_keyboard_theme_index" translatable="false">5</string>
|
||||||
<integer name="config_max_more_keys_column">5</integer>
|
<integer name="config_max_more_keys_column">5</integer>
|
||||||
<!--
|
<!--
|
||||||
Configuration for LatinKeyboardView
|
Configuration for MainKeyboardView
|
||||||
-->
|
-->
|
||||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||||
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||||
|
|
|
@ -18,13 +18,10 @@
|
||||||
<declare-styleable name="KeyboardTheme">
|
<declare-styleable name="KeyboardTheme">
|
||||||
<!-- Keyboard style -->
|
<!-- Keyboard style -->
|
||||||
<attr name="keyboardStyle" format="reference" />
|
<attr name="keyboardStyle" format="reference" />
|
||||||
<!-- TODO: Get rid of latinKeyboardStyle -->
|
|
||||||
<!-- LatinKeyboard style -->
|
|
||||||
<attr name="latinKeyboardStyle" format="reference" />
|
|
||||||
<!-- KeyboardView style -->
|
<!-- KeyboardView style -->
|
||||||
<attr name="keyboardViewStyle" format="reference" />
|
<attr name="keyboardViewStyle" format="reference" />
|
||||||
<!-- LatinKeyboardView style -->
|
<!-- MainKeyboardView style -->
|
||||||
<attr name="latinKeyboardViewStyle" format="reference" />
|
<attr name="mainKeyboardViewStyle" format="reference" />
|
||||||
<!-- MoreKeysKeyboard style -->
|
<!-- MoreKeysKeyboard style -->
|
||||||
<attr name="moreKeysKeyboardStyle" format="reference" />
|
<attr name="moreKeysKeyboardStyle" format="reference" />
|
||||||
<!-- MoreKeysKeyboardView style -->
|
<!-- MoreKeysKeyboardView style -->
|
||||||
|
@ -123,7 +120,7 @@
|
||||||
</attr>
|
</attr>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="LatinKeyboardView">
|
<declare-styleable name="MainKeyboardView">
|
||||||
<attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
|
<attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
|
||||||
<attr name="autoCorrectionSpacebarLedIcon" format="reference" />
|
<attr name="autoCorrectionSpacebarLedIcon" format="reference" />
|
||||||
<!-- Size of the text for spacebar language label, in the proportion of key height. -->
|
<!-- Size of the text for spacebar language label, in the proportion of key height. -->
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
-->
|
-->
|
||||||
<integer name="config_key_preview_linger_timeout">70</integer>
|
<integer name="config_key_preview_linger_timeout">70</integer>
|
||||||
<!--
|
<!--
|
||||||
Configuration for LatinKeyboardView
|
Configuration for MainKeyboardView
|
||||||
-->
|
-->
|
||||||
<dimen name="config_key_hysteresis_distance">8.0dp</dimen>
|
<dimen name="config_key_hysteresis_distance">8.0dp</dimen>
|
||||||
<integer name="config_touch_noise_threshold_time">40</integer>
|
<integer name="config_touch_noise_threshold_time">40</integer>
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<item name="shadowColor">#BB000000</item>
|
<item name="shadowColor">#BB000000</item>
|
||||||
<item name="shadowRadius">2.75</item>
|
<item name="shadowRadius">2.75</item>
|
||||||
<item name="backgroundDimAlpha">128</item>
|
<item name="backgroundDimAlpha">128</item>
|
||||||
<!-- Common attributes of LatinKeyboardView -->
|
<!-- Common attributes of MainKeyboardView -->
|
||||||
<item name="keyHysteresisDistance">@dimen/config_key_hysteresis_distance</item>
|
<item name="keyHysteresisDistance">@dimen/config_key_hysteresis_distance</item>
|
||||||
<item name="touchNoiseThresholdTime">@integer/config_touch_noise_threshold_time</item>
|
<item name="touchNoiseThresholdTime">@integer/config_touch_noise_threshold_time</item>
|
||||||
<item name="touchNoiseThresholdDistance">@dimen/config_touch_noise_threshold_distance</item>
|
<item name="touchNoiseThresholdDistance">@dimen/config_touch_noise_threshold_distance</item>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item>
|
<item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView"
|
name="MainKeyboardView"
|
||||||
parent="KeyboardView">
|
parent="KeyboardView">
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
||||||
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led</item>
|
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led</item>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
<item name="keyBackground">@drawable/btn_keyboard_key3</item>
|
<item name="keyBackground">@drawable/btn_keyboard_key3</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView.HighContrast"
|
name="MainKeyboardView.HighContrast"
|
||||||
parent="KeyboardView.HighContrast"
|
parent="KeyboardView.HighContrast"
|
||||||
>
|
>
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
<item name="shadowColor">#FFFFFFFF</item>
|
<item name="shadowColor">#FFFFFFFF</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView.Stone"
|
name="MainKeyboardView.Stone"
|
||||||
parent="KeyboardView.Stone"
|
parent="KeyboardView.Stone"
|
||||||
>
|
>
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
<item name="keyTextStyle">bold</item>
|
<item name="keyTextStyle">bold</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView.Stone.Bold"
|
name="MainKeyboardView.Stone.Bold"
|
||||||
parent="KeyboardView.Stone.Bold"
|
parent="KeyboardView.Stone.Bold"
|
||||||
>
|
>
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
<item name="keyTextStyle">bold</item>
|
<item name="keyTextStyle">bold</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView.Gingerbread"
|
name="MainKeyboardView.Gingerbread"
|
||||||
parent="KeyboardView.Gingerbread"
|
parent="KeyboardView.Gingerbread"
|
||||||
>
|
>
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
<item name="autoCorrectionSpacebarLedEnabled">true</item>
|
||||||
|
@ -316,7 +316,7 @@
|
||||||
<item name="shadowRadius">0.0</item>
|
<item name="shadowRadius">0.0</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView.IceCreamSandwich"
|
name="MainKeyboardView.IceCreamSandwich"
|
||||||
parent="KeyboardView.IceCreamSandwich"
|
parent="KeyboardView.IceCreamSandwich"
|
||||||
>
|
>
|
||||||
<item name="autoCorrectionSpacebarLedEnabled">false</item>
|
<item name="autoCorrectionSpacebarLedEnabled">false</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme.HighContrast" parent="KeyboardIcons">
|
<style name="KeyboardTheme.HighContrast" parent="KeyboardIcons">
|
||||||
<item name="keyboardStyle">@style/Keyboard.HighContrast</item>
|
<item name="keyboardStyle">@style/Keyboard.HighContrast</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.HighContrast</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.HighContrast</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.HighContrast</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.HighContrast</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme" parent="KeyboardIcons">
|
<style name="KeyboardTheme" parent="KeyboardIcons">
|
||||||
<item name="keyboardStyle">@style/Keyboard</item>
|
<item name="keyboardStyle">@style/Keyboard</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView</item>
|
<item name="keyboardViewStyle">@style/KeyboardView</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme.Gingerbread" parent="KeyboardIcons">
|
<style name="KeyboardTheme.Gingerbread" parent="KeyboardIcons">
|
||||||
<item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
|
<item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Gingerbread</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.Gingerbread</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Gingerbread</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Gingerbread</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme.IceCreamSandwich" parent="KeyboardIcons.IceCreamSandwich">
|
<style name="KeyboardTheme.IceCreamSandwich" parent="KeyboardIcons.IceCreamSandwich">
|
||||||
<item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
|
<item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.IceCreamSandwich</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.IceCreamSandwich</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.IceCreamSandwich</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme.Stone.Bold" parent="KeyboardIcons.Black">
|
<style name="KeyboardTheme.Stone.Bold" parent="KeyboardIcons.Black">
|
||||||
<item name="keyboardStyle">@style/Keyboard.Stone.Bold</item>
|
<item name="keyboardStyle">@style/Keyboard.Stone.Bold</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Stone.Bold</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Stone.Bold</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone.Bold</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.Stone.Bold</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<style name="KeyboardTheme.Stone" parent="KeyboardIcons.Black">
|
<style name="KeyboardTheme.Stone" parent="KeyboardIcons.Black">
|
||||||
<item name="keyboardStyle">@style/Keyboard.Stone</item>
|
<item name="keyboardStyle">@style/Keyboard.Stone</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Stone</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Stone</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone</item>
|
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.Stone</item>
|
||||||
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
||||||
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
||||||
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
|
|
|
@ -29,7 +29,7 @@ import android.view.ViewConfiguration;
|
||||||
import com.android.inputmethod.keyboard.Key;
|
import com.android.inputmethod.keyboard.Key;
|
||||||
import com.android.inputmethod.keyboard.Keyboard;
|
import com.android.inputmethod.keyboard.Keyboard;
|
||||||
import com.android.inputmethod.keyboard.KeyboardId;
|
import com.android.inputmethod.keyboard.KeyboardId;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboardView;
|
import com.android.inputmethod.keyboard.MainKeyboardView;
|
||||||
import com.android.inputmethod.keyboard.PointerTracker;
|
import com.android.inputmethod.keyboard.PointerTracker;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat {
|
||||||
private static final AccessibleKeyboardViewProxy sInstance = new AccessibleKeyboardViewProxy();
|
private static final AccessibleKeyboardViewProxy sInstance = new AccessibleKeyboardViewProxy();
|
||||||
|
|
||||||
private InputMethodService mInputMethod;
|
private InputMethodService mInputMethod;
|
||||||
private LatinKeyboardView mView;
|
private MainKeyboardView mView;
|
||||||
private AccessibilityEntityProvider mAccessibilityNodeProvider;
|
private AccessibilityEntityProvider mAccessibilityNodeProvider;
|
||||||
|
|
||||||
private Key mLastHoverKey = null;
|
private Key mLastHoverKey = null;
|
||||||
|
@ -70,7 +70,7 @@ public class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat {
|
||||||
*
|
*
|
||||||
* @param view The view to wrap.
|
* @param view The view to wrap.
|
||||||
*/
|
*/
|
||||||
public void setView(LatinKeyboardView view) {
|
public void setView(MainKeyboardView view) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
// Ignore null views.
|
// Ignore null views.
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
private boolean mForceNonDistinctMultitouch;
|
private boolean mForceNonDistinctMultitouch;
|
||||||
|
|
||||||
private InputView mCurrentInputView;
|
private InputView mCurrentInputView;
|
||||||
private LatinKeyboardView mKeyboardView;
|
private MainKeyboardView mKeyboardView;
|
||||||
private LatinIME mLatinIME;
|
private LatinIME mLatinIME;
|
||||||
private Resources mResources;
|
private Resources mResources;
|
||||||
private SettingsValues mCurrentSettingsValues;
|
private SettingsValues mCurrentSettingsValues;
|
||||||
|
@ -268,7 +268,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
// Implements {@link KeyboardState.SwitchActions}.
|
// Implements {@link KeyboardState.SwitchActions}.
|
||||||
@Override
|
@Override
|
||||||
public void startDoubleTapTimer() {
|
public void startDoubleTapTimer() {
|
||||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
final MainKeyboardView keyboardView = getKeyboardView();
|
||||||
if (keyboardView != null) {
|
if (keyboardView != null) {
|
||||||
final TimerProxy timer = keyboardView.getTimerProxy();
|
final TimerProxy timer = keyboardView.getTimerProxy();
|
||||||
timer.startDoubleTapTimer();
|
timer.startDoubleTapTimer();
|
||||||
|
@ -278,7 +278,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
// Implements {@link KeyboardState.SwitchActions}.
|
// Implements {@link KeyboardState.SwitchActions}.
|
||||||
@Override
|
@Override
|
||||||
public void cancelDoubleTapTimer() {
|
public void cancelDoubleTapTimer() {
|
||||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
final MainKeyboardView keyboardView = getKeyboardView();
|
||||||
if (keyboardView != null) {
|
if (keyboardView != null) {
|
||||||
final TimerProxy timer = keyboardView.getTimerProxy();
|
final TimerProxy timer = keyboardView.getTimerProxy();
|
||||||
timer.cancelDoubleTapTimer();
|
timer.cancelDoubleTapTimer();
|
||||||
|
@ -288,7 +288,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
// Implements {@link KeyboardState.SwitchActions}.
|
// Implements {@link KeyboardState.SwitchActions}.
|
||||||
@Override
|
@Override
|
||||||
public boolean isInDoubleTapTimeout() {
|
public boolean isInDoubleTapTimeout() {
|
||||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
final MainKeyboardView keyboardView = getKeyboardView();
|
||||||
return (keyboardView != null)
|
return (keyboardView != null)
|
||||||
? keyboardView.getTimerProxy().isInDoubleTapTimeout() : false;
|
? keyboardView.getTimerProxy().isInDoubleTapTimeout() : false;
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
// Implements {@link KeyboardState.SwitchActions}.
|
// Implements {@link KeyboardState.SwitchActions}.
|
||||||
@Override
|
@Override
|
||||||
public void startLongPressTimer(int code) {
|
public void startLongPressTimer(int code) {
|
||||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
final MainKeyboardView keyboardView = getKeyboardView();
|
||||||
if (keyboardView != null) {
|
if (keyboardView != null) {
|
||||||
final TimerProxy timer = keyboardView.getTimerProxy();
|
final TimerProxy timer = keyboardView.getTimerProxy();
|
||||||
timer.startLongPressTimer(code);
|
timer.startLongPressTimer(code);
|
||||||
|
@ -306,7 +306,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
// Implements {@link KeyboardState.SwitchActions}.
|
// Implements {@link KeyboardState.SwitchActions}.
|
||||||
@Override
|
@Override
|
||||||
public void cancelLongPressTimer() {
|
public void cancelLongPressTimer() {
|
||||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
final MainKeyboardView keyboardView = getKeyboardView();
|
||||||
if (keyboardView != null) {
|
if (keyboardView != null) {
|
||||||
final TimerProxy timer = keyboardView.getTimerProxy();
|
final TimerProxy timer = keyboardView.getTimerProxy();
|
||||||
timer.cancelLongPressTimer();
|
timer.cancelLongPressTimer();
|
||||||
|
@ -346,7 +346,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
mState.onCodeInput(code, isSinglePointer(), mLatinIME.getCurrentAutoCapsState());
|
mState.onCodeInput(code, isSinglePointer(), mLatinIME.getCurrentAutoCapsState());
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardView getKeyboardView() {
|
public MainKeyboardView getKeyboardView() {
|
||||||
return mKeyboardView;
|
return mKeyboardView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mKeyboardView = (LatinKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view);
|
mKeyboardView = (MainKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view);
|
||||||
mKeyboardView.setKeyboardActionListener(mLatinIME);
|
mKeyboardView.setKeyboardActionListener(mLatinIME);
|
||||||
if (mForceNonDistinctMultitouch) {
|
if (mForceNonDistinctMultitouch) {
|
||||||
mKeyboardView.setDistinctMultitouch(false);
|
mKeyboardView.setDistinctMultitouch(false);
|
||||||
|
|
|
@ -65,9 +65,9 @@ import java.util.WeakHashMap;
|
||||||
* @attr ref R.styleable#KeyboardView_verticalCorrection
|
* @attr ref R.styleable#KeyboardView_verticalCorrection
|
||||||
* @attr ref R.styleable#KeyboardView_popupLayout
|
* @attr ref R.styleable#KeyboardView_popupLayout
|
||||||
*/
|
*/
|
||||||
public class LatinKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
|
public class MainKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
|
||||||
SuddenJumpingTouchEventHandler.ProcessMotionEvent {
|
SuddenJumpingTouchEventHandler.ProcessMotionEvent {
|
||||||
private static final String TAG = LatinKeyboardView.class.getSimpleName();
|
private static final String TAG = MainKeyboardView.class.getSimpleName();
|
||||||
|
|
||||||
// TODO: Kill process when the usability study mode was changed.
|
// TODO: Kill process when the usability study mode was changed.
|
||||||
private static final boolean ENABLE_USABILITY_STUDY_LOG = LatinImeLogger.sUsabilityStudy;
|
private static final boolean ENABLE_USABILITY_STUDY_LOG = LatinImeLogger.sUsabilityStudy;
|
||||||
|
@ -119,7 +119,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
|
|
||||||
private final KeyTimerHandler mKeyTimerHandler;
|
private final KeyTimerHandler mKeyTimerHandler;
|
||||||
|
|
||||||
private static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardView>
|
private static class KeyTimerHandler extends StaticInnerHandlerWrapper<MainKeyboardView>
|
||||||
implements TimerProxy {
|
implements TimerProxy {
|
||||||
private static final int MSG_REPEAT_KEY = 1;
|
private static final int MSG_REPEAT_KEY = 1;
|
||||||
private static final int MSG_LONGPRESS_KEY = 2;
|
private static final int MSG_LONGPRESS_KEY = 2;
|
||||||
|
@ -128,14 +128,14 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
|
|
||||||
private final KeyTimerParams mParams;
|
private final KeyTimerParams mParams;
|
||||||
|
|
||||||
public KeyTimerHandler(LatinKeyboardView outerInstance, KeyTimerParams params) {
|
public KeyTimerHandler(MainKeyboardView outerInstance, KeyTimerParams params) {
|
||||||
super(outerInstance);
|
super(outerInstance);
|
||||||
mParams = params;
|
mParams = params;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
final LatinKeyboardView keyboardView = getOuterInstance();
|
final MainKeyboardView keyboardView = getOuterInstance();
|
||||||
final PointerTracker tracker = (PointerTracker) msg.obj;
|
final PointerTracker tracker = (PointerTracker) msg.obj;
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case MSG_REPEAT_KEY:
|
case MSG_REPEAT_KEY:
|
||||||
|
@ -249,7 +249,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
if (isTyping) {
|
if (isTyping) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final LatinKeyboardView keyboardView = getOuterInstance();
|
final MainKeyboardView keyboardView = getOuterInstance();
|
||||||
cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeinAnimator,
|
cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeinAnimator,
|
||||||
keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator);
|
keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator);
|
||||||
}
|
}
|
||||||
|
@ -299,13 +299,13 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
mTouchNoiseThresholdDistance = 0;
|
mTouchNoiseThresholdDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PointerTrackerParams(TypedArray latinKeyboardViewAttr) {
|
public PointerTrackerParams(TypedArray mainKeyboardViewAttr) {
|
||||||
mSlidingKeyInputEnabled = latinKeyboardViewAttr.getBoolean(
|
mSlidingKeyInputEnabled = mainKeyboardViewAttr.getBoolean(
|
||||||
R.styleable.LatinKeyboardView_slidingKeyInputEnable, false);
|
R.styleable.MainKeyboardView_slidingKeyInputEnable, false);
|
||||||
mTouchNoiseThresholdTime = latinKeyboardViewAttr.getInt(
|
mTouchNoiseThresholdTime = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_touchNoiseThresholdTime, 0);
|
R.styleable.MainKeyboardView_touchNoiseThresholdTime, 0);
|
||||||
mTouchNoiseThresholdDistance = latinKeyboardViewAttr.getDimension(
|
mTouchNoiseThresholdDistance = mainKeyboardViewAttr.getDimension(
|
||||||
R.styleable.LatinKeyboardView_touchNoiseThresholdDistance, 0);
|
R.styleable.MainKeyboardView_touchNoiseThresholdDistance, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,25 +316,25 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
public final int mLongPressShiftKeyTimeout;
|
public final int mLongPressShiftKeyTimeout;
|
||||||
public final int mIgnoreAltCodeKeyTimeout;
|
public final int mIgnoreAltCodeKeyTimeout;
|
||||||
|
|
||||||
public KeyTimerParams(TypedArray latinKeyboardViewAttr) {
|
public KeyTimerParams(TypedArray mainKeyboardViewAttr) {
|
||||||
mKeyRepeatStartTimeout = latinKeyboardViewAttr.getInt(
|
mKeyRepeatStartTimeout = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_keyRepeatStartTimeout, 0);
|
R.styleable.MainKeyboardView_keyRepeatStartTimeout, 0);
|
||||||
mKeyRepeatInterval = latinKeyboardViewAttr.getInt(
|
mKeyRepeatInterval = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_keyRepeatInterval, 0);
|
R.styleable.MainKeyboardView_keyRepeatInterval, 0);
|
||||||
mLongPressKeyTimeout = latinKeyboardViewAttr.getInt(
|
mLongPressKeyTimeout = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_longPressKeyTimeout, 0);
|
R.styleable.MainKeyboardView_longPressKeyTimeout, 0);
|
||||||
mLongPressShiftKeyTimeout = latinKeyboardViewAttr.getInt(
|
mLongPressShiftKeyTimeout = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_longPressShiftKeyTimeout, 0);
|
R.styleable.MainKeyboardView_longPressShiftKeyTimeout, 0);
|
||||||
mIgnoreAltCodeKeyTimeout = latinKeyboardViewAttr.getInt(
|
mIgnoreAltCodeKeyTimeout = mainKeyboardViewAttr.getInt(
|
||||||
R.styleable.LatinKeyboardView_ignoreAltCodeKeyTimeout, 0);
|
R.styleable.MainKeyboardView_ignoreAltCodeKeyTimeout, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardView(Context context, AttributeSet attrs) {
|
public MainKeyboardView(Context context, AttributeSet attrs) {
|
||||||
this(context, attrs, R.attr.latinKeyboardViewStyle);
|
this(context, attrs, R.attr.mainKeyboardViewStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatinKeyboardView(Context context, AttributeSet attrs, int defStyle) {
|
public MainKeyboardView(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
|
|
||||||
mTouchScreenRegulator = new SuddenJumpingTouchEventHandler(getContext(), this);
|
mTouchScreenRegulator = new SuddenJumpingTouchEventHandler(getContext(), this);
|
||||||
|
@ -348,35 +348,35 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack);
|
PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack);
|
||||||
|
|
||||||
final TypedArray a = context.obtainStyledAttributes(
|
final TypedArray a = context.obtainStyledAttributes(
|
||||||
attrs, R.styleable.LatinKeyboardView, defStyle, R.style.LatinKeyboardView);
|
attrs, R.styleable.MainKeyboardView, defStyle, R.style.MainKeyboardView);
|
||||||
mAutoCorrectionSpacebarLedEnabled = a.getBoolean(
|
mAutoCorrectionSpacebarLedEnabled = a.getBoolean(
|
||||||
R.styleable.LatinKeyboardView_autoCorrectionSpacebarLedEnabled, false);
|
R.styleable.MainKeyboardView_autoCorrectionSpacebarLedEnabled, false);
|
||||||
mAutoCorrectionSpacebarLedIcon = a.getDrawable(
|
mAutoCorrectionSpacebarLedIcon = a.getDrawable(
|
||||||
R.styleable.LatinKeyboardView_autoCorrectionSpacebarLedIcon);
|
R.styleable.MainKeyboardView_autoCorrectionSpacebarLedIcon);
|
||||||
mSpacebarTextRatio = a.getFraction(R.styleable.LatinKeyboardView_spacebarTextRatio,
|
mSpacebarTextRatio = a.getFraction(R.styleable.MainKeyboardView_spacebarTextRatio,
|
||||||
1000, 1000, 1) / 1000.0f;
|
1000, 1000, 1) / 1000.0f;
|
||||||
mSpacebarTextColor = a.getColor(R.styleable.LatinKeyboardView_spacebarTextColor, 0);
|
mSpacebarTextColor = a.getColor(R.styleable.MainKeyboardView_spacebarTextColor, 0);
|
||||||
mSpacebarTextShadowColor = a.getColor(
|
mSpacebarTextShadowColor = a.getColor(
|
||||||
R.styleable.LatinKeyboardView_spacebarTextShadowColor, 0);
|
R.styleable.MainKeyboardView_spacebarTextShadowColor, 0);
|
||||||
mLanguageOnSpacebarFinalAlpha = a.getInt(
|
mLanguageOnSpacebarFinalAlpha = a.getInt(
|
||||||
R.styleable.LatinKeyboardView_languageOnSpacebarFinalAlpha,
|
R.styleable.MainKeyboardView_languageOnSpacebarFinalAlpha,
|
||||||
Constants.Color.ALPHA_OPAQUE);
|
Constants.Color.ALPHA_OPAQUE);
|
||||||
final int languageOnSpacebarFadeoutAnimatorResId = a.getResourceId(
|
final int languageOnSpacebarFadeoutAnimatorResId = a.getResourceId(
|
||||||
R.styleable.LatinKeyboardView_languageOnSpacebarFadeoutAnimator, 0);
|
R.styleable.MainKeyboardView_languageOnSpacebarFadeoutAnimator, 0);
|
||||||
final int altCodeKeyWhileTypingFadeoutAnimatorResId = a.getResourceId(
|
final int altCodeKeyWhileTypingFadeoutAnimatorResId = a.getResourceId(
|
||||||
R.styleable.LatinKeyboardView_altCodeKeyWhileTypingFadeoutAnimator, 0);
|
R.styleable.MainKeyboardView_altCodeKeyWhileTypingFadeoutAnimator, 0);
|
||||||
final int altCodeKeyWhileTypingFadeinAnimatorResId = a.getResourceId(
|
final int altCodeKeyWhileTypingFadeinAnimatorResId = a.getResourceId(
|
||||||
R.styleable.LatinKeyboardView_altCodeKeyWhileTypingFadeinAnimator, 0);
|
R.styleable.MainKeyboardView_altCodeKeyWhileTypingFadeinAnimator, 0);
|
||||||
|
|
||||||
final KeyTimerParams keyTimerParams = new KeyTimerParams(a);
|
final KeyTimerParams keyTimerParams = new KeyTimerParams(a);
|
||||||
mPointerTrackerParams = new PointerTrackerParams(a);
|
mPointerTrackerParams = new PointerTrackerParams(a);
|
||||||
|
|
||||||
final float keyHysteresisDistance = a.getDimension(
|
final float keyHysteresisDistance = a.getDimension(
|
||||||
R.styleable.LatinKeyboardView_keyHysteresisDistance, 0);
|
R.styleable.MainKeyboardView_keyHysteresisDistance, 0);
|
||||||
mKeyDetector = new KeyDetector(keyHysteresisDistance);
|
mKeyDetector = new KeyDetector(keyHysteresisDistance);
|
||||||
mKeyTimerHandler = new KeyTimerHandler(this, keyTimerParams);
|
mKeyTimerHandler = new KeyTimerHandler(this, keyTimerParams);
|
||||||
mConfigShowMoreKeysKeyboardAtTouchedPoint = a.getBoolean(
|
mConfigShowMoreKeysKeyboardAtTouchedPoint = a.getBoolean(
|
||||||
R.styleable.LatinKeyboardView_showMoreKeysKeyboardAtTouchedPoint, false);
|
R.styleable.MainKeyboardView_showMoreKeysKeyboardAtTouchedPoint, false);
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
|
||||||
PointerTracker.setParameters(mPointerTrackerParams);
|
PointerTracker.setParameters(mPointerTrackerParams);
|
||||||
|
@ -471,7 +471,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
|
final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
|
||||||
mSpacebarTextSize = keyHeight * mSpacebarTextRatio;
|
mSpacebarTextSize = keyHeight * mSpacebarTextRatio;
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinKeyboardView_setKeyboard(keyboard);
|
ResearchLogger.mainKeyboardView_setKeyboard(keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This always needs to be set since the accessibility state can
|
// This always needs to be set since the accessibility state can
|
||||||
|
@ -515,7 +515,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
// to properly show the splash screen, which requires that the window token of the
|
// to properly show the splash screen, which requires that the window token of the
|
||||||
// KeyboardView be non-null.
|
// KeyboardView be non-null.
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.getInstance().latinKeyboardView_onAttachedToWindow();
|
ResearchLogger.getInstance().mainKeyboardView_onAttachedToWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,7 +568,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
*/
|
*/
|
||||||
protected boolean onLongPress(Key parentKey, PointerTracker tracker) {
|
protected boolean onLongPress(Key parentKey, PointerTracker tracker) {
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinKeyboardView_onLongPress();
|
ResearchLogger.mainKeyboardView_onLongPress();
|
||||||
}
|
}
|
||||||
final int primaryCode = parentKey.mCode;
|
final int primaryCode = parentKey.mCode;
|
||||||
if (parentKey.hasEmbeddedMoreKey()) {
|
if (parentKey.hasEmbeddedMoreKey()) {
|
||||||
|
@ -719,7 +719,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinKeyboardView_processMotionEvent(me, action, eventTime, index, id,
|
ResearchLogger.mainKeyboardView_processMotionEvent(me, action, eventTime, index, id,
|
||||||
x, y);
|
x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
+ pointerSize + "," + pointerPressure);
|
+ pointerSize + "," + pointerPressure);
|
||||||
}
|
}
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinKeyboardView_processMotionEvent(me, action, eventTime,
|
ResearchLogger.mainKeyboardView_processMotionEvent(me, action, eventTime,
|
||||||
i, pointerId, px, py);
|
i, pointerId, px, py);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -119,7 +119,7 @@ public class PointerTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parameters for pointer handling.
|
// Parameters for pointer handling.
|
||||||
private static LatinKeyboardView.PointerTrackerParams sParams;
|
private static MainKeyboardView.PointerTrackerParams sParams;
|
||||||
private static int sTouchNoiseThresholdDistanceSquared;
|
private static int sTouchNoiseThresholdDistanceSquared;
|
||||||
private static boolean sNeedsPhantomSuddenMoveEventHack;
|
private static boolean sNeedsPhantomSuddenMoveEventHack;
|
||||||
|
|
||||||
|
@ -198,11 +198,11 @@ public class PointerTracker {
|
||||||
}
|
}
|
||||||
sNeedsPhantomSuddenMoveEventHack = needsPhantomSuddenMoveEventHack;
|
sNeedsPhantomSuddenMoveEventHack = needsPhantomSuddenMoveEventHack;
|
||||||
|
|
||||||
setParameters(LatinKeyboardView.PointerTrackerParams.DEFAULT);
|
setParameters(MainKeyboardView.PointerTrackerParams.DEFAULT);
|
||||||
updateGestureInputEnabledState(null, false /* gestureInputEnabled */);
|
updateGestureInputEnabledState(null, false /* gestureInputEnabled */);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setParameters(LatinKeyboardView.PointerTrackerParams params) {
|
public static void setParameters(MainKeyboardView.PointerTrackerParams params) {
|
||||||
sParams = params;
|
sParams = params;
|
||||||
sTouchNoiseThresholdDistanceSquared = (int)(
|
sTouchNoiseThresholdDistanceSquared = (int)(
|
||||||
params.mTouchNoiseThresholdDistance * params.mTouchNoiseThresholdDistance);
|
params.mTouchNoiseThresholdDistance * params.mTouchNoiseThresholdDistance);
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class SuddenJumpingTouchEventHandler {
|
||||||
* the sudden moves subside, a DOWN event is simulated for the second key.
|
* the sudden moves subside, a DOWN event is simulated for the second key.
|
||||||
* @param me the motion event
|
* @param me the motion event
|
||||||
* @return true if the event was consumed, so that it doesn't continue to be handled by
|
* @return true if the event was consumed, so that it doesn't continue to be handled by
|
||||||
* {@link LatinKeyboardView}.
|
* {@link MainKeyboardView}.
|
||||||
*/
|
*/
|
||||||
private boolean handleSuddenJumping(MotionEvent me) {
|
private boolean handleSuddenJumping(MotionEvent me) {
|
||||||
if (!mNeedsSuddenJumpingHack)
|
if (!mNeedsSuddenJumpingHack)
|
||||||
|
|
|
@ -67,7 +67,7 @@ import com.android.inputmethod.keyboard.KeyboardActionListener;
|
||||||
import com.android.inputmethod.keyboard.KeyboardId;
|
import com.android.inputmethod.keyboard.KeyboardId;
|
||||||
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||||
import com.android.inputmethod.keyboard.KeyboardView;
|
import com.android.inputmethod.keyboard.KeyboardView;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboardView;
|
import com.android.inputmethod.keyboard.MainKeyboardView;
|
||||||
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
import com.android.inputmethod.latin.suggestions.SuggestionsView;
|
import com.android.inputmethod.latin.suggestions.SuggestionsView;
|
||||||
|
@ -598,7 +598,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private void onStartInputViewInternal(EditorInfo editorInfo, boolean restarting) {
|
private void onStartInputViewInternal(EditorInfo editorInfo, boolean restarting) {
|
||||||
super.onStartInputView(editorInfo, restarting);
|
super.onStartInputView(editorInfo, restarting);
|
||||||
final KeyboardSwitcher switcher = mKeyboardSwitcher;
|
final KeyboardSwitcher switcher = mKeyboardSwitcher;
|
||||||
LatinKeyboardView inputView = switcher.getKeyboardView();
|
MainKeyboardView inputView = switcher.getKeyboardView();
|
||||||
|
|
||||||
if (editorInfo == null) {
|
if (editorInfo == null) {
|
||||||
Log.e(TAG, "Null EditorInfo in onStartInputView()");
|
Log.e(TAG, "Null EditorInfo in onStartInputView()");
|
||||||
|
@ -889,7 +889,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private void setSuggestionStripShownInternal(boolean shown, boolean needsInputViewShown) {
|
private void setSuggestionStripShownInternal(boolean shown, boolean needsInputViewShown) {
|
||||||
// TODO: Modify this if we support suggestions with hard keyboard
|
// TODO: Modify this if we support suggestions with hard keyboard
|
||||||
if (onEvaluateInputViewShown() && mSuggestionsContainer != null) {
|
if (onEvaluateInputViewShown() && mSuggestionsContainer != null) {
|
||||||
final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
|
final MainKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
|
||||||
final boolean inputViewShown = (keyboardView != null) ? keyboardView.isShown() : false;
|
final boolean inputViewShown = (keyboardView != null) ? keyboardView.isShown() : false;
|
||||||
final boolean shouldShowSuggestions = shown
|
final boolean shouldShowSuggestions = shown
|
||||||
&& (needsInputViewShown ? inputViewShown : true);
|
&& (needsInputViewShown ? inputViewShown : true);
|
||||||
|
@ -950,7 +950,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final int extraHeight = extractHeight + backingHeight + suggestionsHeight;
|
final int extraHeight = extractHeight + backingHeight + suggestionsHeight;
|
||||||
int touchY = extraHeight;
|
int touchY = extraHeight;
|
||||||
// Need to set touchable region only if input view is being shown
|
// Need to set touchable region only if input view is being shown
|
||||||
final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
|
final MainKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
|
||||||
if (keyboardView != null && keyboardView.isShown()) {
|
if (keyboardView != null && keyboardView.isShown()) {
|
||||||
if (mSuggestionsContainer.getVisibility() == View.VISIBLE) {
|
if (mSuggestionsContainer.getVisibility() == View.VISIBLE) {
|
||||||
touchY -= suggestionsHeight;
|
touchY -= suggestionsHeight;
|
||||||
|
@ -1643,7 +1643,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private void handleClose() {
|
private void handleClose() {
|
||||||
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
|
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
|
||||||
requestHideSelf(0);
|
requestHideSelf(0);
|
||||||
LatinKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
MainKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
||||||
if (inputView != null)
|
if (inputView != null)
|
||||||
inputView.closing();
|
inputView.closing();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,11 @@ import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.inputmethodservice.InputMethodService;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.Paint.Style;
|
import android.graphics.Paint.Style;
|
||||||
|
import android.inputmethodservice.InputMethodService;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
@ -53,7 +53,7 @@ import com.android.inputmethod.keyboard.Keyboard;
|
||||||
import com.android.inputmethod.keyboard.KeyboardId;
|
import com.android.inputmethod.keyboard.KeyboardId;
|
||||||
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||||
import com.android.inputmethod.keyboard.KeyboardView;
|
import com.android.inputmethod.keyboard.KeyboardView;
|
||||||
import com.android.inputmethod.keyboard.LatinKeyboardView;
|
import com.android.inputmethod.keyboard.MainKeyboardView;
|
||||||
import com.android.inputmethod.latin.Dictionary;
|
import com.android.inputmethod.latin.Dictionary;
|
||||||
import com.android.inputmethod.latin.LatinIME;
|
import com.android.inputmethod.latin.LatinIME;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
|
@ -192,7 +192,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void latinKeyboardView_onAttachedToWindow() {
|
public void mainKeyboardView_onAttachedToWindow() {
|
||||||
maybeShowSplashScreen();
|
maybeShowSplashScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,9 +552,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
int height) {
|
int height) {
|
||||||
// TODO: Reimplement using a keyboard background image specific to the ResearchLogger
|
// TODO: Reimplement using a keyboard background image specific to the ResearchLogger
|
||||||
// and remove this method.
|
// and remove this method.
|
||||||
// The check for LatinKeyboardView ensures that a red border is only placed around
|
// The check for MainKeyboardView ensures that a red border is only placed around
|
||||||
// the main keyboard, not every keyboard.
|
// the main keyboard, not every keyboard.
|
||||||
if (IS_SHOWING_INDICATOR && isAllowedToLog() && view instanceof LatinKeyboardView) {
|
if (IS_SHOWING_INDICATOR && isAllowedToLog() && view instanceof MainKeyboardView) {
|
||||||
final int savedColor = paint.getColor();
|
final int savedColor = paint.getColor();
|
||||||
paint.setColor(Color.RED);
|
paint.setColor(Color.RED);
|
||||||
final Style savedStyle = paint.getStyle();
|
final Style savedStyle = paint.getStyle();
|
||||||
|
@ -876,11 +876,11 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
|
|
||||||
// Regular logging methods
|
// Regular logging methods
|
||||||
|
|
||||||
private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_PROCESSMOTIONEVENT = {
|
private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_PROCESSMOTIONEVENT = {
|
||||||
"LatinKeyboardViewProcessMotionEvent", "action", "eventTime", "id", "x", "y", "size",
|
"MainKeyboardViewProcessMotionEvent", "action", "eventTime", "id", "x", "y", "size",
|
||||||
"pressure"
|
"pressure"
|
||||||
};
|
};
|
||||||
public static void latinKeyboardView_processMotionEvent(final MotionEvent me, final int action,
|
public static void mainKeyboardView_processMotionEvent(final MotionEvent me, final int action,
|
||||||
final long eventTime, final int index, final int id, final int x, final int y) {
|
final long eventTime, final int index, final int id, final int x, final int y) {
|
||||||
if (me != null) {
|
if (me != null) {
|
||||||
final String actionString;
|
final String actionString;
|
||||||
|
@ -900,7 +900,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
actionString, eventTime, id, x, y, size, pressure
|
actionString, eventTime, id, x, y, size, pressure
|
||||||
};
|
};
|
||||||
getInstance().enqueuePotentiallyPrivateEvent(
|
getInstance().enqueuePotentiallyPrivateEvent(
|
||||||
EVENTKEYS_LATINKEYBOARDVIEW_PROCESSMOTIONEVENT, values);
|
EVENTKEYS_MAINKEYBOARDVIEW_PROCESSMOTIONEVENT, values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1129,20 +1129,20 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
EVENTKEYS_NULLVALUES);
|
EVENTKEYS_NULLVALUES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_ONLONGPRESS = {
|
private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_ONLONGPRESS = {
|
||||||
"LatinKeyboardViewOnLongPress"
|
"MainKeyboardViewOnLongPress"
|
||||||
};
|
};
|
||||||
public static void latinKeyboardView_onLongPress() {
|
public static void mainKeyboardView_onLongPress() {
|
||||||
getInstance().enqueueEvent(EVENTKEYS_LATINKEYBOARDVIEW_ONLONGPRESS, EVENTKEYS_NULLVALUES);
|
getInstance().enqueueEvent(EVENTKEYS_MAINKEYBOARDVIEW_ONLONGPRESS, EVENTKEYS_NULLVALUES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_SETKEYBOARD = {
|
private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_SETKEYBOARD = {
|
||||||
"LatinKeyboardViewSetKeyboard", "elementId", "locale", "orientation", "width",
|
"MainKeyboardViewSetKeyboard", "elementId", "locale", "orientation", "width",
|
||||||
"modeName", "action", "navigateNext", "navigatePrevious", "clobberSettingsKey",
|
"modeName", "action", "navigateNext", "navigatePrevious", "clobberSettingsKey",
|
||||||
"passwordInput", "shortcutKeyEnabled", "hasShortcutKey", "languageSwitchKeyEnabled",
|
"passwordInput", "shortcutKeyEnabled", "hasShortcutKey", "languageSwitchKeyEnabled",
|
||||||
"isMultiLine", "tw", "th", "keys"
|
"isMultiLine", "tw", "th", "keys"
|
||||||
};
|
};
|
||||||
public static void latinKeyboardView_setKeyboard(final Keyboard keyboard) {
|
public static void mainKeyboardView_setKeyboard(final Keyboard keyboard) {
|
||||||
if (keyboard != null) {
|
if (keyboard != null) {
|
||||||
final KeyboardId kid = keyboard.mId;
|
final KeyboardId kid = keyboard.mId;
|
||||||
final boolean isPasswordView = kid.passwordInput();
|
final boolean isPasswordView = kid.passwordInput();
|
||||||
|
@ -1166,7 +1166,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
keyboard.mOccupiedHeight,
|
keyboard.mOccupiedHeight,
|
||||||
keyboard.mKeys
|
keyboard.mKeys
|
||||||
};
|
};
|
||||||
getInstance().enqueueEvent(EVENTKEYS_LATINKEYBOARDVIEW_SETKEYBOARD, values);
|
getInstance().enqueueEvent(EVENTKEYS_MAINKEYBOARDVIEW_SETKEYBOARD, values);
|
||||||
getInstance().setIsPasswordView(isPasswordView);
|
getInstance().setIsPasswordView(isPasswordView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class SpacebarTextTests extends AndroidTestCase {
|
||||||
public void testAllFullDisplayName() {
|
public void testAllFullDisplayName() {
|
||||||
for (final InputMethodSubtype subtype : mSubtypesList) {
|
for (final InputMethodSubtype subtype : mSubtypesList) {
|
||||||
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
||||||
final String spacebarText = LatinKeyboardView.getFullDisplayName(subtype, mRes);
|
final String spacebarText = MainKeyboardView.getFullDisplayName(subtype, mRes);
|
||||||
final String languageName =
|
final String languageName =
|
||||||
SubtypeLocale.getSubtypeLocaleDisplayName(subtype.getLocale());
|
SubtypeLocale.getSubtypeLocaleDisplayName(subtype.getLocale());
|
||||||
if (SubtypeLocale.isNoLanguage(subtype)) {
|
if (SubtypeLocale.isNoLanguage(subtype)) {
|
||||||
|
@ -60,7 +60,7 @@ public class SpacebarTextTests extends AndroidTestCase {
|
||||||
public void testAllMiddleDisplayName() {
|
public void testAllMiddleDisplayName() {
|
||||||
for (final InputMethodSubtype subtype : mSubtypesList) {
|
for (final InputMethodSubtype subtype : mSubtypesList) {
|
||||||
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
||||||
final String spacebarText = LatinKeyboardView.getMiddleDisplayName(subtype);
|
final String spacebarText = MainKeyboardView.getMiddleDisplayName(subtype);
|
||||||
if (SubtypeLocale.isNoLanguage(subtype)) {
|
if (SubtypeLocale.isNoLanguage(subtype)) {
|
||||||
assertEquals(subtypeName,
|
assertEquals(subtypeName,
|
||||||
SubtypeLocale.getKeyboardLayoutSetName(subtype), spacebarText);
|
SubtypeLocale.getKeyboardLayoutSetName(subtype), spacebarText);
|
||||||
|
@ -76,7 +76,7 @@ public class SpacebarTextTests extends AndroidTestCase {
|
||||||
for (final InputMethodSubtype subtype : mSubtypesList) {
|
for (final InputMethodSubtype subtype : mSubtypesList) {
|
||||||
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype, mRes);
|
||||||
final Locale locale = SubtypeLocale.getSubtypeLocale(subtype);
|
final Locale locale = SubtypeLocale.getSubtypeLocale(subtype);
|
||||||
final String spacebarText = LatinKeyboardView.getShortDisplayName(subtype);
|
final String spacebarText = MainKeyboardView.getShortDisplayName(subtype);
|
||||||
final String languageCode = StringUtils.toTitleCase(locale.getLanguage(), locale);
|
final String languageCode = StringUtils.toTitleCase(locale.getLanguage(), locale);
|
||||||
if (SubtypeLocale.isNoLanguage(subtype)) {
|
if (SubtypeLocale.isNoLanguage(subtype)) {
|
||||||
assertEquals(subtypeName, "", spacebarText);
|
assertEquals(subtypeName, "", spacebarText);
|
||||||
|
@ -117,31 +117,31 @@ public class SpacebarTextTests extends AndroidTestCase {
|
||||||
context, SubtypeLocale.NO_LANGUAGE, "qwerty");
|
context, SubtypeLocale.NO_LANGUAGE, "qwerty");
|
||||||
|
|
||||||
assertEquals("en_US", "English (US)",
|
assertEquals("en_US", "English (US)",
|
||||||
LatinKeyboardView.getFullDisplayName(EN_US, mRes));
|
MainKeyboardView.getFullDisplayName(EN_US, mRes));
|
||||||
assertEquals("en_GB", "English (UK)",
|
assertEquals("en_GB", "English (UK)",
|
||||||
LatinKeyboardView.getFullDisplayName(EN_GB, mRes));
|
MainKeyboardView.getFullDisplayName(EN_GB, mRes));
|
||||||
assertEquals("fr ", "Français",
|
assertEquals("fr ", "Français",
|
||||||
LatinKeyboardView.getFullDisplayName(FR, mRes));
|
MainKeyboardView.getFullDisplayName(FR, mRes));
|
||||||
assertEquals("fr_CA", "Français (Canada)",
|
assertEquals("fr_CA", "Français (Canada)",
|
||||||
LatinKeyboardView.getFullDisplayName(FR_CA, mRes));
|
MainKeyboardView.getFullDisplayName(FR_CA, mRes));
|
||||||
assertEquals("de ", "Deutsch",
|
assertEquals("de ", "Deutsch",
|
||||||
LatinKeyboardView.getFullDisplayName(DE, mRes));
|
MainKeyboardView.getFullDisplayName(DE, mRes));
|
||||||
assertEquals("zz ", "QWERTY",
|
assertEquals("zz ", "QWERTY",
|
||||||
LatinKeyboardView.getFullDisplayName(ZZ, mRes));
|
MainKeyboardView.getFullDisplayName(ZZ, mRes));
|
||||||
|
|
||||||
assertEquals("en_US", "English", LatinKeyboardView.getMiddleDisplayName(EN_US));
|
assertEquals("en_US", "English", MainKeyboardView.getMiddleDisplayName(EN_US));
|
||||||
assertEquals("en_GB", "English", LatinKeyboardView.getMiddleDisplayName(EN_GB));
|
assertEquals("en_GB", "English", MainKeyboardView.getMiddleDisplayName(EN_GB));
|
||||||
assertEquals("fr ", "Français", LatinKeyboardView.getMiddleDisplayName(FR));
|
assertEquals("fr ", "Français", MainKeyboardView.getMiddleDisplayName(FR));
|
||||||
assertEquals("fr_CA", "Français", LatinKeyboardView.getMiddleDisplayName(FR_CA));
|
assertEquals("fr_CA", "Français", MainKeyboardView.getMiddleDisplayName(FR_CA));
|
||||||
assertEquals("de ", "Deutsch", LatinKeyboardView.getMiddleDisplayName(DE));
|
assertEquals("de ", "Deutsch", MainKeyboardView.getMiddleDisplayName(DE));
|
||||||
assertEquals("zz ", "QWERTY", LatinKeyboardView.getMiddleDisplayName(ZZ));
|
assertEquals("zz ", "QWERTY", MainKeyboardView.getMiddleDisplayName(ZZ));
|
||||||
|
|
||||||
assertEquals("en_US", "En", LatinKeyboardView.getShortDisplayName(EN_US));
|
assertEquals("en_US", "En", MainKeyboardView.getShortDisplayName(EN_US));
|
||||||
assertEquals("en_GB", "En", LatinKeyboardView.getShortDisplayName(EN_GB));
|
assertEquals("en_GB", "En", MainKeyboardView.getShortDisplayName(EN_GB));
|
||||||
assertEquals("fr ", "Fr", LatinKeyboardView.getShortDisplayName(FR));
|
assertEquals("fr ", "Fr", MainKeyboardView.getShortDisplayName(FR));
|
||||||
assertEquals("fr_CA", "Fr", LatinKeyboardView.getShortDisplayName(FR_CA));
|
assertEquals("fr_CA", "Fr", MainKeyboardView.getShortDisplayName(FR_CA));
|
||||||
assertEquals("de ", "De", LatinKeyboardView.getShortDisplayName(DE));
|
assertEquals("de ", "De", MainKeyboardView.getShortDisplayName(DE));
|
||||||
assertEquals("zz ", "", LatinKeyboardView.getShortDisplayName(ZZ));
|
assertEquals("zz ", "", MainKeyboardView.getShortDisplayName(ZZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAdditionalSubtype() {
|
public void testAdditionalSubtype() {
|
||||||
|
@ -155,22 +155,22 @@ public class SpacebarTextTests extends AndroidTestCase {
|
||||||
SubtypeLocale.NO_LANGUAGE, "azerty", null);
|
SubtypeLocale.NO_LANGUAGE, "azerty", null);
|
||||||
|
|
||||||
assertEquals("fr qwertz", "Français (QWERTZ)",
|
assertEquals("fr qwertz", "Français (QWERTZ)",
|
||||||
LatinKeyboardView.getFullDisplayName(FR_QWERTZ, mRes));
|
MainKeyboardView.getFullDisplayName(FR_QWERTZ, mRes));
|
||||||
assertEquals("de qwerty", "Deutsch (QWERTY)",
|
assertEquals("de qwerty", "Deutsch (QWERTY)",
|
||||||
LatinKeyboardView.getFullDisplayName(DE_QWERTY, mRes));
|
MainKeyboardView.getFullDisplayName(DE_QWERTY, mRes));
|
||||||
assertEquals("en_US azerty", "English (US) (AZERTY)",
|
assertEquals("en_US azerty", "English (US) (AZERTY)",
|
||||||
LatinKeyboardView.getFullDisplayName(US_AZERTY, mRes));
|
MainKeyboardView.getFullDisplayName(US_AZERTY, mRes));
|
||||||
assertEquals("zz azerty", "AZERTY",
|
assertEquals("zz azerty", "AZERTY",
|
||||||
LatinKeyboardView.getFullDisplayName(ZZ_AZERTY, mRes));
|
MainKeyboardView.getFullDisplayName(ZZ_AZERTY, mRes));
|
||||||
|
|
||||||
assertEquals("fr qwertz", "Français", LatinKeyboardView.getMiddleDisplayName(FR_QWERTZ));
|
assertEquals("fr qwertz", "Français", MainKeyboardView.getMiddleDisplayName(FR_QWERTZ));
|
||||||
assertEquals("de qwerty", "Deutsch", LatinKeyboardView.getMiddleDisplayName(DE_QWERTY));
|
assertEquals("de qwerty", "Deutsch", MainKeyboardView.getMiddleDisplayName(DE_QWERTY));
|
||||||
assertEquals("en_US azerty", "English", LatinKeyboardView.getMiddleDisplayName(US_AZERTY));
|
assertEquals("en_US azerty", "English", MainKeyboardView.getMiddleDisplayName(US_AZERTY));
|
||||||
assertEquals("zz azerty", "AZERTY", LatinKeyboardView.getMiddleDisplayName(ZZ_AZERTY));
|
assertEquals("zz azerty", "AZERTY", MainKeyboardView.getMiddleDisplayName(ZZ_AZERTY));
|
||||||
|
|
||||||
assertEquals("fr qwertz", "Fr", LatinKeyboardView.getShortDisplayName(FR_QWERTZ));
|
assertEquals("fr qwertz", "Fr", MainKeyboardView.getShortDisplayName(FR_QWERTZ));
|
||||||
assertEquals("de qwerty", "De", LatinKeyboardView.getShortDisplayName(DE_QWERTY));
|
assertEquals("de qwerty", "De", MainKeyboardView.getShortDisplayName(DE_QWERTY));
|
||||||
assertEquals("en_US azerty", "En", LatinKeyboardView.getShortDisplayName(US_AZERTY));
|
assertEquals("en_US azerty", "En", MainKeyboardView.getShortDisplayName(US_AZERTY));
|
||||||
assertEquals("zz azerty", "", LatinKeyboardView.getShortDisplayName(ZZ_AZERTY));
|
assertEquals("zz azerty", "", MainKeyboardView.getShortDisplayName(ZZ_AZERTY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue