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

Commit fead57e4 authored by tomnatan's avatar tomnatan
Browse files

[3/n] Letterbox Education: Add portrait-only condition to letterbox education eligibility

Test: N/A
Bug: 207010227

Change-Id: I4219faaca37d161211b82c4fbf1ae81fa85581bd
parent 72b8801b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7630,13 +7630,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     *     <li>{@link LetterboxConfiguration#getIsEducationEnabled} is true.
     *     <li>The activity is eligible for fixed orientation letterbox.
     *     <li>The activity is in fullscreen.
     *     <li>The activity is portrait-only.
     * </ul>
     */
    // TODO(b/215316431): Add tests
    boolean isEligibleForLetterboxEducation() {
        return mWmService.mLetterboxConfiguration.getIsEducationEnabled()
                && mIsEligibleForFixedOrientationLetterbox
                && getWindowingMode() == WINDOWING_MODE_FULLSCREEN;
                && getWindowingMode() == WINDOWING_MODE_FULLSCREEN
                && getRequestedConfigurationOrientation() == ORIENTATION_PORTRAIT;
    }

    /**