Rename LatinKeyboardView to MainKeyboardView

Change-Id: I8f3123b8d727c7beb72e226f80c17794f89c8b60
diff --git a/java/proguard.flags b/java/proguard.flags
index b66c9a9..24b4c19 100644
--- a/java/proguard.flags
+++ b/java/proguard.flags
@@ -32,7 +32,7 @@
   *;
 }
 
--keep class com.android.inputmethod.keyboard.LatinKeyboardView {
+-keep class com.android.inputmethod.keyboard.MainKeyboardView {
   # Keep getter/setter methods for ObjectAnimator
   int getLanguageOnSpacebarAnimAlpha();
   void setLanguageOnSpacebarAnimAlpha(int);
diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml
index 3863534..99f8e27 100644
--- a/java/res/layout/input_view.xml
+++ b/java/res/layout/input_view.xml
@@ -56,7 +56,7 @@
             style="?attr/suggestionsStripBackgroundStyle" />
     </LinearLayout>
 
-    <com.android.inputmethod.keyboard.LatinKeyboardView
+    <com.android.inputmethod.keyboard.MainKeyboardView
         android:id="@+id/keyboard_view"
         android:layout_alignParentBottom="true"
         android:layout_width="match_parent"
diff --git a/java/res/values-sw600dp/config.xml b/java/res/values-sw600dp/config.xml
index 745d3b9..619169c 100644
--- a/java/res/values-sw600dp/config.xml
+++ b/java/res/values-sw600dp/config.xml
@@ -32,7 +32,7 @@
     <string name="config_default_keyboard_theme_index" translatable="false">5</string>
     <integer name="config_max_more_keys_column">5</integer>
     <!--
-        Configuration for LatinKeyboardView
+        Configuration for MainKeyboardView
     -->
     <dimen name="config_key_hysteresis_distance">40.0dp</dimen>
     <bool name="config_sliding_key_input_enabled">false</bool>
diff --git a/java/res/values-sw768dp/config.xml b/java/res/values-sw768dp/config.xml
index 5fcaeeb..27cb9ac 100644
--- a/java/res/values-sw768dp/config.xml
+++ b/java/res/values-sw768dp/config.xml
@@ -30,7 +30,7 @@
     <string name="config_default_keyboard_theme_index" translatable="false">5</string>
     <integer name="config_max_more_keys_column">5</integer>
     <!--
-        Configuration for LatinKeyboardView
+        Configuration for MainKeyboardView
     -->
     <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
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index a18371f..4589444 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -18,13 +18,10 @@
     <declare-styleable name="KeyboardTheme">
         <!-- Keyboard style -->
         <attr name="keyboardStyle" format="reference" />
-        <!-- TODO: Get rid of latinKeyboardStyle -->
-        <!-- LatinKeyboard style -->
-        <attr name="latinKeyboardStyle" format="reference" />
         <!-- KeyboardView style -->
         <attr name="keyboardViewStyle" format="reference" />
-        <!-- LatinKeyboardView style -->
-        <attr name="latinKeyboardViewStyle" format="reference" />
+        <!-- MainKeyboardView style -->
+        <attr name="mainKeyboardViewStyle" format="reference" />
         <!-- MoreKeysKeyboard style -->
         <attr name="moreKeysKeyboardStyle" format="reference" />
         <!-- MoreKeysKeyboardView style -->
@@ -123,7 +120,7 @@
         </attr>
     </declare-styleable>
 
-    <declare-styleable name="LatinKeyboardView">
+    <declare-styleable name="MainKeyboardView">
         <attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
         <attr name="autoCorrectionSpacebarLedIcon" format="reference" />
         <!-- Size of the text for spacebar language label, in the proportion of key height. -->
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index 589830d..50f46c3 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -48,7 +48,7 @@
     -->
     <integer name="config_key_preview_linger_timeout">70</integer>
     <!--
-         Configuration for LatinKeyboardView
+         Configuration for MainKeyboardView
     -->
     <dimen name="config_key_hysteresis_distance">8.0dp</dimen>
     <integer name="config_touch_noise_threshold_time">40</integer>
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index e9b0470..1f12821 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -67,7 +67,7 @@
         <item name="shadowColor">#BB000000</item>
         <item name="shadowRadius">2.75</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="touchNoiseThresholdTime">@integer/config_touch_noise_threshold_time</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>
     </style>
     <style
-        name="LatinKeyboardView"
+        name="MainKeyboardView"
         parent="KeyboardView">
         <item name="autoCorrectionSpacebarLedEnabled">true</item>
         <item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led</item>
@@ -155,7 +155,7 @@
         <item name="keyBackground">@drawable/btn_keyboard_key3</item>
     </style>
     <style
-        name="LatinKeyboardView.HighContrast"
+        name="MainKeyboardView.HighContrast"
         parent="KeyboardView.HighContrast"
     >
         <item name="autoCorrectionSpacebarLedEnabled">true</item>
@@ -190,7 +190,7 @@
         <item name="shadowColor">#FFFFFFFF</item>
     </style>
     <style
-        name="LatinKeyboardView.Stone"
+        name="MainKeyboardView.Stone"
         parent="KeyboardView.Stone"
     >
         <item name="autoCorrectionSpacebarLedEnabled">true</item>
@@ -230,7 +230,7 @@
         <item name="keyTextStyle">bold</item>
     </style>
     <style
-        name="LatinKeyboardView.Stone.Bold"
+        name="MainKeyboardView.Stone.Bold"
         parent="KeyboardView.Stone.Bold"
     >
         <item name="autoCorrectionSpacebarLedEnabled">true</item>
@@ -259,7 +259,7 @@
         <item name="keyTextStyle">bold</item>
     </style>
     <style
-        name="LatinKeyboardView.Gingerbread"
+        name="MainKeyboardView.Gingerbread"
         parent="KeyboardView.Gingerbread"
     >
         <item name="autoCorrectionSpacebarLedEnabled">true</item>
@@ -316,7 +316,7 @@
         <item name="shadowRadius">0.0</item>
     </style>
     <style
-        name="LatinKeyboardView.IceCreamSandwich"
+        name="MainKeyboardView.IceCreamSandwich"
         parent="KeyboardView.IceCreamSandwich"
     >
         <item name="autoCorrectionSpacebarLedEnabled">false</item>
diff --git a/java/res/values/themes-basic-highcontrast.xml b/java/res/values/themes-basic-highcontrast.xml
index 19df42c..f849919 100644
--- a/java/res/values/themes-basic-highcontrast.xml
+++ b/java/res/values/themes-basic-highcontrast.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme.HighContrast" parent="KeyboardIcons">
         <item name="keyboardStyle">@style/Keyboard.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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-basic.xml b/java/res/values/themes-basic.xml
index 5d47720..4bd9dc3 100644
--- a/java/res/values/themes-basic.xml
+++ b/java/res/values/themes-basic.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme" parent="KeyboardIcons">
         <item name="keyboardStyle">@style/Keyboard</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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gingerbread.xml
index a139798..00de9c5 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gingerbread.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme.Gingerbread" parent="KeyboardIcons">
         <item name="keyboardStyle">@style/Keyboard.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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index e6fd4f4..f605d15 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme.IceCreamSandwich" parent="KeyboardIcons.IceCreamSandwich">
         <item name="keyboardStyle">@style/Keyboard.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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
diff --git a/java/res/values/themes-stone-bold.xml b/java/res/values/themes-stone-bold.xml
index 47de99e..0065b1f 100644
--- a/java/res/values/themes-stone-bold.xml
+++ b/java/res/values/themes-stone-bold.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme.Stone.Bold" parent="KeyboardIcons.Black">
         <item name="keyboardStyle">@style/Keyboard.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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-stone.xml b/java/res/values/themes-stone.xml
index a0b39e3..941eb70 100644
--- a/java/res/values/themes-stone.xml
+++ b/java/res/values/themes-stone.xml
@@ -18,7 +18,7 @@
     <style name="KeyboardTheme.Stone" parent="KeyboardIcons.Black">
         <item name="keyboardStyle">@style/Keyboard.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="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
         <item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
index f6376d5..4ecbf82 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
@@ -29,7 +29,7 @@
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.keyboard.Keyboard;
 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.latin.R;
 
@@ -37,7 +37,7 @@
     private static final AccessibleKeyboardViewProxy sInstance = new AccessibleKeyboardViewProxy();
 
     private InputMethodService mInputMethod;
-    private LatinKeyboardView mView;
+    private MainKeyboardView mView;
     private AccessibilityEntityProvider mAccessibilityNodeProvider;
 
     private Key mLastHoverKey = null;
@@ -70,7 +70,7 @@
      *
      * @param view The view to wrap.
      */
-    public void setView(LatinKeyboardView view) {
+    public void setView(MainKeyboardView view) {
         if (view == null) {
             // Ignore null views.
             return;
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 38d78da..d637ab5 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -71,7 +71,7 @@
     private boolean mForceNonDistinctMultitouch;
 
     private InputView mCurrentInputView;
-    private LatinKeyboardView mKeyboardView;
+    private MainKeyboardView mKeyboardView;
     private LatinIME mLatinIME;
     private Resources mResources;
     private SettingsValues mCurrentSettingsValues;
@@ -268,7 +268,7 @@
     // Implements {@link KeyboardState.SwitchActions}.
     @Override
     public void startDoubleTapTimer() {
-        final LatinKeyboardView keyboardView = getKeyboardView();
+        final MainKeyboardView keyboardView = getKeyboardView();
         if (keyboardView != null) {
             final TimerProxy timer = keyboardView.getTimerProxy();
             timer.startDoubleTapTimer();
@@ -278,7 +278,7 @@
     // Implements {@link KeyboardState.SwitchActions}.
     @Override
     public void cancelDoubleTapTimer() {
-        final LatinKeyboardView keyboardView = getKeyboardView();
+        final MainKeyboardView keyboardView = getKeyboardView();
         if (keyboardView != null) {
             final TimerProxy timer = keyboardView.getTimerProxy();
             timer.cancelDoubleTapTimer();
@@ -288,7 +288,7 @@
     // Implements {@link KeyboardState.SwitchActions}.
     @Override
     public boolean isInDoubleTapTimeout() {
-        final LatinKeyboardView keyboardView = getKeyboardView();
+        final MainKeyboardView keyboardView = getKeyboardView();
         return (keyboardView != null)
                 ? keyboardView.getTimerProxy().isInDoubleTapTimeout() : false;
     }
@@ -296,7 +296,7 @@
     // Implements {@link KeyboardState.SwitchActions}.
     @Override
     public void startLongPressTimer(int code) {
-        final LatinKeyboardView keyboardView = getKeyboardView();
+        final MainKeyboardView keyboardView = getKeyboardView();
         if (keyboardView != null) {
             final TimerProxy timer = keyboardView.getTimerProxy();
             timer.startLongPressTimer(code);
@@ -306,7 +306,7 @@
     // Implements {@link KeyboardState.SwitchActions}.
     @Override
     public void cancelLongPressTimer() {
-        final LatinKeyboardView keyboardView = getKeyboardView();
+        final MainKeyboardView keyboardView = getKeyboardView();
         if (keyboardView != null) {
             final TimerProxy timer = keyboardView.getTimerProxy();
             timer.cancelLongPressTimer();
@@ -346,7 +346,7 @@
         mState.onCodeInput(code, isSinglePointer(), mLatinIME.getCurrentAutoCapsState());
     }
 
-    public LatinKeyboardView getKeyboardView() {
+    public MainKeyboardView getKeyboardView() {
         return mKeyboardView;
     }
 
@@ -372,7 +372,7 @@
             }
         }
 
-        mKeyboardView = (LatinKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view);
+        mKeyboardView = (MainKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view);
         mKeyboardView.setKeyboardActionListener(mLatinIME);
         if (mForceNonDistinctMultitouch) {
             mKeyboardView.setDistinctMultitouch(false);
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
similarity index 92%
rename from java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
rename to java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 0a7e7a2..8c234e4 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -65,9 +65,9 @@
  * @attr ref R.styleable#KeyboardView_verticalCorrection
  * @attr ref R.styleable#KeyboardView_popupLayout
  */
-public class LatinKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
+public class MainKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
         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.
     private static final boolean ENABLE_USABILITY_STUDY_LOG = LatinImeLogger.sUsabilityStudy;
@@ -119,7 +119,7 @@
 
     private final KeyTimerHandler mKeyTimerHandler;
 
-    private static class KeyTimerHandler extends StaticInnerHandlerWrapper<LatinKeyboardView>
+    private static class KeyTimerHandler extends StaticInnerHandlerWrapper<MainKeyboardView>
             implements TimerProxy {
         private static final int MSG_REPEAT_KEY = 1;
         private static final int MSG_LONGPRESS_KEY = 2;
@@ -128,14 +128,14 @@
 
         private final KeyTimerParams mParams;
 
-        public KeyTimerHandler(LatinKeyboardView outerInstance, KeyTimerParams params) {
+        public KeyTimerHandler(MainKeyboardView outerInstance, KeyTimerParams params) {
             super(outerInstance);
             mParams = params;
         }
 
         @Override
         public void handleMessage(Message msg) {
-            final LatinKeyboardView keyboardView = getOuterInstance();
+            final MainKeyboardView keyboardView = getOuterInstance();
             final PointerTracker tracker = (PointerTracker) msg.obj;
             switch (msg.what) {
             case MSG_REPEAT_KEY:
@@ -249,7 +249,7 @@
             if (isTyping) {
                 return;
             }
-            final LatinKeyboardView keyboardView = getOuterInstance();
+            final MainKeyboardView keyboardView = getOuterInstance();
             cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeinAnimator,
                     keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator);
         }
@@ -299,13 +299,13 @@
             mTouchNoiseThresholdDistance = 0;
         }
 
-        public PointerTrackerParams(TypedArray latinKeyboardViewAttr) {
-            mSlidingKeyInputEnabled = latinKeyboardViewAttr.getBoolean(
-                    R.styleable.LatinKeyboardView_slidingKeyInputEnable, false);
-            mTouchNoiseThresholdTime = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_touchNoiseThresholdTime, 0);
-            mTouchNoiseThresholdDistance = latinKeyboardViewAttr.getDimension(
-                    R.styleable.LatinKeyboardView_touchNoiseThresholdDistance, 0);
+        public PointerTrackerParams(TypedArray mainKeyboardViewAttr) {
+            mSlidingKeyInputEnabled = mainKeyboardViewAttr.getBoolean(
+                    R.styleable.MainKeyboardView_slidingKeyInputEnable, false);
+            mTouchNoiseThresholdTime = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_touchNoiseThresholdTime, 0);
+            mTouchNoiseThresholdDistance = mainKeyboardViewAttr.getDimension(
+                    R.styleable.MainKeyboardView_touchNoiseThresholdDistance, 0);
         }
     }
 
@@ -316,25 +316,25 @@
         public final int mLongPressShiftKeyTimeout;
         public final int mIgnoreAltCodeKeyTimeout;
 
-        public KeyTimerParams(TypedArray latinKeyboardViewAttr) {
-            mKeyRepeatStartTimeout = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_keyRepeatStartTimeout, 0);
-            mKeyRepeatInterval = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_keyRepeatInterval, 0);
-            mLongPressKeyTimeout = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_longPressKeyTimeout, 0);
-            mLongPressShiftKeyTimeout = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_longPressShiftKeyTimeout, 0);
-            mIgnoreAltCodeKeyTimeout = latinKeyboardViewAttr.getInt(
-                    R.styleable.LatinKeyboardView_ignoreAltCodeKeyTimeout, 0);
+        public KeyTimerParams(TypedArray mainKeyboardViewAttr) {
+            mKeyRepeatStartTimeout = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_keyRepeatStartTimeout, 0);
+            mKeyRepeatInterval = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_keyRepeatInterval, 0);
+            mLongPressKeyTimeout = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_longPressKeyTimeout, 0);
+            mLongPressShiftKeyTimeout = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_longPressShiftKeyTimeout, 0);
+            mIgnoreAltCodeKeyTimeout = mainKeyboardViewAttr.getInt(
+                    R.styleable.MainKeyboardView_ignoreAltCodeKeyTimeout, 0);
         }
     }
 
-    public LatinKeyboardView(Context context, AttributeSet attrs) {
-        this(context, attrs, R.attr.latinKeyboardViewStyle);
+    public MainKeyboardView(Context context, AttributeSet attrs) {
+        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);
 
         mTouchScreenRegulator = new SuddenJumpingTouchEventHandler(getContext(), this);
@@ -348,35 +348,35 @@
         PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack);
 
         final TypedArray a = context.obtainStyledAttributes(
-                attrs, R.styleable.LatinKeyboardView, defStyle, R.style.LatinKeyboardView);
+                attrs, R.styleable.MainKeyboardView, defStyle, R.style.MainKeyboardView);
         mAutoCorrectionSpacebarLedEnabled = a.getBoolean(
-                R.styleable.LatinKeyboardView_autoCorrectionSpacebarLedEnabled, false);
+                R.styleable.MainKeyboardView_autoCorrectionSpacebarLedEnabled, false);
         mAutoCorrectionSpacebarLedIcon = a.getDrawable(
-                R.styleable.LatinKeyboardView_autoCorrectionSpacebarLedIcon);
-        mSpacebarTextRatio = a.getFraction(R.styleable.LatinKeyboardView_spacebarTextRatio,
+                R.styleable.MainKeyboardView_autoCorrectionSpacebarLedIcon);
+        mSpacebarTextRatio = a.getFraction(R.styleable.MainKeyboardView_spacebarTextRatio,
                 1000, 1000, 1) / 1000.0f;
-        mSpacebarTextColor = a.getColor(R.styleable.LatinKeyboardView_spacebarTextColor, 0);
+        mSpacebarTextColor = a.getColor(R.styleable.MainKeyboardView_spacebarTextColor, 0);
         mSpacebarTextShadowColor = a.getColor(
-                R.styleable.LatinKeyboardView_spacebarTextShadowColor, 0);
+                R.styleable.MainKeyboardView_spacebarTextShadowColor, 0);
         mLanguageOnSpacebarFinalAlpha = a.getInt(
-                R.styleable.LatinKeyboardView_languageOnSpacebarFinalAlpha,
+                R.styleable.MainKeyboardView_languageOnSpacebarFinalAlpha,
                 Constants.Color.ALPHA_OPAQUE);
         final int languageOnSpacebarFadeoutAnimatorResId = a.getResourceId(
-                R.styleable.LatinKeyboardView_languageOnSpacebarFadeoutAnimator, 0);
+                R.styleable.MainKeyboardView_languageOnSpacebarFadeoutAnimator, 0);
         final int altCodeKeyWhileTypingFadeoutAnimatorResId = a.getResourceId(
-                R.styleable.LatinKeyboardView_altCodeKeyWhileTypingFadeoutAnimator, 0);
+                R.styleable.MainKeyboardView_altCodeKeyWhileTypingFadeoutAnimator, 0);
         final int altCodeKeyWhileTypingFadeinAnimatorResId = a.getResourceId(
-                R.styleable.LatinKeyboardView_altCodeKeyWhileTypingFadeinAnimator, 0);
+                R.styleable.MainKeyboardView_altCodeKeyWhileTypingFadeinAnimator, 0);
 
         final KeyTimerParams keyTimerParams = new KeyTimerParams(a);
         mPointerTrackerParams = new PointerTrackerParams(a);
 
         final float keyHysteresisDistance = a.getDimension(
-                R.styleable.LatinKeyboardView_keyHysteresisDistance, 0);
+                R.styleable.MainKeyboardView_keyHysteresisDistance, 0);
         mKeyDetector = new KeyDetector(keyHysteresisDistance);
         mKeyTimerHandler = new KeyTimerHandler(this, keyTimerParams);
         mConfigShowMoreKeysKeyboardAtTouchedPoint = a.getBoolean(
-                R.styleable.LatinKeyboardView_showMoreKeysKeyboardAtTouchedPoint, false);
+                R.styleable.MainKeyboardView_showMoreKeysKeyboardAtTouchedPoint, false);
         a.recycle();
 
         PointerTracker.setParameters(mPointerTrackerParams);
