diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2013-01-29 16:11:52 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2013-01-29 18:32:04 +0900 |
| commit | 17dae3057c234d9aed83c1ba31dbbc3aceb790ca (patch) | |
| tree | 25734321a51b4eb3ecf8e084ac4dca7844838306 /java/src/com/android/inputmethod/keyboard/KeyboardId.java | |
| parent | 56012e5ab952ecae965818d89b9ee51ef1f84ddb (diff) | |
Remove {max,min}keyboardHeight attribute from Keyboard
This change removes a DisplayMetrics reference from KeyboardBuilder.
Change-Id: I512694274e69e5281d5be47c3f938bcfd6571152
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardId.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardId.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardId.java b/java/src/com/android/inputmethod/keyboard/KeyboardId.java index 4b43bcc5c..ee8ee9a4f 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardId.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardId.java @@ -18,6 +18,7 @@ package com.android.inputmethod.keyboard; import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET; +import android.content.res.Configuration; import android.text.InputType; import android.text.TextUtils; import android.view.inputmethod.EditorInfo; @@ -62,8 +63,10 @@ public final class KeyboardId { public final InputMethodSubtype mSubtype; public final Locale mLocale; public final int mDeviceFormFactor; + // TODO: Remove this member. It is used only for logging purpose. public final int mOrientation; public final int mWidth; + public final int mHeight; public final int mMode; public final int mElementId; private final EditorInfo mEditorInfo; @@ -81,7 +84,8 @@ public final class KeyboardId { mLocale = SubtypeLocale.getSubtypeLocale(mSubtype); mDeviceFormFactor = params.mDeviceFormFactor; mOrientation = params.mOrientation; - mWidth = params.mWidth; + mWidth = params.mKeyboardWidth; + mHeight = params.mKeyboardHeight; mMode = params.mMode; mElementId = elementId; mEditorInfo = params.mEditorInfo; @@ -108,6 +112,7 @@ public final class KeyboardId { id.mElementId, id.mMode, id.mWidth, + id.mHeight, id.passwordInput(), id.mClobberSettingsKey, id.mShortcutKeyEnabled, @@ -130,6 +135,7 @@ public final class KeyboardId { && other.mElementId == mElementId && other.mMode == mMode && other.mWidth == mWidth + && other.mHeight == mHeight && other.passwordInput() == passwordInput() && other.mClobberSettingsKey == mClobberSettingsKey && other.mShortcutKeyEnabled == mShortcutKeyEnabled @@ -187,11 +193,13 @@ public final class KeyboardId { @Override public String toString() { - return String.format("[%s %s:%s %s-%s:%d %s %s %s%s%s%s%s%s%s%s%s]", + final String orientation = (mOrientation == Configuration.ORIENTATION_PORTRAIT) + ? "port" : "land"; + return String.format("[%s %s:%s %s-%s:%dx%d %s %s %s%s%s%s%s%s%s%s%s]", elementIdToName(mElementId), mLocale, mSubtype.getExtraValueOf(KEYBOARD_LAYOUT_SET), - deviceFormFactor(mDeviceFormFactor), (mOrientation == 1 ? "port" : "land"), mWidth, + deviceFormFactor(mDeviceFormFactor), orientation, mWidth, mHeight, modeName(mMode), imeAction(), (navigateNext() ? "navigateNext" : ""), |
