From 3565acccf083c7dee3df633b31257d39e9cd772b Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Fri, 1 Dec 2023 00:29:12 -0800 Subject: [Role Logic Move] Rename feature flag We created the role_controller_in_system_server feature flag, then later made it a fixed flag. However, it has been observed that the fixed flag documentation shows the following warning: IMPORTANT: Modifying the type of an existing flag is not supported. For example, you cannot change a regular flag to a fixed read-only flag, or vice versa. If you need to change the flag type, the best practice is to create a new flag. By renaming the flag, we're effectively removing the old flag and creating a new one. This should mitigate any issues implied by the above warning. Fix: 313529525 Test: atest CtsRoleTestCases Change-Id: I75e8c88984bdf9f5b98cc0a4745e205bcf8a798b --- framework-s/java/android/app/role/RoleManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework-s/java') diff --git a/framework-s/java/android/app/role/RoleManager.java b/framework-s/java/android/app/role/RoleManager.java index 231c72c2c..7d1323b4e 100644 --- a/framework-s/java/android/app/role/RoleManager.java +++ b/framework-s/java/android/app/role/RoleManager.java @@ -728,7 +728,7 @@ public final class RoleManager { */ @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM) @RequiresPermission(Manifest.permission.MANAGE_ROLE_HOLDERS) - @FlaggedApi(Flags.FLAG_ROLE_CONTROLLER_IN_SYSTEM_SERVER) + @FlaggedApi(Flags.FLAG_SYSTEM_SERVER_ROLE_CONTROLLER_ENABLED) @UserHandleAware @SystemApi public boolean isRoleFallbackEnabled(@NonNull String roleName) { @@ -750,7 +750,7 @@ public final class RoleManager { */ @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM) @RequiresPermission(Manifest.permission.MANAGE_ROLE_HOLDERS) - @FlaggedApi(Flags.FLAG_ROLE_CONTROLLER_IN_SYSTEM_SERVER) + @FlaggedApi(Flags.FLAG_SYSTEM_SERVER_ROLE_CONTROLLER_ENABLED) @UserHandleAware @SystemApi public void setRoleFallbackEnabled(@NonNull String roleName, boolean fallbackEnabled) { @@ -980,7 +980,7 @@ public final class RoleManager { @SystemApi public void isRoleVisible(@NonNull String roleName, @NonNull @CallbackExecutor Executor executor, @NonNull Consumer callback) { - if (SdkLevel.isAtLeastV() && Flags.roleControllerInSystemServer()) { + if (SdkLevel.isAtLeastV() && Flags.systemServerRoleControllerEnabled()) { int userId = getContextUserIfAppropriate().getIdentifier(); boolean visible; try { @@ -1021,7 +1021,7 @@ public final class RoleManager { @SystemApi public void isApplicationVisibleForRole(@NonNull String roleName, @NonNull String packageName, @NonNull @CallbackExecutor Executor executor, @NonNull Consumer callback) { - if (SdkLevel.isAtLeastV() && Flags.roleControllerInSystemServer()) { + if (SdkLevel.isAtLeastV() && Flags.systemServerRoleControllerEnabled()) { int userId = getContextUserIfAppropriate().getIdentifier(); try { mService.isApplicationVisibleForRoleAsUser(roleName, packageName, userId); -- cgit v1.2.3-59-g8ed1b