diff options
Diffstat (limited to 'java/src')
3 files changed, 12 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 109d6a0cf..bb1aa4776 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -29,7 +29,6 @@ import android.view.inputmethod.EditorInfo; import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy; import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException; -import com.android.inputmethod.keyboard.PointerTracker.TimerProxy; import com.android.inputmethod.keyboard.internal.KeyboardState; import com.android.inputmethod.latin.InputView; import com.android.inputmethod.latin.LatinIME; @@ -274,8 +273,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { public void startDoubleTapShiftKeyTimer() { final MainKeyboardView keyboardView = getMainKeyboardView(); if (keyboardView != null) { - final TimerProxy timer = keyboardView.getTimerProxy(); - timer.startDoubleTapShiftKeyTimer(); + keyboardView.getTimerProxy().startDoubleTapShiftKeyTimer(); } } @@ -284,8 +282,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { public void cancelDoubleTapShiftKeyTimer() { final MainKeyboardView keyboardView = getMainKeyboardView(); if (keyboardView != null) { - final TimerProxy timer = keyboardView.getTimerProxy(); - timer.cancelDoubleTapShiftKeyTimer(); + keyboardView.getTimerProxy().cancelDoubleTapShiftKeyTimer(); } } @@ -293,8 +290,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { @Override public boolean isInDoubleTapShiftKeyTimeout() { final MainKeyboardView keyboardView = getMainKeyboardView(); - return (keyboardView != null) - ? keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout() : false; + return keyboardView != null && keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout(); } /** diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index a45133c3f..212338021 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -775,8 +775,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack private static final int STATE_RIGHT = 2; private static final int STATE_NORMAL = 0; private static final int STATE_HAS_MOREKEYS = 1; - private static final int[] KEY_PREVIEW_BACKGROUND_DEFAULT_STATE = - KEY_PREVIEW_BACKGROUND_STATE_TABLE[STATE_MIDDLE][STATE_NORMAL]; @Override public void showKeyPreview(final PointerTracker tracker) { diff --git a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java index 37c390d13..32c4950da 100644 --- a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java +++ b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java @@ -107,13 +107,19 @@ public class UserDictionaryList extends PreferenceFragment { protected void createUserDictSettings(PreferenceGroup userDictGroup) { final Activity activity = getActivity(); userDictGroup.removeAll(); - final TreeSet<String> localeList = + final TreeSet<String> localeSet = UserDictionaryList.getUserDictionaryLocalesSet(activity); - if (localeList.isEmpty()) { + if (localeSet.size() > 1) { + // Have an "All languages" entry in the languages list if there are two or more active + // languages + localeSet.add(""); + } + + if (localeSet.isEmpty()) { userDictGroup.addPreference(createUserDictionaryPreference(null, activity)); } else { - for (String locale : localeList) { + for (String locale : localeSet) { userDictGroup.addPreference(createUserDictionaryPreference(locale, activity)); } } |