From 9e2d810dc524380ca1db6b384cfb00b4401585e5 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 27 May 2011 21:41:13 +0900 Subject: [PATCH] Remove web mode and add webInput boolean Bug: 4490948 Change-Id: I6fe23c9ab4918eab6806cc621c4d6821c2e1baf9 Cherry-Pick: I4cd1af0b --- java/res/values/attrs.xml | 5 ++-- java/res/xml/kbd_qwerty_f1.xml | 2 +- java/res/xml/kbd_qwerty_row4.xml | 4 +-- .../compat/InputTypeCompatUtils.java | 25 ++++++++++++++++--- .../inputmethod/keyboard/KeyboardId.java | 17 +++++++------ .../inputmethod/keyboard/KeyboardParser.java | 12 ++++++--- .../android/inputmethod/latin/LatinIME.java | 6 +++-- .../com/android/inputmethod/latin/Utils.java | 2 -- 8 files changed, 50 insertions(+), 23 deletions(-) diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 0e5b38b6b..feb955e86 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -184,9 +184,10 @@ - - + + + diff --git a/java/res/xml/kbd_qwerty_f1.xml b/java/res/xml/kbd_qwerty_f1.xml index d0e2884e1..e89d02d91 100644 --- a/java/res/xml/kbd_qwerty_f1.xml +++ b/java/res/xml/kbd_qwerty_f1.xml @@ -46,7 +46,7 @@ %s", TAG_CASE, + if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s%s%s%s%s> %s", TAG_CASE, textAttr(KeyboardId.modeName( a.getInt(R.styleable.Keyboard_Case_mode, -1)), "mode"), textAttr(KeyboardId.colorSchemeName( viewAttr.getInt( R.styleable.KeyboardView_colorScheme, -1)), "colorSchemeName"), + booleanAttr(a, R.styleable.Keyboard_Case_webInput, "webInput"), booleanAttr(a, R.styleable.Keyboard_Case_passwordInput, "passwordInput"), booleanAttr(a, R.styleable.Keyboard_Case_hasSettingsKey, "hasSettingsKey"), booleanAttr(a, R.styleable.Keyboard_Case_voiceKeyEnabled, "voiceKeyEnabled"), diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d625951fc..fd6c47803 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -81,7 +81,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private static final String TAG = LatinIME.class.getSimpleName(); private static final boolean PERF_DEBUG = false; private static final boolean TRACE = false; - private static boolean DEBUG = LatinImeLogger.sDBG; + private static boolean DEBUG; /** * The private IME option used to indicate that no microphone should be @@ -357,6 +357,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mSubtypeSwitcher = SubtypeSwitcher.getInstance(); mKeyboardSwitcher = KeyboardSwitcher.getInstance(); mRecorrection = Recorrection.getInstance(); + DEBUG = LatinImeLogger.sDBG; loadSettings(); @@ -506,7 +507,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar LatinKeyboardView inputView = switcher.getKeyboardView(); if (DEBUG) { - Log.d(TAG, "onStartInputView: " + inputView); + Log.d(TAG, "onStartInputView: inputType=" + ((attribute == null) ? "none" + : String.format("0x%08x", attribute.inputType))); } // In landscape mode, this method gets called without the input view being created. if (inputView == null) { diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index 5207f38ad..66a6d161b 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -538,8 +538,6 @@ public class Utils { return KeyboardId.MODE_IM; } else if (variation == InputType.TYPE_TEXT_VARIATION_FILTER) { return KeyboardId.MODE_TEXT; - } else if (variation == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) { - return KeyboardId.MODE_WEB; } else { return KeyboardId.MODE_TEXT; }