summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-06-12 15:27:33 -0700
committerSunny Goyal <sunnygoyal@google.com>2019-06-12 15:28:23 -0700
commit16284b956c6f185c1b3d65d9cfcdaeecd8a455ac (patch)
tree98c27d5333cfdfbbadc10b683116257c9f7bc0eb /quickstep/recents_ui_overrides
parent022b18263468282979e84fd8864bee4f67919f2d (diff)
downloadandroid_packages_apps_Trebuchet-16284b956c6f185c1b3d65d9cfcdaeecd8a455ac.tar.gz
android_packages_apps_Trebuchet-16284b956c6f185c1b3d65d9cfcdaeecd8a455ac.tar.bz2
android_packages_apps_Trebuchet-16284b956c6f185c1b3d65d9cfcdaeecd8a455ac.zip
Fading out the home surface if home and recents are shown in separate surface
Bug: 134725160 Change-Id: Ia4c5e0eefc4d8b869840645f403d943831c471f1
Diffstat (limited to 'quickstep/recents_ui_overrides')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
index aca23e4e4..de671e04a 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -192,6 +192,7 @@ public class ClipAnimationHelper {
float cornerRadius = 0f;
float scale = Math.max(params.currentRect.width(), mTargetRect.width()) / crop.width();
if (app.mode == targetSet.targetMode) {
+ alpha = mTaskAlphaCallback.apply(app, params.targetAlpha);
if (app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) {
mTmpMatrix.setRectToRect(mSourceRect, params.currentRect, ScaleToFit.FILL);
mTmpMatrix.postTranslate(app.position.x, app.position.y);
@@ -208,8 +209,11 @@ public class ClipAnimationHelper {
}
mCurrentCornerRadius = cornerRadius;
}
+ } else if (targetSet.hasRecents) {
+ // If home has a different target then recents, reverse anim the
+ // home target.
+ alpha = 1 - (progress * params.targetAlpha);
}
- alpha = mTaskAlphaCallback.apply(app, params.targetAlpha);
} else if (ENABLE_QUICKSTEP_LIVE_TILE.get() && launcherOnTop) {
crop = null;
layer = Integer.MAX_VALUE;