Fix bug with Launcher animation canceling, esp. around OverviewSplitSelect

This commit fixes a bug where the user could cancel animations when transitioning between Launcher states, potentially resulting in a state where Overview elements (task thumbnails etc.) were wrongly hidden or invisible.

The bug occurred because functions such as createInitialSplitSelectAnimation() and createAtomicAnimation() did not carry out any cleanup upon animation failure. This resulted in RecentsView potentially being in a polluted state for the next launch.

Bug was fixed by adding cleanup routines to two onAnimationEnd listeners.

Fixes: 242715097
Test: Manual
Change-Id: I05415ecf515e247aa535e3ca8371e540c3189b01
This commit is contained in:
Jeremy Sim committed 2022-09-01 20:51:53 -07:00
1 parent c9be6ca870
commit b33471a21f
8 files changed
+97 -44

No files matched your search

@@ -323,6 +323,19 @@ public class TaskView extends FrameLayout implements Reusable {
}
};
public static final FloatProperty<TaskView> ICON_ALPHA =
new FloatProperty<TaskView>("iconAlpha") {
@Override
public void setValue(TaskView taskView, float v) {
taskView.mIconView.setAlpha(v);
}
@Override
public Float get(TaskView taskView) {
return taskView.mIconView.getAlpha();
}
};
@Nullable
protected Task mTask;
protected TaskThumbnailView mSnapshotView;
@@ -1488,6 +1501,10 @@ public class TaskView extends FrameLayout implements Reusable {
return display != null ? display.getDisplayId() : DEFAULT_DISPLAY;
}
void setThumbnailVisibility(int visibility) {
mSnapshotView.setVisibility(visibility);
}
/**
* We update and subsequently draw these in {@link #setFullscreenProgress(float)}.
*/