mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Show and update preload icons when they are in a FolderIcon preview.
Bug: 62626549 Change-Id: Ie0ad06d0239dccb8d8388381ffe845c4bbc079d6
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user