From 8417a7b5140bf6dd27702331e787887a7b8c2e3d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 21 May 2018 17:04:46 -0700 Subject: [PATCH] Bound recents content alpha to 0 and 1 Now that we use OvershootInterpolator for the atomic recents animation, it's possible to get alpha > 1. The drawable and text paint used in the empty recents state doesn't handle this well, causing alpha to jump to 0 in this case. Instead, we'll just force it to clamp to 1 ourselves. Bug: 80004542 Change-Id: Id0177caf63cd349f6f27c9dfaf0e8995447e70fc --- quickstep/src/com/android/quickstep/views/RecentsView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 578f36c23a..a6da89f205 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1001,6 +1001,7 @@ public abstract class RecentsView extends PagedView impl } public void setContentAlpha(float alpha) { + alpha = Utilities.boundToRange(alpha, 0, 1); mContentAlpha = alpha; for (int i = getChildCount() - 1; i >= 0; i--) { TaskView child = getPageAt(i);