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

Commit becfdb07 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "Replace thin Letterbox policy flag" into 24D1-dev

parents 5aabbae3 9fcc8118
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -7,6 +7,16 @@ flag {
  bug: "334077350"
}

flag {
  name: "disable_thin_letterboxing_policy"
  namespace: "large_screen_experiences_app_compat"
  description: "Whether reachability is disabled in case of thin letterboxing"
  bug: "341027847"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "allows_screen_size_decoupled_from_status_bar_and_cutout"
  namespace: "large_screen_experiences_app_compat"
+2 −2
Original line number Diff line number Diff line
@@ -1049,7 +1049,7 @@ final class LetterboxUiController {
     * thin letteboxing
     */
    boolean allowVerticalReachabilityForThinLetterbox() {
        if (!Flags.disableThinLetterboxingReachability()) {
        if (!Flags.disableThinLetterboxingPolicy()) {
            return true;
        }
        // When the flag is enabled we allow vertical reachability only if the
@@ -1062,7 +1062,7 @@ final class LetterboxUiController {
     * thin letteboxing
     */
    boolean allowHorizontalReachabilityForThinLetterbox() {
        if (!Flags.disableThinLetterboxingReachability()) {
        if (!Flags.disableThinLetterboxingPolicy()) {
            return true;
        }
        // When the flag is enabled we allow horizontal reachability only if the
+2 −2
Original line number Diff line number Diff line
@@ -1553,7 +1553,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
    }

    @Test
    @EnableFlags(Flags.FLAG_DISABLE_THIN_LETTERBOXING_REACHABILITY)
    @EnableFlags(Flags.FLAG_DISABLE_THIN_LETTERBOXING_POLICY)
    public void testAllowReachabilityForThinLetterboxWithFlagEnabled() {
        spyOn(mController);
        doReturn(true).when(mController).isVerticalThinLetterboxed();
@@ -1568,7 +1568,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
    }

    @Test
    @DisableFlags(Flags.FLAG_DISABLE_THIN_LETTERBOXING_REACHABILITY)
    @DisableFlags(Flags.FLAG_DISABLE_THIN_LETTERBOXING_POLICY)
    public void testAllowReachabilityForThinLetterboxWithFlagDisabled() {
        spyOn(mController);
        doReturn(true).when(mController).isVerticalThinLetterboxed();