Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a71e664a authored by Andreas Agvard's avatar Andreas Agvard
Browse files

Translucent apps are kept in Recents while in the foreground

Translucent apps that are exluded from Recents are not kept in Recents
while they are the foreground. This is to prevent jank while going to
Recents and thus morphing to another app, and to prevent confusion as
going back to an app might end you back into the excluded app experience
in case of an app like Omnient that is "on-top" of another application.

Fix: 305650114
Test: Manual
Flag: LEGACY INVOKE_OMNI_LPH DISABLED
Change-Id: I24d583434ce62c68436e8928cf3a47a5ce73ecaf
parent 4d9157be
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -16,13 +16,10 @@
package com.android.quickstep.util;

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.quickstep.RemoteAnimationTargets;
import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties;

@@ -151,20 +148,8 @@ public class TransformParams {
                int activityType = app.windowConfiguration.getActivityType();
                if (activityType == ACTIVITY_TYPE_HOME) {
                    mHomeBuilderProxy.onBuildTargetParams(builder, app, this);
                } else {
                    // 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.DECELERATE_QUINT
                                .getInterpolation(progress));
                } else {
                    builder.setAlpha(getTargetAlpha());
                    }

                    proxy.onBuildTargetParams(builder, app, this);
                }
            } else {