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

Commit 91a38dea authored by Vitor Carvalho's avatar Vitor Carvalho
Browse files

Mark supervision-related methods in DPM as deprecated, suggesting clients to...

Mark supervision-related methods in DPM as deprecated, suggesting clients to use SupervisionManager instead.

Bug: 403286013
Test: n/a
Flag: EXEMPT documentation change only
Change-Id: I82b2dc7305b1e72a491c31d09a36643d44673847
parent c9585939
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10324,7 +10324,9 @@ public class DevicePolicyManager {
    /**
     * Returns the configured supervision app if it exists and is the device owner or policy owner.
     * @hide
     * @deprecated Use {@link android.app.supervision.SupervisionManager} methods instead.
     */
    @Deprecated
    public @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
            @NonNull UserHandle user) {
        if (mService != null) {
@@ -10336,7 +10338,9 @@ public class DevicePolicyManager {
    /**
     * Checks if the specified component is the supervision component.
     * @hide
     * @deprecated Use {@link android.app.supervision.SupervisionManager} methods instead.
     */
    @Deprecated
    public boolean isSupervisionComponent(@NonNull ComponentName who) {
        if (mService != null) {
            try {
+4 −0
Original line number Diff line number Diff line
@@ -83,7 +83,9 @@ public abstract class DevicePolicyManagerInternal {
    /**
     * @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.
     * @deprecated Use {@link android.app.supervision.SupervisionManagerInternal} methods instead.
     */
    @Deprecated
    public abstract @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
            @NonNull UserHandle userHandle);

@@ -114,7 +116,9 @@ public abstract class DevicePolicyManagerInternal {
     *
     * @param uid App uid.
     * @return true if the uid is the active supervision app.
     * @deprecated Use {@link android.app.supervision.SupervisionManagerInternal} methods instead.
     */
    @Deprecated
    public abstract boolean isActiveSupervisionApp(int uid);

    /**