Show and update preload icons when they are in a FolderIcon preview.

Bug: 62626549
Change-Id: Ie0ad06d0239dccb8d8388381ffe845c4bbc079d6
This commit is contained in:
Jon Miranda
2017-06-20 10:42:04 -07:00
parent 7e2e2aa80b
commit 2ef1ab4017
3 changed files with 24 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v4.graphics.ColorUtils;
import android.util.AttributeSet;
import android.util.Property;
@@ -47,6 +48,7 @@ import com.android.launcher3.IconCache.ItemInfoUpdateReceiver;
import com.android.launcher3.badge.BadgeInfo;
import com.android.launcher3.badge.BadgeRenderer;
import com.android.launcher3.folder.FolderIconPreviewVerifier;
import com.android.launcher3.folder.FolderPagedView;
import com.android.launcher3.graphics.DrawableFactory;
import com.android.launcher3.graphics.HolographicOutlineHelper;
import com.android.launcher3.graphics.IconPalette;
@@ -207,6 +209,17 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
applyFromShortcutInfo(info, false);
}
@Override
public void invalidateDrawable(@NonNull Drawable drawable) {
super.invalidateDrawable(drawable);
if (getParent() != null
&& getParent().getParent() != null
&& getParent().getParent().getParent() instanceof FolderPagedView) {
((FolderPagedView) getParent().getParent().getParent()).onIconInvalidated(this);
}
}
public void applyFromShortcutInfo(ShortcutInfo info, boolean promiseStateChanged) {
applyIconAndLabel(info.iconBitmap, info);
setTag(info);