Clean up app default flag

Flag: EXEMPT clean up flag
Bug: 375291719
Test: atest UserAspectRatioManagerTest
Change-Id: I00cd2677aaca14f01f1a04b736151c74b97e3179
This commit is contained in:
Graciela Wissen Putri
2024-12-13 14:39:13 +00:00
parent 7313080e75
commit 8cf4dabb7c
2 changed files with 11 additions and 42 deletions

View File

@@ -72,7 +72,6 @@ public class UserAspectRatioManager {
"enable_app_compat_user_aspect_ratio_fullscreen";
private static final boolean DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_FULLSCREEN = true;
final boolean mIsUserMinAspectRatioAppDefaultFlagEnabled = Flags.userMinAspectRatioAppDefault();
private final boolean mIgnoreActivityOrientationRequest;
private final Context mContext;
@@ -252,8 +251,7 @@ public class UserAspectRatioManager {
boolean isOverrideToFullscreenEnabled(String pkgName, int userId) {
Boolean appAllowsOrientationOverride = readComponentProperty(mContext.getPackageManager(),
pkgName, PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE);
return mIsUserMinAspectRatioAppDefaultFlagEnabled
&& hasAspectRatioOption(USER_MIN_ASPECT_RATIO_FULLSCREEN, pkgName)
return hasAspectRatioOption(USER_MIN_ASPECT_RATIO_FULLSCREEN, pkgName)
&& !FALSE.equals(appAllowsOrientationOverride)
&& (isFullscreenCompatChangeEnabled(pkgName, userId)
|| isUniversalResizeable(pkgName, userId));
@@ -326,15 +324,13 @@ public class UserAspectRatioManager {
throw new RuntimeException("config_userAspectRatioOverrideValues options must have"
+ " USER_MIN_ASPECT_RATIO_UNSET value");
}
if (mIsUserMinAspectRatioAppDefaultFlagEnabled) {
userMinAspectRatioMap.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
userMinAspectRatioMap.get(USER_MIN_ASPECT_RATIO_UNSET));
mUserAspectRatioOrder.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
mUserAspectRatioOrder.get(USER_MIN_ASPECT_RATIO_UNSET));
if (mUserAspectRatioA11yMap.containsKey(USER_MIN_ASPECT_RATIO_UNSET)) {
mUserAspectRatioA11yMap.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
mUserAspectRatioA11yMap.get(USER_MIN_ASPECT_RATIO_UNSET));
}
userMinAspectRatioMap.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
userMinAspectRatioMap.get(USER_MIN_ASPECT_RATIO_UNSET));
mUserAspectRatioOrder.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
mUserAspectRatioOrder.get(USER_MIN_ASPECT_RATIO_UNSET));
if (mUserAspectRatioA11yMap.containsKey(USER_MIN_ASPECT_RATIO_UNSET)) {
mUserAspectRatioA11yMap.put(USER_MIN_ASPECT_RATIO_APP_DEFAULT,
mUserAspectRatioA11yMap.get(USER_MIN_ASPECT_RATIO_UNSET));
}
return userMinAspectRatioMap;
}