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

Commit 9007136e authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fixing regression in recents entrance animation when docking app" into nyc-dev

parents 21fece7a c69249fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        mRecentsView.updateStack(stack);

        // Update the nav bar scrim, but defer the animation until the enter-window event
        boolean animateNavBarScrim = !launchState.launchedWhileDocking;
        boolean animateNavBarScrim = !launchState.launchedViaDockGesture;
        updateNavBarScrim(animateNavBarScrim, null);

        // If this is a new instance relaunched by AM, without going through the normal mechanisms,
+2 −11
Original line number Diff line number Diff line
@@ -29,10 +29,9 @@ public class RecentsActivityLaunchState {

    public boolean launchedWithAltTab;
    public boolean launchedFromApp;
    public boolean launchedFromAppDocked;
    public boolean launchedFromHome;
    public boolean launchedViaDragGesture;
    public boolean launchedWhileDocking;
    public boolean launchedViaDockGesture;
    public int launchedToTaskId;
    public int launchedNumVisibleTasks;
    public int launchedNumVisibleThumbnails;
@@ -40,18 +39,10 @@ public class RecentsActivityLaunchState {
    public void reset() {
        launchedFromHome = false;
        launchedFromApp = false;
        launchedFromAppDocked = false;
        launchedToTaskId = -1;
        launchedWithAltTab = false;
        launchedViaDragGesture = false;
        launchedWhileDocking = false;
    }

    /** Called when the configuration has changed, and we want to reset any configuration specific
     * members. */
    public void updateOnConfigurationChange() {
        launchedViaDragGesture = false;
        launchedWhileDocking = false;
        launchedViaDockGesture = false;
    }

    /**
+0 −8
Original line number Diff line number Diff line
@@ -80,12 +80,4 @@ public class RecentsConfiguration {
    public RecentsActivityLaunchState getLaunchState() {
        return mLaunchState;
    }

    /**
     * Called when the configuration has changed, and we want to reset any configuration specific
     * members.
     */
    public void updateOnConfigurationChange() {
        mLaunchState.updateOnConfigurationChange();
    }
}
+1 −4
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.SystemUIApplication;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.EventBus.Event;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
import com.android.systemui.recents.events.activity.ForcedResizableEvent;
@@ -208,7 +207,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
    public void onConfigurationChanged() {
        reloadHeaderBarLayout();
        updateHeaderBarLayout(null /* stack */);
        Recents.getConfiguration().updateOnConfigurationChange();
    }

    /**
@@ -852,13 +850,12 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        // Update the launch state
        launchState.launchedFromHome = false;
        launchState.launchedFromApp = mLaunchedWhileDocking;
        launchState.launchedViaDockGesture = mLaunchedWhileDocking;
        launchState.launchedToTaskId = (topTask != null) ? topTask.id : -1;
        launchState.launchedFromAppDocked = mLaunchedWhileDocking;
        launchState.launchedWithAltTab = mTriggeredFromAltTab;
        launchState.launchedNumVisibleTasks = stackVr.numVisibleTasks;
        launchState.launchedNumVisibleThumbnails = stackVr.numVisibleThumbnails;
        launchState.launchedViaDragGesture = mDraggingInRecents;
        launchState.launchedWhileDocking = mLaunchedWhileDocking;

        if (!animate) {
            startRecentsActivity(ActivityOptions.makeCustomAnimation(mContext, -1, -1));
+2 −2
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public class RecentsView extends FrameLayout {
            // If we are already occluded by the app, then set the final background scrim alpha now.
            // Otherwise, defer until the enter animation completes to animate the scrim alpha with
            // the tasks for the home animation.
            if (launchState.launchedWhileDocking || launchState.launchedFromApp
            if (launchState.launchedViaDockGesture || launchState.launchedFromApp
                    || isTaskStackEmpty) {
                mBackgroundScrim.setAlpha((int) (DEFAULT_SCRIM_ALPHA * 255));
            } else {
@@ -564,7 +564,7 @@ public class RecentsView extends FrameLayout {

    public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) {
        RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
        if (!launchState.launchedWhileDocking && !launchState.launchedFromApp
        if (!launchState.launchedViaDockGesture && !launchState.launchedFromApp
                && mStack.getTaskCount() > 0) {
            animateBackgroundScrim(DEFAULT_SCRIM_ALPHA,
                    TaskStackAnimationHelper.ENTER_FROM_HOME_TRANSLATION_DURATION);
Loading