aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-03-05 18:01:33 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-03-05 18:01:33 +0900
commit8c80fb9bcbe4375fa296bc12ef2c144d7f6f64f9 (patch)
tree857270c87c970c3467bb89175d7f810f084ae7f6 /java/src
parent749048f4e4f66a5f0e5ffa443803204356e3beed (diff)
downloadlatinime-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.java7
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) {