diff options
author | 2013-08-30 07:23:42 +0000 | |
---|---|---|
committer | 2013-08-30 07:23:42 +0000 | |
commit | aabc97233826da69edbadfc7c1465a505a1fe2ec (patch) | |
tree | 574863d0acfbb617427ae4a4030a68fdec82ca0c /java/src | |
parent | d7791a93b0dee268a9e97f06fe5abcf6082e0ed1 (diff) | |
download | latinime-aabc97233826da69edbadfc7c1465a505a1fe2ec.tar.gz latinime-aabc97233826da69edbadfc7c1465a505a1fe2ec.tar.xz latinime-aabc97233826da69edbadfc7c1465a505a1fe2ec.zip |
Revert "Support Emoji keyboard"
This reverts commit d7791a93b0dee268a9e97f06fe5abcf6082e0ed1.
Change-Id: I5ca4c0227f97540e8a22b487b5056dfa3611082b
Diffstat (limited to 'java/src')
3 files changed, 1 insertions, 46 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 0208249d1..098c8b3df 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -66,9 +66,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { private SharedPreferences mPrefs; private InputView mCurrentInputView; - private View mMainKeyboardFrame; private MainKeyboardView mKeyboardView; - private EmojiKeyboardView mEmojiKeyboardView; private LatinIME mLatinIME; private Resources mResources; @@ -169,8 +167,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } private void setKeyboard(final Keyboard keyboard) { - // Make {@link MainKeyboardView} visible and hide {@link EmojiKeyboardView}. - setMainKeyboardFrame(); final MainKeyboardView keyboardView = mKeyboardView; final Keyboard oldKeyboard = keyboardView.getKeyboard(); keyboardView.setKeyboard(keyboard); @@ -257,18 +253,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { setKeyboard(mKeyboardLayoutSet.getKeyboard(KeyboardId.ELEMENT_SYMBOLS)); } - private void setMainKeyboardFrame() { - mMainKeyboardFrame.setVisibility(View.VISIBLE); - mEmojiKeyboardView.setVisibility(View.GONE); - } - - // Implements {@link KeyboardState.SwitchActions}. - @Override - public void setEmojiKeyboard() { - mMainKeyboardFrame.setVisibility(View.GONE); - mEmojiKeyboardView.setVisibility(View.VISIBLE); - } - // Implements {@link KeyboardState.SwitchActions}. @Override public void requestUpdatingShiftState() { @@ -320,16 +304,10 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { setContextThemeWrapper(mLatinIME, mKeyboardTheme); mCurrentInputView = (InputView)LayoutInflater.from(mThemeContext).inflate( R.layout.input_view, null); - mMainKeyboardFrame = mCurrentInputView.findViewById(R.id.main_keyboard_frame); - mEmojiKeyboardView = (EmojiKeyboardView)mCurrentInputView.findViewById( - R.id.emoji_keyboard_view); mKeyboardView = (MainKeyboardView) mCurrentInputView.findViewById(R.id.keyboard_view); mKeyboardView.setHardwareAcceleratedDrawingEnabled(isHardwareAcceleratedDrawingEnabled); mKeyboardView.setKeyboardActionListener(mLatinIME); - mEmojiKeyboardView.setHardwareAcceleratedDrawingEnabled( - isHardwareAcceleratedDrawingEnabled); - mEmojiKeyboardView.setKeyboardActionListener(mLatinIME); // This always needs to be set since the accessibility state can // potentially change without the input view being re-created. diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java index 089db12a2..0b10a1d1a 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java @@ -46,7 +46,6 @@ public final class KeyboardState { public void setAlphabetShiftLockedKeyboard(); public void setAlphabetShiftLockShiftedKeyboard(); public void setSymbolsKeyboard(); - public void setEmojiKeyboard(); /** * Request to call back {@link KeyboardState#onUpdateShiftState(int, int)}. @@ -72,10 +71,7 @@ public final class KeyboardState { private static final int SWITCH_STATE_MOMENTARY_ALPHA_SHIFT = 5; private int mSwitchState = SWITCH_STATE_ALPHA; - // TODO: Consolidate these two mode booleans into one integer to distinguish between alphabet, - // symbols, and emoji mode. private boolean mIsAlphabetMode; - private boolean mIsEmojiMode; private AlphabetShiftState mAlphabetShiftState = new AlphabetShiftState(); private boolean mPrevMainKeyboardWasShiftLocked; private int mRecapitalizeMode; @@ -90,7 +86,6 @@ public final class KeyboardState { public boolean mIsValid; public boolean mIsAlphabetMode; public boolean mIsAlphabetShiftLocked; - public boolean mIsEmojiMode; public int mShiftMode; @Override @@ -99,8 +94,6 @@ public final class KeyboardState { if (mIsAlphabetMode) { if (mIsAlphabetShiftLocked) return "ALPHABET_SHIFT_LOCKED"; return "ALPHABET_" + shiftModeToString(mShiftMode); - } else if (mIsEmojiMode) { - return "EMOJI"; } else { return "SYMBOLS"; } @@ -132,7 +125,6 @@ public final class KeyboardState { public void onSaveKeyboardState() { final SavedKeyboardState state = mSavedKeyboardState; state.mIsAlphabetMode = mIsAlphabetMode; - state.mIsEmojiMode = mIsEmojiMode; if (mIsAlphabetMode) { state.mIsAlphabetShiftLocked = mAlphabetShiftState.isShiftLocked(); state.mShiftMode = mAlphabetShiftState.isAutomaticShifted() ? AUTOMATIC_SHIFT @@ -153,8 +145,6 @@ public final class KeyboardState { } if (!state.mIsValid || state.mIsAlphabetMode) { setAlphabetKeyboard(); - } else if (state.mIsEmojiMode) { - setEmojiKeyboard(); } else { setSymbolsKeyboard(); } @@ -264,7 +254,6 @@ public final class KeyboardState { mSwitchActions.setAlphabetKeyboard(); mIsAlphabetMode = true; - mIsEmojiMode = false; mRecapitalizeMode = RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE; mSwitchState = SWITCH_STATE_ALPHA; mSwitchActions.requestUpdatingShiftState(); @@ -281,15 +270,6 @@ public final class KeyboardState { mSwitchState = SWITCH_STATE_SYMBOL_BEGIN; } - private void setEmojiKeyboard() { - if (DEBUG_ACTION) { - Log.d(TAG, "setEmojiKeyboard"); - } - mIsAlphabetMode = false; - mIsEmojiMode = true; - mSwitchActions.setEmojiKeyboard(); - } - public void onPressKey(final int code, final boolean isSinglePointer, final int autoCaps) { if (DEBUG_EVENT) { Log.d(TAG, "onPressKey: code=" + Constants.printableCode(code) @@ -567,8 +547,6 @@ public final class KeyboardState { // If the code is a letter, update keyboard shift state. if (Constants.isLetterCode(code)) { updateAlphabetShiftState(autoCaps, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE); - } else if (code == Constants.CODE_EMOJI) { - setEmojiKeyboard(); } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 27a1739b9..de4baf948 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1532,8 +1532,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen handleLanguageSwitchKey(); break; case Constants.CODE_EMOJI: - // Note: Switching emoji keyboard is being handled in - // {@link KeyboardState#onCodeInput(int,int)}. + // TODO: Implement emoji keyboard switch. break; case Constants.CODE_ENTER: final EditorInfo editorInfo = getCurrentInputEditorInfo(); |