@@ -471,7 +471,7 @@
         final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
         mSpacebarTextSize = keyHeight * mSpacebarTextRatio;
         if (ProductionFlag.IS_EXPERIMENTAL) {
-            ResearchLogger.latinKeyboardView_setKeyboard(keyboard);
+            ResearchLogger.mainKeyboardView_setKeyboard(keyboard);
         }
 
         // This always needs to be set since the accessibility state can
@@ -515,7 +515,7 @@
         // to properly show the splash screen, which requires that the window token of the
         // KeyboardView be non-null.
         if (ProductionFlag.IS_EXPERIMENTAL) {
-            ResearchLogger.getInstance().latinKeyboardView_onAttachedToWindow();
+            ResearchLogger.getInstance().mainKeyboardView_onAttachedToWindow();
         }
     }
 
@@ -568,7 +568,7 @@
      */
     protected boolean onLongPress(Key parentKey, PointerTracker tracker) {
         if (ProductionFlag.IS_EXPERIMENTAL) {
-            ResearchLogger.latinKeyboardView_onLongPress();
+            ResearchLogger.mainKeyboardView_onLongPress();
         }
         final int primaryCode = parentKey.mCode;
         if (parentKey.hasEmbeddedMoreKey()) {
@@ -719,7 +719,7 @@
             }
         }
         if (ProductionFlag.IS_EXPERIMENTAL) {
-            ResearchLogger.latinKeyboardView_processMotionEvent(me, action, eventTime, index, id,
+            ResearchLogger.mainKeyboardView_processMotionEvent(me, action, eventTime, index, id,
                     x, y);
         }
 
@@ -791,7 +791,7 @@
                             + pointerSize + "," + pointerPressure);
                 }
                 if (ProductionFlag.IS_EXPERIMENTAL) {
-                    ResearchLogger.latinKeyboardView_processMotionEvent(me, action, eventTime,
+                    ResearchLogger.mainKeyboardView_processMotionEvent(me, action, eventTime,
                             i, pointerId, px, py);
                 }
             }
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 9542ee7..4a5ecf9 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -119,7 +119,7 @@
     }
 
     // Parameters for pointer handling.
