summaryrefslogtreecommitdiff
path: root/framework-s/java
diff options
context:
space:
mode:
author Jay Thomas Sullivan <jaysullivan@google.com> 2023-12-01 00:29:12 -0800
committer Jay Thomas Sullivan <jaysullivan@google.com> 2023-12-01 12:28:36 -0800
commit3565acccf083c7dee3df633b31257d39e9cd772b (patch)
tree566ba24ef639f9d668dcd409eddb77039b33e2d8 /framework-s/java
parent45ff302be0117b7e0c7ec04593f6d053d8d3d238 (diff)
[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
Diffstat (limited to 'framework-s/java')
-rw-r--r--framework-s/java/android/app/role/RoleManager.java8
1 files changed, 4 insertions, 4 deletions
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<Boolean> 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<Boolean> callback) {
- if (SdkLevel.isAtLeastV() && Flags.roleControllerInSystemServer()) {
+ if (SdkLevel.isAtLeastV() && Flags.systemServerRoleControllerEnabled()) {
int userId = getContextUserIfAppropriate().getIdentifier();
try {
mService.isApplicationVisibleForRoleAsUser(roleName, packageName, userId);