Fix Key to use a disabled icon when the key is disabled

Bug: 6114350
Change-Id: I419bc1736c27046dfea254ac510f5da478b6412c
main
Tadashi G. Takaoka 2012-03-05 18:01:33 +09:00
parent 749048f4e4
commit 8c80fb9bcb
1 changed files with 2 additions and 5 deletions

View File

@ -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) {