diff options
author | 2013-04-17 19:41:05 -0700 | |
---|---|---|
committer | 2013-04-17 19:41:05 -0700 | |
commit | 46762bf521882b433ecb2aceac77698ec9615600 (patch) | |
tree | 630d16fc4fb784564b48e01f42adfbb42f9bbe6b /java/src | |
parent | 1ba1c411efc88bf22c48c6f6bd73c84e6fe1560d (diff) | |
parent | 206ce6374bb4dfcb93d059ec6795853f36cd4979 (diff) | |
download | latinime-46762bf521882b433ecb2aceac77698ec9615600.tar.gz latinime-46762bf521882b433ecb2aceac77698ec9615600.tar.xz latinime-46762bf521882b433ecb2aceac77698ec9615600.zip |
am 206ce637: am bd8e92d8: Add debug message to detect unusual zero width condition
* commit '206ce6374bb4dfcb93d059ec6795853f36cd4979':
Add debug message to detect unusual zero width condition
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java index 5d14f93a3..ae08a5953 100644 --- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java +++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java @@ -291,10 +291,22 @@ public final class MoreKeysKeyboard extends Keyboard { // adjusted with their bottom paddings deducted. width = keyPreviewDrawParams.mPreviewVisibleWidth; height = keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap; + // TODO: Remove this check. + if (width == 0) { + throw new IllegalArgumentException( + "Zero width key detected: " + parentKey + " in " + parentKeyboard.mId); + } } else { width = getMaxKeyWidth(parentKeyboardView, parentKey, mParams.mDefaultKeyWidth, context.getResources()); height = parentKeyboard.mMostCommonKeyHeight; + // TODO: Remove this check. + if (width == 0) { + throw new IllegalArgumentException( + "Zero width calculated: " + parentKey + + " moreKeys=" + java.util.Arrays.toString(parentKey.mMoreKeys) + + " in " + parentKeyboard.mId); + } } final int dividerWidth; if (parentKey.needsDividersInMoreKeys()) { |