Merge "Fixing disabled icon getting changed back to normal state on long press" into ub-launcher3-burnaby-polish

This commit is contained in:
Sunny Goyal
2015-10-21 00:18:25 +00:00
committed by Android (Google) Code Review

View File

@@ -252,6 +252,9 @@ public class BubbleTextView extends TextView
FastBitmapDrawable d = (FastBitmapDrawable) mIcon;
if (isPressed() || mStayPressed) {
d.animateState(FastBitmapDrawable.State.PRESSED);
} else if (getTag() instanceof ShortcutInfo
&& ((ShortcutInfo) getTag()).isDisabled != 0) {
d.animateState(FastBitmapDrawable.State.DISABLED);
} else {
d.animateState(FastBitmapDrawable.State.NORMAL);
}