diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-03 01:29:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-02-03 01:29:56 +0000 |
commit | b5c5e27ab6bbbaf69203044bab7b9af61efd79dd (patch) | |
tree | d51ac9fb3e2a72b592dde8472dcf2bae54adce13 /quickstep/src/com/android/quickstep/util/TransformParams.java | |
parent | 041c765ca5ee78a8b8c21db1882740b81439c1eb (diff) | |
parent | 808fc1574781a8be6700feb728c9ee65426722a8 (diff) | |
download | Launcher3-simpleperf-release.tar.gz |
Merge "Snap for 11400057 from ded14cc2110e39408f74abac8a83e0a0f16608d2 to simpleperf-release" into simpleperf-releasesimpleperf-release
Diffstat (limited to 'quickstep/src/com/android/quickstep/util/TransformParams.java')
-rw-r--r-- | quickstep/src/com/android/quickstep/util/TransformParams.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/quickstep/src/com/android/quickstep/util/TransformParams.java b/quickstep/src/com/android/quickstep/util/TransformParams.java index 0f20e430fc..ca680db2d3 100644 --- a/quickstep/src/com/android/quickstep/util/TransformParams.java +++ b/quickstep/src/com/android/quickstep/util/TransformParams.java @@ -15,14 +15,14 @@ */ package com.android.quickstep.util; -import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; +import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import android.util.FloatProperty; import android.view.RemoteAnimationTarget; +import com.android.app.animation.Interpolators; import com.android.launcher3.Utilities; -import com.android.launcher3.anim.Interpolators; import com.android.quickstep.RemoteAnimationTargets; import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties; @@ -54,6 +54,7 @@ public class TransformParams { } }; + /** Progress from 0 to 1 where 0 is in-app and 1 is Overview */ private float mProgress; private float mTargetAlpha; private float mCornerRadius; @@ -135,6 +136,7 @@ public class TransformParams { return this; } + /** Builds the SurfaceTransaction from the given BuilderProxy params. */ public SurfaceTransaction createSurfaceParams(BuilderProxy proxy) { RemoteAnimationTargets targets = mTargetSet; SurfaceTransaction transaction = new SurfaceTransaction(); @@ -150,10 +152,15 @@ public class TransformParams { if (activityType == ACTIVITY_TYPE_HOME) { mHomeBuilderProxy.onBuildTargetParams(builder, app, this); } else { - // Fade out Assistant overlay. - if (activityType == ACTIVITY_TYPE_ASSISTANT && app.isNotInRecents) { + // Fade out translucent overlay. + // TODO(b/303351074): use app.isNotInRecents directly once it is fixed. + boolean isNotInRecents = app.taskInfo != null + && (app.taskInfo.baseIntent.getFlags() + & FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0; + if (app.isTranslucent && isNotInRecents) { float progress = Utilities.boundToRange(getProgress(), 0, 1); - builder.setAlpha(1 - Interpolators.DEACCEL_2_5.getInterpolation(progress)); + builder.setAlpha(1 - Interpolators.DECELERATE_QUINT + .getInterpolation(progress)); } else { builder.setAlpha(getTargetAlpha()); } |