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

Commit 0aa0c3dc authored by Massimo Carli's avatar Massimo Carli
Browse files

[29/n] Encapsulate Letterbox state in Policy

Encapsulate letterbox logic in a policy local state
managing the Letterbox object which is the one owning
the actual letterbox Surfaces.

Flag: EXEMPT refactor
Bug: 356385137
Test: atest WmTests:LetterboxUiControllerTest
Test: atest WmTests:SizeCompatTests
Test: atest WmTests:AppCompatUtilsTest

Change-Id: Ide2d8df5f4b4c33f80e6c729ce73d15a4e57ec7d
parent 95eb7cd4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -59,8 +59,7 @@ class AppCompatController {
                mTransparentPolicy, mAppCompatOverrides);
        mAppCompatReachabilityPolicy = new AppCompatReachabilityPolicy(mActivityRecord,
                wmService.mAppCompatConfiguration);
        mAppCompatLetterboxPolicy = new AppCompatLetterboxPolicy(mActivityRecord,
                mTransparentPolicy);
        mAppCompatLetterboxPolicy = new AppCompatLetterboxPolicy(mActivityRecord);
    }

    @NonNull
+241 −175

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ final class LetterboxUiController {
    }

    void layoutLetterboxIfNeeded(WindowState w) {
        mAppCompatLetterboxPolicy.layoutLetterboxIfNeeded(w);
        mAppCompatLetterboxPolicy.start(w);
    }

    boolean isLetterboxEducationEnabled() {