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

Commit 17dd2444 authored by Tom Natan's avatar Tom Natan Committed by Android (Google) Code Review
Browse files

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

parents 16e0b726 fead57e4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7655,13 +7655,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;
    }

    /**