Refactor overview progress as splash progress.

This also avoids showing splash in split select state

Fix: 242284413
Test: follow up after b/238405972
Change-Id: I2e83fa3d030e8a74edb4152c472dbf02ac5a80b1
This commit is contained in:
Pat Manning committed 2022-08-30 11:23:08 +01:00
1 parent 831f5ee748
commit 81dc9ad131
9 files changed
+67 -39

No files matched your search

@@ -330,7 +330,7 @@ public class TaskView extends FrameLayout implements Reusable {
protected final DigitalWellBeingToast mDigitalWellBeingToast;
private float mFullscreenProgress;
private float mGridProgress;
protected float mOverviewProgress;
protected float mTaskThumbnailSplashAlpha;
private float mNonGridScale = 1;
private float mDismissScale = 1;
protected final FullscreenDrawParams mCurrentFullscreenParams;
@@ -1056,18 +1056,15 @@ public class TaskView extends FrameLayout implements Reusable {
}
/**
* Updates progress of task view for entering/exiting overview on swipe up/down.
*
* <p>Updates the alpha of any splash screen over the thumbnail if it exists.
* Updates alpha of task thumbnail splash on swipe up/down.
*/
public void setOverviewProgress(float overviewProgress) {
mOverviewProgress = overviewProgress;
public void setTaskThumbnailSplashAlpha(float taskThumbnailSplashAlpha) {
mTaskThumbnailSplashAlpha = taskThumbnailSplashAlpha;
applyThumbnailSplashAlpha();
}
protected void applyThumbnailSplashAlpha() {
mSnapshotView.setSplashAlpha(
Utilities.mapToRange(mOverviewProgress, 0f, 1f, 1f, 0f, LINEAR));
mSnapshotView.setSplashAlpha(Utilities.boundToRange(mTaskThumbnailSplashAlpha, 0f, 1f));
}
private void setSplitSelectTranslationX(float x) {