Add missing overview progress calls, track grid progress for thumbnail splash.
Test: manual
Bug: 202826469
Change-Id: I29578f44fd87423437ad6c73dc2be1ad630a55d6
diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
index 871ddc6..7166a3e 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
@@ -120,8 +120,9 @@
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f,
showAsGrid ? INSTANT : FINAL_FRAME);
- setter.setFloat(mRecentsView, OVERVIEW_PROGRESS,
- toState == LauncherState.OVERVIEW ? 1f : 0f, INSTANT);
+ boolean toOverview = toState == LauncherState.OVERVIEW;
+ setter.setFloat(mRecentsView, OVERVIEW_PROGRESS, toOverview ? 1f : 0f,
+ toOverview ? INSTANT : FINAL_FRAME);
}
abstract FloatProperty getTaskModalnessProperty();
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 583d097..cf93857 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -2234,6 +2234,11 @@
}
}
}
+ if (animatorSet == null) {
+ setOverviewProgress(1);
+ } else {
+ animatorSet.play(ObjectAnimator.ofFloat(this, OVERVIEW_PROGRESS, 1));
+ }
}
/**
diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
index 727504a..f4b3d98 100644
--- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -221,7 +221,7 @@
* Sets the alpha of the splash view.
*/
public void setSplashAlpha(float splashAlpha) {
- mSplashAlpha = (int) (splashAlpha * 255);
+ mSplashAlpha = (int) (Utilities.boundToRange(splashAlpha, 0f, 1f) * 255);
if (mSplashViewDrawable != null) {
mSplashViewDrawable.setAlpha(mSplashAlpha);
}