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

Unverified Commit 593a1156 authored by someone5678's avatar someone5678 Committed by LuK1337
Browse files

fixup! Add an option to force pre-O apps to use full screen aspect ratio

Change-Id: Icbfb3de50fba46d76077319491c3814bddb457bf
parent d5385ffb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10502,4 +10502,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    mTaskDescription, mCreateTime);
        }
    }

    public boolean shouldForceLongScreen() {
        return mAtmService.shouldForceLongScreen(packageName);
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -251,7 +251,9 @@ class AppCompatAspectRatioPolicy {
        int activityHeight = containingAppHeight;

        if (containingRatio - aspectRatioToApply > ASPECT_RATIO_ROUNDING_TOLERANCE) {
            if (containingAppWidth < containingAppHeight) {
            if (mActivityRecord.shouldForceLongScreen()) {
                // Use containingAppWidth/Height for maxActivityWidth/Height when force long screen
            } else if (containingAppWidth < containingAppHeight) {
                // Width is the shorter side, so we use that to figure-out what the max. height
                // should be given the aspect ratio.
                activityHeight = (int) ((activityWidth * aspectRatioToApply) + 0.5f);