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

Commit b16f1d32 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Post clean up starting window related data." into main

parents 388433fc bdcf13a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7644,6 +7644,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            // This could only happen when the window is removed from hierarchy. So do not keep its
            // reference anymore.
            mStartingWindow = null;
            mStartingData = null;
            mStartingSurface = null;
        }
        if (mChildren.size() == 0 && mVisibleSetFromTransferredStartingWindow) {
            // We set the visible state to true for the token from a transferred starting
+13 −0
Original line number Diff line number Diff line
@@ -2726,6 +2726,19 @@ public class ActivityRecordTests extends WindowTestsBase {
        assertNoStartingWindow(activity);
    }

    @Test
    public void testPostCleanupStartingWindow() {
        registerTestStartingWindowOrganizer();
        final ActivityRecord activity = new ActivityBuilder(mAtm).setCreateTask(true).build();
        activity.addStartingWindow(mPackageName, android.R.style.Theme, null, true, true, false,
                true, false, false, false);
        waitUntilHandlersIdle();
        assertHasStartingWindow(activity);
        // Simulate Shell remove starting window actively.
        activity.mStartingWindow.removeImmediately();
        assertNoStartingWindow(activity);
    }

    private void testLegacySplashScreen(int targetSdk, int verifyType) {
        final ActivityRecord activity = new ActivityBuilder(mAtm).setCreateTask(true).build();
        activity.mTargetSdk = targetSdk;