RoleManager

Class of android.app.role · RoleManager.java · Android's reference

public final class RoleManager

The roles of the device's default apps. The device has the roles, and the app holds none of them: a request for one opens the system's dialog, which the user backs out of (snx.android.app.Activities answers RESULT_CANCELED).

Fields

public static final String ROLE_ASSISTANT = "android.app.role.ASSISTANT" source
public static final String ROLE_BROWSER = "android.app.role.BROWSER" source
public static final String ROLE_CALL_REDIRECTION = "android.app.role.CALL_REDIRECTION" source
public static final String ROLE_CALL_SCREENING = "android.app.role.CALL_SCREENING" source
public static final String ROLE_DIALER = "android.app.role.DIALER" source
public static final String ROLE_EMERGENCY = "android.app.role.EMERGENCY" source
public static final String ROLE_HOME = "android.app.role.HOME" source
public static final String ROLE_SMS = "android.app.role.SMS" source
public static final String ROLE_NOTES = "android.app.role.NOTES" source
public static final String ROLE_WALLET = "android.app.role.WALLET" source
public static final String ACTION_REQUEST_ROLE = "android.app.role.action.REQUEST_ROLE" source
public static final String EXTRA_ROLE_NAME = "android.app.role.extra.ROLE_NAME" source

Constructors

public RoleManager() empty body source

Methods

public boolean isRoleAvailable(String roleName) source
public boolean isRoleHeld(String roleName) source
public Intent createRequestRoleIntent(String roleName) source
public List<String> getRoleHolders(String roleName) source
public List<String> getRoleHoldersAsUser(String roleName, UserHandle user) source
public void addRoleHolderAsUser(String roleName, String packageName, int flags, UserHandle user, Executor executor, Consumer<Boolean> callback) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.