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

Commit ba241061 authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan
Browse files

[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: Ibb3f76a45e647e374af73429e8f0e01a7013dfd0
parent 4490339b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9146,7 +9146,7 @@ public class DevicePolicyManager {
    @UserHandleAware(enabledSinceTargetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM)
    public boolean isDeviceOwnerApp(String packageName) {
        throwIfParentInstance("isDeviceOwnerApp");
        if (android.permission.flags.Flags.roleControllerInSystemServer()
        if (android.permission.flags.Flags.systemServerRoleControllerEnabled()
                && CompatChanges.isChangeEnabled(IS_DEVICE_OWNER_USER_AWARE)) {
            return isDeviceOwnerAppOnContextUser(packageName);
        }
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ flag {
}

flag {
    name: "role_controller_in_system_server"
    name: "system_server_role_controller_enabled"
    is_fixed_read_only: true
    namespace: "permissions"
    description: "enable role controller in system server"