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

Commit b0ceadb9 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Ignore orientation of finishing activity" into main

parents d2e0cd60 893184a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8065,7 +8065,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     */
    @Override
    int getOrientation(int candidate) {
        if (shouldIgnoreOrientationRequests()) {
        if (finishing || shouldIgnoreOrientationRequests()) {
            return SCREEN_ORIENTATION_UNSET;
        }

+3 −0
Original line number Diff line number Diff line
@@ -2640,6 +2640,9 @@ public class ActivityRecordTests extends WindowTestsBase {
        // Can specify orientation if the current orientation candidate is orientation behind.
        assertEquals(SCREEN_ORIENTATION_LANDSCAPE,
                activity.getOrientation(SCREEN_ORIENTATION_BEHIND));
        activity.makeFinishingLocked();
        assertEquals("Finishing activity must not report orientation",
                SCREEN_ORIENTATION_UNSET, activity.getOrientation(SCREEN_ORIENTATION_BEHIND));

        final ActivityRecord translucentActivity = new ActivityBuilder(mAtm)
                .setActivityTheme(android.R.style.Theme_Translucent)