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

Commit deecd8f6 authored by Kazuki Takise's avatar Kazuki Takise Committed by Android (Google) Code Review
Browse files

Merge "Resume app switching when app process is restarted" into main

parents d5333c88 928cd154
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -156,6 +156,7 @@ import static android.view.WindowManager.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENAB
import static android.view.WindowManager.PROPERTY_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING_STATE_SHARING;
import static android.view.WindowManager.PROPERTY_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING_STATE_SHARING;
import static android.view.WindowManager.TRANSIT_RELAUNCH;
import static android.view.WindowManager.TRANSIT_RELAUNCH;
import static android.view.WindowManager.hasWindowExtensionsEnabled;
import static android.view.WindowManager.hasWindowExtensionsEnabled;
import static android.window.DesktopExperienceFlags.ENABLE_RESTART_MENU_FOR_CONNECTED_DISPLAYS;
import static android.window.TransitionInfo.FLAGS_IS_OCCLUDED_NO_ANIMATION;
import static android.window.TransitionInfo.FLAGS_IS_OCCLUDED_NO_ANIMATION;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;
import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;
@@ -8836,6 +8837,14 @@ final class ActivityRecord extends WindowToken {
            return;
            return;
        }
        }


        // Process restart may require trampoline activity launch, for which app switching needs to
        // be enabled. App switching may be allowed only for specific cases while/after Recents is
        // shown. As when a process is restarted, the user should be interacting with the app, so
        // it's safe to do this. See b/421048151 for more detail.
        if (ENABLE_RESTART_MENU_FOR_CONNECTED_DISPLAYS.isTrue()) {
            mAtmService.resumeAppSwitches();
        }

        if (mTransitionController.isShellTransitionsEnabled()) {
        if (mTransitionController.isShellTransitionsEnabled()) {
            final Transition transition = new Transition(TRANSIT_RELAUNCH, 0 /* flags */,
            final Transition transition = new Transition(TRANSIT_RELAUNCH, 0 /* flags */,
                    mTransitionController, mWmService.mSyncEngine);
                    mTransitionController, mWmService.mSyncEngine);