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

Commit 1ab52b08 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Request legacy app transition when moveActivityToFront" into tm-qpr-dev

parents f3e2db05 851685c4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -55,7 +55,9 @@ import static android.content.pm.ActivityInfo.launchModeToString;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.Process.INVALID_UID;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.TRANSIT_NONE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;

import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_CONFIGURATION;
@@ -2398,6 +2400,11 @@ class ActivityStarter {
                if (actuallyMoved) {
                    // Only record if the activity actually moved.
                    mMovedToTopActivity = act;
                    if (mNoAnimation) {
                        act.mDisplayContent.prepareAppTransition(TRANSIT_NONE);
                    } else {
                        act.mDisplayContent.prepareAppTransition(TRANSIT_TO_FRONT);
                    }
                }
                act.updateOptionsLocked(mOptions);
                deliverNewIntent(act, intentGrants);
+8 −0
Original line number Diff line number Diff line
@@ -2605,6 +2605,14 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        return false;
    }

    @Override
    boolean canCustomizeAppTransition() {
        // This is only called when the app transition is going to be played by system server. In
        // this case, we should allow custom app transition for fullscreen embedded TaskFragment
        // just like Activity.
        return isEmbedded() && matchParentBounds();
    }

    /** Clear {@link #mLastPausedActivity} for all {@link TaskFragment} children */
    void clearLastPausedActivity() {
        forAllTaskFragments(taskFragment -> taskFragment.mLastPausedActivity = null);