Fixing prediction ring color not getting updated if the icon changes
while the slot animation is running Slot animation is only trigerred through prediction update and it sets final ring color at that point as part of the animation. If the icon and the color change due to some other reason (like high-res icon or a package-update), that color is overriden by the ongoing slot animation. Bug: 381897614 Test: Verified manually by slowing down animation Flag: EXEMPT bugfix Change-Id: Ia3b86330afdb91ba6ff3366e3c8057bd7ec34e5d
This commit is contained in:
@@ -369,27 +369,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
|
||||
@UiThread
|
||||
public void applyFromWorkspaceItem(WorkspaceItemInfo info) {
|
||||
applyFromWorkspaceItem(info, /* animate = */ false, /* staggerIndex = */ 0);
|
||||
}
|
||||
|
||||
@UiThread
|
||||
public void applyFromWorkspaceItem(WorkspaceItemInfo info, boolean animate, int staggerIndex) {
|
||||
applyFromWorkspaceItem(info, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the newInfo differs from the current getTag().
|
||||
*/
|
||||
public boolean shouldAnimateIconChange(WorkspaceItemInfo newInfo) {
|
||||
WorkspaceItemInfo oldInfo = getTag() instanceof WorkspaceItemInfo
|
||||
? (WorkspaceItemInfo) getTag()
|
||||
: null;
|
||||
boolean changedIcons = oldInfo != null && oldInfo.getTargetComponent() != null
|
||||
&& newInfo.getTargetComponent() != null
|
||||
&& !oldInfo.getTargetComponent().equals(newInfo.getTargetComponent());
|
||||
return changedIcons && isShown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
|
||||
if (delegate instanceof BaseAccessibilityDelegate) {
|
||||
|
||||
Reference in New Issue
Block a user