diff --git a/java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png deleted file mode 100644 index 34a1ebde2..000000000 Binary files a/java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png and /dev/null differ diff --git a/java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png deleted file mode 100644 index abd8b742e..000000000 Binary files a/java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png and /dev/null differ diff --git a/java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png deleted file mode 100644 index ba4e9ec49..000000000 Binary files a/java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png and /dev/null differ diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 701d19572..7363b6108 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -72,8 +72,6 @@ - - diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml index 79f90365b..22fb2c822 100644 --- a/java/res/values/themes-ics.xml +++ b/java/res/values/themes-ics.xml @@ -71,8 +71,6 @@ @color/gesture_floating_preview_color_holo @color/highlight_color_ics @color/highlight_translucent_color_ics - false - @drawable/sym_keyboard_space_led_holo @color/spacebar_text_color_holo 1.0 @color/spacebar_text_shadow_color_holo diff --git a/java/res/values/themes-klp.xml b/java/res/values/themes-klp.xml index dfeca1c27..212f5db01 100644 --- a/java/res/values/themes-klp.xml +++ b/java/res/values/themes-klp.xml @@ -71,8 +71,6 @@ @color/gesture_floating_preview_color_holo @color/highlight_color_klp @color/highlight_translucent_color_klp - false - @drawable/sym_keyboard_space_led_holo @color/spacebar_text_color_holo 1.0 @color/spacebar_text_shadow_color_holo diff --git a/java/res/values/themes-lxx.xml b/java/res/values/themes-lxx.xml index 899d26a7e..3c7a2b511 100644 --- a/java/res/values/themes-lxx.xml +++ b/java/res/values/themes-lxx.xml @@ -71,8 +71,6 @@ @color/gesture_floating_preview_color_holo @color/highlight_color_lxx @color/highlight_translucent_color_lxx - false - @drawable/sym_keyboard_space_led_holo @color/key_text_inactive_color_lxx -1.0 diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index b7a76944e..61d51d1c9 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -61,10 +61,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { private final KeyboardTextsSet mKeyboardTextsSet = new KeyboardTextsSet(); private SettingsValues mCurrentSettingsValues; - /** mIsAutoCorrectionActive indicates that auto corrected word will be input instead of - * what user actually typed. */ - private boolean mIsAutoCorrectionActive; - private KeyboardTheme mKeyboardTheme; private Context mThemeContext; @@ -142,12 +138,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } } - public void onFinishInputView() { - mIsAutoCorrectionActive = false; - } - public void onHideWindow() { - mIsAutoCorrectionActive = false; if (mKeyboardView != null) { mKeyboardView.onHideWindow(); } @@ -168,7 +159,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { mCurrentSettingsValues.mKeyPreviewShowUpDuration, mCurrentSettingsValues.mKeyPreviewDismissEndScale, mCurrentSettingsValues.mKeyPreviewDismissDuration); - keyboardView.updateAutoCorrectionState(mIsAutoCorrectionActive); keyboardView.updateShortcutKey(mSubtypeSwitcher.isShortcutImeReady()); final boolean subtypeChanged = (oldKeyboard == null) || !keyboard.mId.mLocale.equals(oldKeyboard.mId.mLocale); @@ -367,15 +357,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } } - public void onAutoCorrectionStateChanged(final boolean isAutoCorrection) { - if (mIsAutoCorrectionActive != isAutoCorrection) { - mIsAutoCorrectionActive = isAutoCorrection; - if (mKeyboardView != null) { - mKeyboardView.updateAutoCorrectionState(isAutoCorrection); - } - } - } - public int getKeyboardShiftMode() { final Keyboard keyboard = getKeyboard(); if (keyboard == null) { diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 4a0976845..ac11dca97 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -70,8 +70,6 @@ import java.util.WeakHashMap; /** * A view that is responsible for detecting key presses and touch movements. * - * @attr ref R.styleable#MainKeyboardView_autoCorrectionSpacebarLedEnabled - * @attr ref R.styleable#MainKeyboardView_autoCorrectionSpacebarLedIcon * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextRatio * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextColor * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextShadowRadius @@ -133,11 +131,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack private static final float LANGUAGE_ON_SPACEBAR_TEXT_SHADOW_RADIUS_DISABLED = -1.0f; // The minimum x-scale to fit the language name on spacebar. private static final float MINIMUM_XSCALE_OF_LANGUAGE_NAME = 0.8f; - // Stuff to draw auto correction LED on spacebar. - private boolean mAutoCorrectionSpacebarLedOn; - private final boolean mAutoCorrectionSpacebarLedEnabled; - private final Drawable mAutoCorrectionSpacebarLedIcon; - private static final int SPACE_LED_LENGTH_PERCENT = 80; // Stuff to draw altCodeWhileTyping keys. private final ObjectAnimator mAltCodeKeyWhileTypingFadeoutAnimator; @@ -221,10 +214,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack R.styleable.MainKeyboardView_backgroundDimAlpha, 0); mBackgroundDimAlphaPaint.setColor(Color.BLACK); mBackgroundDimAlphaPaint.setAlpha(backgroundDimAlpha); - mAutoCorrectionSpacebarLedEnabled = mainKeyboardViewAttr.getBoolean( - R.styleable.MainKeyboardView_autoCorrectionSpacebarLedEnabled, false); - mAutoCorrectionSpacebarLedIcon = mainKeyboardViewAttr.getDrawable( - R.styleable.MainKeyboardView_autoCorrectionSpacebarLedIcon); mLanguageOnSpacebarTextRatio = mainKeyboardViewAttr.getFraction( R.styleable.MainKeyboardView_languageOnSpacebarTextRatio, 1, 1, 1.0f); mLanguageOnSpacebarTextColor = mainKeyboardViewAttr.getColor( @@ -834,14 +823,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack invalidateKey(mSpaceKey); } - public void updateAutoCorrectionState(final boolean isAutoCorrection) { - if (!mAutoCorrectionSpacebarLedEnabled) { - return; - } - mAutoCorrectionSpacebarLedOn = isAutoCorrection; - invalidateKey(mSpaceKey); - } - private void dimEntireKeyboard(final boolean dimmed) { final boolean needsRedrawing = mNeedsToDimEntireKeyboard != dimmed; mNeedsToDimEntireKeyboard = dimmed; @@ -946,13 +927,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } // Draw the spacebar icon at the bottom - if (mAutoCorrectionSpacebarLedOn) { - final int iconWidth = width * SPACE_LED_LENGTH_PERCENT / 100; - final int iconHeight = mAutoCorrectionSpacebarLedIcon.getIntrinsicHeight(); - int x = (width - iconWidth) / 2; - int y = height - iconHeight; - drawIcon(canvas, mAutoCorrectionSpacebarLedIcon, x, y, iconWidth, iconHeight); - } else if (mSpacebarIcon != null) { + if (mSpacebarIcon != null) { final int iconWidth = mSpacebarIcon.getIntrinsicWidth(); final int iconHeight = mSpacebarIcon.getIntrinsicHeight(); int x = (width - iconWidth) / 2; diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 1ccf5854a..74b83c1bb 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -905,7 +905,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private void onFinishInputViewInternal(final boolean finishingInput) { super.onFinishInputView(finishingInput); - mKeyboardSwitcher.onFinishInputView(); mKeyboardSwitcher.deallocateMemory(); // Remove pending messages related to update suggestions mHandler.cancelUpdateSuggestionStrip(); @@ -1388,7 +1387,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (!hasSuggestionStripView()) { return; } - mKeyboardSwitcher.onAutoCorrectionStateChanged(suggestedWords.mWillAutoCorrect); if (!onEvaluateInputViewShown()) { return; }