Merge "Update deletion conditions for a package's UsageStats." into rvc-dev

This commit is contained in:
Varun Shah
2021-11-11 18:47:24 +00:00
committed by Android (Google) Code Review
4 changed files with 43 additions and 9 deletions

View File

@@ -16,6 +16,8 @@
package android.app.admin;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.content.ComponentName;
import android.content.Intent;
@@ -75,6 +77,13 @@ public abstract class DevicePolicyManagerInternal {
public abstract void addOnCrossProfileWidgetProvidersChangeListener(
OnCrossProfileWidgetProvidersChangeListener listener);
/**
* @param userHandle the handle of the user whose profile owner is being fetched.
* @return the configured supervision app if it exists and is the device owner or policy owner.
*/
public abstract @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
@NonNull UserHandle userHandle);
/**
* Checks if an app with given uid is an active device admin of its user and has the policy
* specified.