diff options
author | 2012-03-05 18:01:33 +0900 | |
---|---|---|
committer | 2012-03-05 18:01:33 +0900 | |
commit | 8c80fb9bcbe4375fa296bc12ef2c144d7f6f64f9 (patch) | |
tree | 857270c87c970c3467bb89175d7f810f084ae7f6 /java/src | |
parent | 749048f4e4f66a5f0e5ffa443803204356e3beed (diff) | |
download | latinime-8c80fb9bcbe4375fa296bc12ef2c144d7f6f64f9.tar.gz latinime-8c80fb9bcbe4375fa296bc12ef2c144d7f6f64f9.tar.xz latinime-8c80fb9bcbe4375fa296bc12ef2c144d7f6f64f9.zip |
Fix Key to use a disabled icon when the key is disabled
Bug: 6114350
Change-Id: I419bc1736c27046dfea254ac510f5da478b6412c
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index b8d04e0f5..79c7ce0fd 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -558,11 +558,8 @@ public class Key { } public Drawable getIcon(KeyboardIconsSet iconSet) { - return iconSet.getIconDrawable(mIconId); - } - - public Drawable getDisabledIcon(KeyboardIconsSet iconSet) { - return iconSet.getIconDrawable(mDisabledIconId); + final int iconId = mEnabled ? mIconId : mDisabledIconId; + return iconSet.getIconDrawable(iconId); } public Drawable getPreviewIcon(KeyboardIconsSet iconSet) { |