aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/values/attrs.xml2
-rw-r--r--java/res/xml-xlarge/kbd_qwerty_row4.xml2
-rw-r--r--java/res/xml/kbd_key_styles.xml10
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardId.java13
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardParser.java13
5 files changed, 21 insertions, 19 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index b6d5fdc62..dea163595 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -171,7 +171,7 @@
<attr name="hasSettingsKey" format="string" />
<attr name="voiceKeyEnabled" format="string" />
<attr name="hasVoiceKey" format="string" />
- <attr name="imeOptions">
+ <attr name="imeAction">
<!-- This should be aligned with EditorInfo.IME_ACTION_* -->
<flag name="actionUnspecified" value="0" />
<flag name="actionNone" value="1" />
diff --git a/java/res/xml-xlarge/kbd_qwerty_row4.xml b/java/res/xml-xlarge/kbd_qwerty_row4.xml
index 9d0fd81c7..65ca093a4 100644
--- a/java/res/xml-xlarge/kbd_qwerty_row4.xml
+++ b/java/res/xml-xlarge/kbd_qwerty_row4.xml
@@ -49,7 +49,7 @@
<default>
<switch>
<case
- latin:imeOptions="actionSearch"
+ latin:imeAction="actionSearch"
>
<Key
latin:keyLabel=":"
diff --git a/java/res/xml/kbd_key_styles.xml b/java/res/xml/kbd_key_styles.xml
index 3b35f3560..473510ec4 100644
--- a/java/res/xml/kbd_key_styles.xml
+++ b/java/res/xml/kbd_key_styles.xml
@@ -182,7 +182,7 @@
<!-- Return key style -->
<switch>
<case
- latin:imeOptions="actionGo"
+ latin:imeAction="actionGo"
>
<key-style
latin:styleName="returnKeyStyle"
@@ -191,7 +191,7 @@
latin:parentStyle="functionalKeyStyle" />
</case>
<case
- latin:imeOptions="actionNext"
+ latin:imeAction="actionNext"
>
<key-style
latin:styleName="returnKeyStyle"
@@ -200,7 +200,7 @@
latin:parentStyle="functionalKeyStyle" />
</case>
<case
- latin:imeOptions="actionDone"
+ latin:imeAction="actionDone"
>
<key-style
latin:styleName="returnKeyStyle"
@@ -209,7 +209,7 @@
latin:parentStyle="functionalKeyStyle" />
</case>
<case
- latin:imeOptions="actionSend"
+ latin:imeAction="actionSend"
>
<key-style
latin:styleName="returnKeyStyle"
@@ -218,7 +218,7 @@
latin:parentStyle="functionalKeyStyle" />
</case>
<case
- latin:imeOptions="actionSearch"
+ latin:imeAction="actionSearch"
>
<switch>
<case
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardId.java b/java/src/com/android/inputmethod/keyboard/KeyboardId.java
index db86740c3..42dc0b0cd 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardId.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardId.java
@@ -44,7 +44,7 @@ public class KeyboardId {
public final boolean mHasSettingsKey;
public final boolean mVoiceKeyEnabled;
public final boolean mHasVoiceKey;
- public final int mImeOptions;
+ public final int mImeAction;
public final boolean mEnableShiftLock;
public final String mXmlName;
@@ -61,8 +61,9 @@ public class KeyboardId {
this.mHasSettingsKey = hasSettingsKey;
this.mVoiceKeyEnabled = voiceKeyEnabled;
this.mHasVoiceKey = hasVoiceKey;
- // We are interested only in IME_MASK_ACTION enum value and IME_FLAG_NO_ENTER_ACTION.
- this.mImeOptions = imeOptions
+ // We are interested only in {@link EditorInfo#IME_MASK_ACTION} enum value and
+ // {@link EditorInfo#IME_FLAG_NO_ENTER_ACTION}.
+ this.mImeAction = imeOptions
& (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION);
this.mEnableShiftLock = enableShiftLock;
this.mXmlName = xmlName;
@@ -76,7 +77,7 @@ public class KeyboardId {
hasSettingsKey,
voiceKeyEnabled,
hasVoiceKey,
- imeOptions,
+ mImeAction,
enableShiftLock,
});
}
@@ -115,7 +116,7 @@ public class KeyboardId {
&& other.mHasSettingsKey == this.mHasSettingsKey
&& other.mVoiceKeyEnabled == this.mVoiceKeyEnabled
&& other.mHasVoiceKey == this.mHasVoiceKey
- && other.mImeOptions == this.mImeOptions
+ && other.mImeAction == this.mImeAction
&& other.mEnableShiftLock == this.mEnableShiftLock;
}
@@ -131,7 +132,7 @@ public class KeyboardId {
mLocale,
(mOrientation == 1 ? "port" : "land"),
modeName(mMode),
- imeOptionsName(mImeOptions),
+ imeOptionsName(mImeAction),
colorSchemeName(mColorScheme),
(mHasSettingsKey ? " hasSettingsKey" : ""),
(mVoiceKeyEnabled ? " voiceKeyEnabled" : ""),
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardParser.java b/java/src/com/android/inputmethod/keyboard/KeyboardParser.java
index e8324e5fd..1aec686e0 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardParser.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardParser.java
@@ -427,13 +427,14 @@ public class KeyboardParser {
R.styleable.Keyboard_Case_hasVoiceKey, id.mHasVoiceKey);
final boolean colorSchemeMatched = matchInteger(viewAttr,
R.styleable.KeyboardView_colorScheme, id.mColorScheme);
- // As noted at KeyboardSwitcher.KeyboardId class, we are interested only in
- // enum value masked by IME_MASK_ACTION and IME_FLAG_NO_ENTER_ACTION. So matching
+ // As noted at {@link KeyboardId} class, we are interested only in enum value masked by
+ // {@link android.view.inputmethod.EditorInfo#IME_MASK_ACTION} and
+ // {@link android.view.inputmethod.EditorInfo#IME_FLAG_NO_ENTER_ACTION}. So matching
// this attribute with id.mImeOptions as integer value is enough for our purpose.
- final boolean imeOptionsMatched = matchInteger(a,
- R.styleable.Keyboard_Case_imeOptions, id.mImeOptions);
+ final boolean imeActionMatched = matchInteger(a,
+ R.styleable.Keyboard_Case_imeAction, id.mImeAction);
final boolean selected = modeMatched && settingsKeyMatched && voiceEnabledMatched
- && voiceKeyMatched && colorSchemeMatched && imeOptionsMatched;
+ && voiceKeyMatched && colorSchemeMatched && imeActionMatched;
if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s> %s", TAG_CASE,
textAttr(KeyboardId.modeName(
@@ -444,7 +445,7 @@ public class KeyboardParser {
booleanAttr(a, R.styleable.Keyboard_Case_voiceKeyEnabled, "voiceKeyEnabled"),
booleanAttr(a, R.styleable.Keyboard_Case_hasVoiceKey, "hasVoiceKey"),
textAttr(KeyboardId.imeOptionsName(
- a.getInt(R.styleable.Keyboard_Case_imeOptions, -1)), "imeOptions"),
+ a.getInt(R.styleable.Keyboard_Case_imeAction, -1)), "imeAction"),
Boolean.toString(selected)));
return selected;