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

Commit ec8cb2eb authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Remove web mode and add webInput boolean (DO NOT MERGE)" into honeycomb-mr2

parents 01a12eb1 38515ae5
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -165,11 +165,10 @@
            <enum name="url" value="1" />
            <enum name="email" value="2" />
            <enum name="im" value="3" />
            <enum name="web" value="4" />
            <enum name="phone" value="5" />
            <enum name="number" value="6" />
            <enum name="webEmail" value="7" />
            <enum name="phone" value="4" />
            <enum name="number" value="5" />
        </attr>
        <attr name="webInput" format="boolean" />
        <attr name="passwordInput" format="boolean" />
        <attr name="hasSettingsKey" format="string" />
        <attr name="voiceKeyEnabled" format="string" />
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
>
    <switch>
        <case
            latin:mode="web"
            latin:webInput="true"
        >
            <switch>
                <case
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
                </case>
                <!-- latin:hasVoiceKey="false" -->
                <case
                    latin:mode="web"
                    latin:webInput="true"
                >
                    <Key
                        latin:keyLabel="."
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
                    latin:keyboardLayout="@xml/kbd_qwerty_f1" />
                <switch>
                    <case
                        latin:mode="web"
                        latin:webInput="true"
                    >
                        <Key
                            latin:keyStyle="spaceKeyStyle"
@@ -88,7 +88,7 @@
                    latin:keyboardLayout="@xml/kbd_qwerty_f1" />
                <switch>
                    <case
                        latin:mode="web"
                        latin:webInput="true"
                    >
                        <Key
                            latin:keyStyle="spaceKeyStyle"
@@ -118,7 +118,7 @@
                            latin:keyEdgeFlags="right" />
                    </case>
                    <case
                        latin:mode="web"
                        latin:webInput="true"
                    >
                        <Key
                            latin:keyStyle="returnKeyStyle"
+8 −8
Original line number Diff line number Diff line
@@ -33,17 +33,15 @@ public class KeyboardId {
    public static final int MODE_URL = 1;
    public static final int MODE_EMAIL = 2;
    public static final int MODE_IM = 3;
    public static final int MODE_WEB = 4;
    public static final int MODE_PHONE = 5;
    public static final int MODE_NUMBER = 6;
    // Should come up with implementing web & email mode clearer way.
    public static final int MODE_WEB_EMAIL = 7;
    public static final int MODE_PHONE = 4;
    public static final int MODE_NUMBER = 5;

    public final Locale mLocale;
    public final int mOrientation;
    public final int mMode;
    public final int mXmlId;
    public final int mColorScheme;
    public final boolean mWebInput;
    public final boolean mPasswordInput;
    public final boolean mHasSettingsKey;
    public final boolean mVoiceKeyEnabled;
@@ -64,6 +62,7 @@ public class KeyboardId {
        this.mMode = mode;
        this.mXmlId = xmlId;
        this.mColorScheme = colorScheme;
        this.mWebInput = Utils.isWebInputType(inputType);
        this.mPasswordInput = Utils.isPasswordInputType(inputType)
                || Utils.isVisiblePasswordInputType(inputType);
        this.mHasSettingsKey = hasSettingsKey;
@@ -82,6 +81,7 @@ public class KeyboardId {
                mode,
                xmlId,
                colorScheme,
                mWebInput,
                mPasswordInput,
                hasSettingsKey,
                voiceKeyEnabled,
@@ -122,6 +122,7 @@ public class KeyboardId {
            && other.mMode == this.mMode
            && other.mXmlId == this.mXmlId
            && other.mColorScheme == this.mColorScheme
            && other.mWebInput == this.mWebInput
            && other.mPasswordInput == this.mPasswordInput
            && other.mHasSettingsKey == this.mHasSettingsKey
            && other.mVoiceKeyEnabled == this.mVoiceKeyEnabled
@@ -137,12 +138,13 @@ public class KeyboardId {

    @Override
    public String toString() {
        return String.format("[%s.xml %s %s %s imeAction=%s %s%s%s%s%s%s]",
        return String.format("[%s.xml %s %s %s imeAction=%s %s%s%s%s%s%s%s]",
                mXmlName,
                mLocale,
                (mOrientation == 1 ? "port" : "land"),
                modeName(mMode),
                imeOptionsName(mImeAction),
                (mWebInput ? " webInput" : ""),
                (mPasswordInput ? " passwordInput" : ""),
                (mHasSettingsKey ? " hasSettingsKey" : ""),
                (mVoiceKeyEnabled ? " voiceKeyEnabled" : ""),
@@ -158,10 +160,8 @@ public class KeyboardId {
        case MODE_URL: return "url";
        case MODE_EMAIL: return "email";
        case MODE_IM: return "im";
        case MODE_WEB: return "web";
        case MODE_PHONE: return "phone";
        case MODE_NUMBER: return "number";
        case MODE_WEB_EMAIL: return "webEmail";
        }
        return null;
    }
Loading