-    private static LatinKeyboardView.PointerTrackerParams sParams;
+    private static MainKeyboardView.PointerTrackerParams sParams;
     private static int sTouchNoiseThresholdDistanceSquared;
     private static boolean sNeedsPhantomSuddenMoveEventHack;
 
@@ -198,11 +198,11 @@
         }
         sNeedsPhantomSuddenMoveEventHack = needsPhantomSuddenMoveEventHack;
 
-        setParameters(LatinKeyboardView.PointerTrackerParams.DEFAULT);
+        setParameters(MainKeyboardView.PointerTrackerParams.DEFAULT);
         updateGestureInputEnabledState(null, false /* gestureInputEnabled */);
     }
 
-    public static void setParameters(LatinKeyboardView.PointerTrackerParams params) {
+    public static void setParameters(MainKeyboardView.PointerTrackerParams params) {
         sParams = params;
         sTouchNoiseThresholdDistanceSquared = (int)(
                 params.mTouchNoiseThresholdDistance * params.mTouchNoiseThresholdDistance);
diff --git a/java/src/com/android/inputmethod/keyboard/SuddenJumpingTouchEventHandler.java b/java/src/com/android/inputmethod/keyboard/SuddenJumpingTouchEventHandler.java
index 6172073..2398c08 100644
--- a/java/src/com/android/inputmethod/keyboard/SuddenJumpingTouchEventHandler.java
+++ b/java/src/com/android/inputmethod/keyboard/SuddenJumpingTouchEventHandler.java
@@ -70,7 +70,7 @@
      * the sudden moves subside, a DOWN event is simulated for the second key.
      * @param me the motion event
      * @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) {
         if (!mNeedsSuddenJumpingHack)
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 4248921..49c2476 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -67,7 +67,7 @@
 import com.android.inputmethod.keyboard.KeyboardId;
 import com.android.inputmethod.keyboard.KeyboardSwitcher;
 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.define.ProductionFlag;
 import com.android.inputmethod.latin.suggestions.SuggestionsView;
@@ -598,7 +598,7 @@
     private void onStartInputViewInternal(EditorInfo editorInfo, boolean restarting) {
         super.onStartInputView(editorInfo, restarting);
         final KeyboardSwitcher switcher = mKeyboardSwitcher;
-        LatinKeyboardView inputView = switcher.getKeyboardView();
+        MainKeyboardView inputView = switcher.getKeyboardView();
 
         if (editorInfo == null) {
             Log.e(TAG, "Null EditorInfo in onStartInputView()");
@@ -889,7 +889,7 @@
     private void setSuggestionStripShownInternal(boolean shown, boolean needsInputViewShown) {
         // TODO: Modify this if we support suggestions with hard keyboard
         if (onEvaluateInputViewShown() && mSuggestionsContainer != null) {
-            final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
+            final MainKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
             final boolean inputViewShown = (keyboardView != null) ? keyboardView.isShown() : false;
             final boolean shouldShowSuggestions = shown
                     && (needsInputViewShown ? inputViewShown : true);
@@ -950,7 +950,7 @@
         final int extraHeight = extractHeight + backingHeight + suggestionsHeight;
         int touchY = extraHeight;
         // 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 (mSuggestionsContainer.getVisibility() == View.VISIBLE) {
                 touchY -= suggestionsHeight;
@@ -1643,7 +1643,7 @@
     private void handleClose() {
         commitTyped(LastComposedWord.NOT_A_SEPARATOR);
         requestHideSelf(0);
-        LatinKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
+        MainKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
         if (inputView != null)
             inputView.closing();
     }
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index d097ea4..d0523f6 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -27,11 +27,11 @@
 import android.content.SharedPreferences.Editor;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
-import android.inputmethodservice.InputMethodService;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Paint.Style;
+import android.inputmethodservice.InputMethodService;
 import android.os.Build;
 import android.os.IBinder;
 import android.text.TextUtils;
@@ -53,7 +53,7 @@
 import com.android.inputmethod.keyboard.KeyboardId;
 import com.android.inputmethod.keyboard.KeyboardSwitcher;
 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.LatinIME;
 import com.android.inputmethod.latin.R;
@@ -192,7 +192,7 @@
         }
     }
 
-    public void latinKeyboardView_onAttachedToWindow() {
+    public void mainKeyboardView_onAttachedToWindow() {
         maybeShowSplashScreen();
     }
 
@@ -552,9 +552,9 @@
             int height) {
         // TODO: Reimplement using a keyboard background image specific to the ResearchLogger
         // 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.
-        if (IS_SHOWING_INDICATOR && isAllowedToLog() && view instanceof LatinKeyboardView) {
+        if (IS_SHOWING_INDICATOR && isAllowedToLog() && view instanceof MainKeyboardView) {
             final int savedColor = paint.getColor();
             paint.setColor(Color.RED);
             final Style savedStyle = paint.getStyle();
@@ -876,11 +876,11 @@
 
     // Regular logging methods
 
-    private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_PROCESSMOTIONEVENT = {
-        "LatinKeyboardViewProcessMotionEvent", "action", "eventTime", "id", "x", "y", "size",
+    private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_PROCESSMOTIONEVENT = {
+        "MainKeyboardViewProcessMotionEvent", "action", "eventTime", "id", "x", "y", "size",
         "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) {
         if (me != null) {
             final String actionString;
@@ -900,7 +900,7 @@
                 actionString, eventTime, id, x, y, size, pressure
             };
             getInstance().enqueuePotentiallyPrivateEvent(
-                    EVENTKEYS_LATINKEYBOARDVIEW_PROCESSMOTIONEVENT, values);
+                    EVENTKEYS_MAINKEYBOARDVIEW_PROCESSMOTIONEVENT, values);
         }
     }
 
@@ -1129,20 +1129,20 @@
                 EVENTKEYS_NULLVALUES);
     }
 
-    private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_ONLONGPRESS = {
-        "LatinKeyboardViewOnLongPress"
+    private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_ONLONGPRESS = {
+        "MainKeyboardViewOnLongPress"
     };
-    public static void latinKeyboardView_onLongPress() {
-        getInstance().enqueueEvent(EVENTKEYS_LATINKEYBOARDVIEW_ONLONGPRESS, EVENTKEYS_NULLVALUES);
+    public static void mainKeyboardView_onLongPress() {
+        getInstance().enqueueEvent(EVENTKEYS_MAINKEYBOARDVIEW_ONLONGPRESS, EVENTKEYS_NULLVALUES);
     }
 
-    private static final String[] EVENTKEYS_LATINKEYBOARDVIEW_SETKEYBOARD = {
-        "LatinKeyboardViewSetKeyboard", "elementId", "locale", "orientation", "width",
+    private static final String[] EVENTKEYS_MAINKEYBOARDVIEW_SETKEYBOARD = {
+        "MainKeyboardViewSetKeyboard", "elementId", "locale", "orientation", "width",
         "modeName", "action", "navigateNext", "navigatePrevious", "clobberSettingsKey",
         "passwordInput", "shortcutKeyEnabled", "hasShortcutKey", "languageSwitchKeyEnabled",
         "isMultiLine", "tw", "th", "keys"
     };
-    public static void latinKeyboardView_setKeyboard(final Keyboard keyboard) {
+    public static void mainKeyboardView_setKeyboard(final Keyboard keyboard) {
         if (keyboard != null) {
             final KeyboardId kid = keyboard.mId;
             final boolean isPasswordView = kid.passwordInput();
@@ -1166,7 +1166,7 @@
                     keyboard.mOccupiedHeight,
                     keyboard.mKeys
                 };
-            getInstance().enqueueEvent(EVENTKEYS_LATINKEYBOARDVIEW_SETKEYBOARD, values);
+            getInstance().enqueueEvent(EVENTKEYS_MAINKEYBOARDVIEW_SETKEYBOARD, values);
             getInstance().setIsPasswordView(isPasswordView);
         }
     }