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

Commit e9a2ae61 authored by Winson Chung's avatar Winson Chung
Browse files

Allow non-fullscreen activities to set requested orientation.

- The requested orientation will apply once the activity is returned to
  the fullscreen stack.

Bug: 36240543
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: testSetRequestedOrientationWhilePinned
Change-Id: I152bb77d8f9eda4ffdb64a03c16a8b014a74a0a2
parent acdd2699
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1953,11 +1953,6 @@ final class ActivityRecord implements AppWindowContainerListener {
    }

    void setRequestedOrientation(int requestedOrientation) {
        if (task != null && (!task.mFullscreen || !task.getStack().mFullscreen)) {
            // Fixed screen orientation isn't supported when activities aren't in full screen mode.
            return;
        }

        final int displayId = getDisplayId();
        final Configuration displayConfig =
                mStackSupervisor.getDisplayOverrideConfiguration(displayId);