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

Commit 1697b42f authored by Graciela Putri's avatar Graciela Putri Committed by Android (Google) Code Review
Browse files

Merge "[2/n] Add PackageManager.USER_MIN_ASPECT_RATIO_APP_DEFAULT" into main

parents a600fa07 33ea7c9a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2518,6 +2518,7 @@ public abstract class PackageManager {
            USER_MIN_ASPECT_RATIO_16_9,
            USER_MIN_ASPECT_RATIO_3_2,
            USER_MIN_ASPECT_RATIO_FULLSCREEN,
            USER_MIN_ASPECT_RATIO_APP_DEFAULT,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface UserMinAspectRatio {}
@@ -2571,6 +2572,16 @@ public abstract class PackageManager {
     */
    public static final int USER_MIN_ASPECT_RATIO_FULLSCREEN = 6;

    /**
     * Aspect ratio override code: user sets to app's default aspect ratio.
     * This resets both the user-forced aspect ratio, and the device manufacturer
     * per-app override {@link ActivityInfo#OVERRIDE_ANY_ORIENTATION_TO_USER}.
     * It is different from {@link #USER_MIN_ASPECT_RATIO_UNSET} as the latter may
     * apply the device manufacturer per-app orientation override if any,
     * @hide
     */
    public static final int USER_MIN_ASPECT_RATIO_APP_DEFAULT = 7;

    /** @hide */
    @IntDef(flag = true, prefix = { "DELETE_" }, value = {
            DELETE_KEEP_DATA,
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import static android.content.pm.ActivityInfo.screenOrientationToString;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_16_9;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_4_3;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_APP_DEFAULT;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_DISPLAY_SIZE;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_SPLIT_SCREEN;
@@ -1185,6 +1186,7 @@ final class LetterboxUiController {
        mUserAspectRatio = getUserMinAspectRatioOverrideCode();

        return mUserAspectRatio != USER_MIN_ASPECT_RATIO_UNSET
                && mUserAspectRatio != USER_MIN_ASPECT_RATIO_APP_DEFAULT
                && mUserAspectRatio != USER_MIN_ASPECT_RATIO_FULLSCREEN;
    }