Fixing low res folder icon when preview changes
Also removing legacy for drawable sharing between folder-content and folder-icon, since preview now always creates new drawables Flag: EXEMPT bugfix Bug: 386842651 Test: atest PreviewItemManagerTest Change-Id: Ib8e4b4d5be4fb0c9601b9d8e3cef8a29d6c77651
This commit is contained in:
@@ -24,7 +24,6 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -541,19 +540,10 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
ShortcutAndWidgetContainer parent = page.getShortcutsAndWidgets();
|
||||
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
|
||||
View iconView = parent.getChildAt(i);
|
||||
Drawable d = null;
|
||||
if (iconView instanceof BubbleTextView btv) {
|
||||
btv.verifyHighRes();
|
||||
d = btv.getIcon();
|
||||
} else if (iconView instanceof AppPairIcon api) {
|
||||
api.verifyHighRes();
|
||||
d = api.getIconDrawableArea().getDrawable();
|
||||
}
|
||||
|
||||
// Set the callback back to the actual icon, in case
|
||||
// it was captured by the FolderIcon
|
||||
if (d != null) {
|
||||
d.setCallback(iconView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user