summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-02-28 20:10:09 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-02-28 20:10:09 +0000
commitc06a7e137da091e852e7ca38c0d015fc8c690aa8 (patch)
tree461aab8c3868e0c4b30862dadead16a84e0cb1ce /src
parenta655a4a83a1af6d182a769d29b3ba6acfb4880b5 (diff)
parentd82c5cd2b05b2260c6c600fe31cd4680e2307121 (diff)
downloadandroid_packages_apps_Trebuchet-c06a7e137da091e852e7ca38c0d015fc8c690aa8.tar.gz
android_packages_apps_Trebuchet-c06a7e137da091e852e7ca38c0d015fc8c690aa8.tar.bz2
android_packages_apps_Trebuchet-c06a7e137da091e852e7ca38c0d015fc8c690aa8.zip
Merge "Set disabled state when getting new icon from DrawableFactory." into ub-launcher3-master
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/BubbleTextView.java1
-rw-r--r--src/com/android/launcher3/graphics/DrawableFactory.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index dbdb2dca9..4f50d1a42 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -231,7 +231,6 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
FastBitmapDrawable iconDrawable = DrawableFactory.get(getContext()).newIcon(info);
mBadgeColor = IconPalette.getMutedColor(info.iconColor, 0.54f);
- iconDrawable.setIsDisabled(info.isDisabled());
setIcon(iconDrawable);
setText(info.title);
if (info.contentDescription != null) {
diff --git a/src/com/android/launcher3/graphics/DrawableFactory.java b/src/com/android/launcher3/graphics/DrawableFactory.java
index 32d9e4145..339346922 100644
--- a/src/com/android/launcher3/graphics/DrawableFactory.java
+++ b/src/com/android/launcher3/graphics/DrawableFactory.java
@@ -65,7 +65,9 @@ public class DrawableFactory {
* Returns a FastBitmapDrawable with the icon.
*/
public FastBitmapDrawable newIcon(ItemInfoWithIcon info) {
- return new FastBitmapDrawable(info);
+ FastBitmapDrawable drawable = new FastBitmapDrawable(info);
+ drawable.setIsDisabled(info.isDisabled());
+ return drawable;
}
/**