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:
@@ -64,6 +64,7 @@ import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.taskbar.customization.TaskbarAllAppsButtonContainer;
|
||||
import com.android.launcher3.taskbar.customization.TaskbarDividerContainer;
|
||||
import com.android.launcher3.uioverrides.PredictedAppIcon;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.LauncherBindableItemsContainer;
|
||||
import com.android.launcher3.util.Themes;
|
||||
@@ -595,10 +596,12 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
// Apply the Hotseat ItemInfos, or hide the view if there is none for a given index.
|
||||
if (hotseatView instanceof BubbleTextView btv
|
||||
&& hotseatItemInfo instanceof WorkspaceItemInfo workspaceInfo) {
|
||||
boolean animate = btv.shouldAnimateIconChange((WorkspaceItemInfo) hotseatItemInfo);
|
||||
btv.applyFromWorkspaceItem(workspaceInfo, animate, numViewsAnimated);
|
||||
if (animate) {
|
||||
numViewsAnimated++;
|
||||
if (btv instanceof PredictedAppIcon pai) {
|
||||
if (pai.applyFromWorkspaceItemWithAnimation(workspaceInfo, numViewsAnimated)) {
|
||||
numViewsAnimated++;
|
||||
}
|
||||
} else {
|
||||
btv.applyFromWorkspaceItem(workspaceInfo);
|
||||
}
|
||||
}
|
||||
setClickAndLongClickListenersForIcon(hotseatView);
|
||||
|
||||
Reference in New Issue
Block a user