public abstract class DevicePolicyManagerInternal extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DevicePolicyManagerInternal.OnCrossProfileWidgetProvidersChangeListener
Listener for changes in the white-listed packages to show cross-profile
widgets.
|
Constructor and Description |
---|
DevicePolicyManagerInternal() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addOnCrossProfileWidgetProvidersChangeListener(DevicePolicyManagerInternal.OnCrossProfileWidgetProvidersChangeListener listener)
Adds a listener for changes in the white-listed packages to show
cross-profile app widgets.
|
abstract Intent |
createPackageSuspendedDialogIntent(String packageName,
int userId)
Creates an intent to show the admin support dialog to let the user know that the package is
suspended by the admin.
|
abstract List<String> |
getCrossProfileWidgetProviders(int profileId)
Gets the packages whose widget providers are white-listed to be
available in the parent user.
|
abstract boolean |
isActiveAdminWithPolicy(int uid,
int reqPolicy)
Checks if an app with given uid is an active device admin of its user and has the policy
specified.
|
public abstract List<String> getCrossProfileWidgetProviders(int profileId)
This takes the DPMS lock. DO NOT call from PM/UM/AM with their lock held.
profileId
- The profile id.public abstract void addOnCrossProfileWidgetProvidersChangeListener(DevicePolicyManagerInternal.OnCrossProfileWidgetProvidersChangeListener listener)
This takes the DPMS lock. DO NOT call from PM/UM/AM with their lock held.
listener
- The listener to add.public abstract boolean isActiveAdminWithPolicy(int uid, int reqPolicy)
This takes the DPMS lock. DO NOT call from PM/UM/AM with their lock held.
uid
- App uid.reqPolicy
- Required policy, for policies see DevicePolicyManager
.public abstract Intent createPackageSuspendedDialogIntent(String packageName, int userId)
This method does not take the DPMS lock. Safe to be called from anywhere.
packageName
- The package that is suspendeduserId
- The user having the suspended package.