// Signature format: 2.0 package android.app.role { public interface OnRoleHoldersChangedListener { method public void onRoleHoldersChanged(@NonNull String, @NonNull android.os.UserHandle); } public abstract class RoleControllerService extends android.app.Service { ctor public RoleControllerService(); method @WorkerThread public abstract boolean onAddRoleHolder(@NonNull String, @NonNull String, int); method @Nullable public final android.os.IBinder onBind(@Nullable android.content.Intent); method @WorkerThread public abstract boolean onClearRoleHolders(@NonNull String, int); method @WorkerThread public abstract boolean onGrantDefaultRoles(); method @Deprecated public abstract boolean onIsApplicationQualifiedForRole(@NonNull String, @NonNull String); method public boolean onIsApplicationVisibleForRole(@NonNull String, @NonNull String); method public abstract boolean onIsRoleVisible(@NonNull String); method @WorkerThread public abstract boolean onRemoveRoleHolder(@NonNull String, @NonNull String, int); field public static final String SERVICE_INTERFACE = "android.app.role.RoleControllerService"; } public final class RoleManager { method @RequiresPermission(android.Manifest.permission.OBSERVE_ROLE_HOLDERS) public void addOnRoleHoldersChangedListenerAsUser(@NonNull java.util.concurrent.Executor, @NonNull android.app.role.OnRoleHoldersChangedListener, @NonNull android.os.UserHandle); method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void addRoleHolderAsUser(@NonNull String, @NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer); method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public boolean addRoleHolderFromController(@NonNull String, @NonNull String); method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void clearRoleHoldersAsUser(@NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer); method @NonNull @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public java.util.List getHeldRolesFromController(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public java.util.List getRoleHolders(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public java.util.List getRoleHoldersAsUser(@NonNull String, @NonNull android.os.UserHandle); method @RequiresPermission(android.Manifest.permission.OBSERVE_ROLE_HOLDERS) public void removeOnRoleHoldersChangedListenerAsUser(@NonNull android.app.role.OnRoleHoldersChangedListener, @NonNull android.os.UserHandle); method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void removeRoleHolderAsUser(@NonNull String, @NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer); method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public boolean removeRoleHolderFromController(@NonNull String, @NonNull String); method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public void setRoleNamesFromController(@NonNull java.util.List); field public static final int MANAGE_HOLDERS_FLAG_DONT_KILL_APP = 1; // 0x1 } }