Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e1dfaae authored by Dan Zivkovic's avatar Dan Zivkovic Committed by Android (Google) Code Review
Browse files

Merge "Remove ALS from LatinIME."

parents 74c37f40 107fb4c4
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.common.InputPointers;
import com.android.inputmethod.latin.inputlogic.PrivateCommandPerformer;

import java.util.List;
import java.util.Locale;

/**
@@ -39,7 +38,7 @@ public class GestureConsumer {

    public static GestureConsumer newInstance(
            final EditorInfo editorInfo, final PrivateCommandPerformer commandPerformer,
            final List<Locale> locales, final Keyboard keyboard) {
            final Locale locale, final Keyboard keyboard) {
        return GestureConsumer.NULL_GESTURE_CONSUMER;
    }

@@ -50,10 +49,10 @@ public class GestureConsumer {
        return false;
    }

    public void onInit(final List<Locale> locales, final Keyboard keyboard) {
    public void onInit(final Locale locale, final Keyboard keyboard) {
    }

    public void onGestureStarted(final List<Locale> locales, final Keyboard keyboard) {
    public void onGestureStarted(final Locale locale, final Keyboard keyboard) {
    }

    public void onGestureCanceled() {
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ public class Key implements Comparable<Key> {
        mLabelFlags = style.getFlags(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags)
                | row.getDefaultKeyLabelFlags();
        final boolean needsToUpcase = needsToUpcase(mLabelFlags, params.mId.mElementId);
        final Locale localeForUpcasing = params.mId.getLocales()[0];
        final Locale localeForUpcasing = params.mId.getLocale();
        int actionFlags = style.getFlags(keyAttr, R.styleable.Keyboard_Key_keyActionFlags);
        String[] moreKeys = style.getStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);

+3 −3
Original line number Diff line number Diff line
@@ -164,8 +164,8 @@ public final class KeyboardId {
        return InputTypeUtils.getImeOptionsActionIdFromEditorInfo(mEditorInfo);
    }

    public Locale[] getLocales() {
        return mSubtype.getLocales();
    public Locale getLocale() {
        return mSubtype.getLocale();
    }

    @Override
@@ -182,7 +182,7 @@ public final class KeyboardId {
    public String toString() {
        return String.format(Locale.ROOT, "[%s %s:%s %dx%d %s %s%s%s%s%s%s%s%s%s]",
                elementIdToName(mElementId),
                Arrays.deepToString(mSubtype.getLocales()),
                mSubtype.getLocale(),
                mSubtype.getExtraValueOf(KEYBOARD_LAYOUT_SET),
                mWidth, mHeight,
                modeName(mMode),
+1 −2
Original line number Diff line number Diff line
@@ -121,8 +121,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
        mKeyboardLayoutSet = builder.build();
        try {
            mState.onLoadKeyboard(currentAutoCapsState, currentRecapitalizeState);
            // TODO: revisit this for multi-lingual input
            mKeyboardTextsSet.setLocale(mRichImm.getCurrentSubtypeLocales()[0], mThemeContext);
            mKeyboardTextsSet.setLocale(mRichImm.getCurrentSubtypeLocale(), mThemeContext);
        } catch (KeyboardLayoutSetException e) {
            Log.w(TAG, "loading keyboard failed: " + e.mKeyboardId, e.getCause());
        }
+0 −9
Original line number Diff line number Diff line
@@ -843,15 +843,6 @@ public final class MainKeyboardView extends KeyboardView implements DrawingProxy
    // Layout language name on spacebar.
    private String layoutLanguageOnSpacebar(final Paint paint,
            final RichInputMethodSubtype subtype, final int width) {
        if (mLanguageOnSpacebarFormatType == LanguageOnSpacebarUtils.FORMAT_TYPE_MULTIPLE) {
            final Locale[] locales = subtype.getLocales();
            final String[] languages = new String[locales.length];
            for (int i = 0; i < locales.length; ++i) {
                languages[i] = locales[i].getLanguage().toUpperCase(Locale.ROOT);
            }
            return TextUtils.join(" / ", languages);
        }

        // Choose appropriate language name to fit into the width.
        if (mLanguageOnSpacebarFormatType == LanguageOnSpacebarUtils.FORMAT_TYPE_FULL_LOCALE) {
            final String fullText = subtype.getFullDisplayName();
Loading