diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-05-30 15:22:00 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-05-30 15:23:09 -0700 |
commit | e48fe1095d25f663fed7c82751ebeae32012423e (patch) | |
tree | e108a8672e52a9a705fe1232730014639d5fc0a5 /src/com/android/launcher3/graphics/PreloadIconDrawable.java | |
parent | 813ab5c83e026cf85c0cfeaadc8226f02fe32e58 (diff) | |
download | android_packages_apps_Trebuchet-e48fe1095d25f663fed7c82751ebeae32012423e.tar.gz android_packages_apps_Trebuchet-e48fe1095d25f663fed7c82751ebeae32012423e.tar.bz2 android_packages_apps_Trebuchet-e48fe1095d25f663fed7c82751ebeae32012423e.zip |
Deleting invalid icons when an app is restored
When a app is restored, it may not be in exactly the same state as it was when backed up.
Some components might be missing, and some shortcuts may be disabled or unavailable
Bug: 63525806
Change-Id: I09e6c0e9a9d2c1e8ccd73430f94bd065bdf2718e
Diffstat (limited to 'src/com/android/launcher3/graphics/PreloadIconDrawable.java')
-rw-r--r-- | src/com/android/launcher3/graphics/PreloadIconDrawable.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher3/graphics/PreloadIconDrawable.java b/src/com/android/launcher3/graphics/PreloadIconDrawable.java index 42ba191c2..d3a7955b2 100644 --- a/src/com/android/launcher3/graphics/PreloadIconDrawable.java +++ b/src/com/android/launcher3/graphics/PreloadIconDrawable.java @@ -77,7 +77,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable { private final Matrix mTmpMatrix = new Matrix(); private final PathMeasure mPathMeasure = new PathMeasure(); - private final Context mContext; + private final ItemInfoWithIcon mItem; // Path in [0, 100] bounds. private final Path mProgressPath; @@ -106,7 +106,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable { */ public PreloadIconDrawable(ItemInfoWithIcon info, Path progressPath, Context context) { super(info); - mContext = context; + mItem = info; mProgressPath = progressPath; mScaledTrackPath = new Path(); mScaledProgressPath = new Path(); @@ -274,7 +274,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable { mTrackAlpha = MAX_PAINT_ALPHA; setIsDisabled(true); } else if (progress >= 1) { - setIsDisabled(false); + setIsDisabled(mItem.isDisabled()); mScaledTrackPath.set(mScaledProgressPath); float fraction = (progress - 1) / COMPLETE_ANIM_FRACTION; |