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

Commit ff1b8a40 authored by Hai Zhang's avatar Hai Zhang
Browse files

Deprecate PermissionControllerManager.getPrivilegesDescriptionStringForProfile().

The strings provided by
PermissionControllerManager.getPrivilegesDescriptionStringForProfile()
are no longer used by the CDM app since Android T, so we should
deprecate it to prepare for removal.

Bug: 272129940
Test: presubmit
Change-Id: I2a0fc66b0b84854c78fbd9acf3e593806d101dad
parent 9830b616
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11212,7 +11212,7 @@ package android.permission {
  public abstract class PermissionControllerService extends android.app.Service {
    ctor public PermissionControllerService();
    method @NonNull @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public String getPrivilegesDescriptionStringForProfile(@NonNull String);
    method @Deprecated @NonNull @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public String getPrivilegesDescriptionStringForProfile(@NonNull String);
    method @BinderThread public void onApplyStagedRuntimePermissionBackup(@NonNull String, @NonNull android.os.UserHandle, @NonNull java.util.function.Consumer<java.lang.Boolean>);
    method @NonNull public final android.os.IBinder onBind(android.content.Intent);
    method @BinderThread public abstract void onCountPermissionApps(@NonNull java.util.List<java.lang.String>, int, @NonNull java.util.function.IntConsumer);
+5 −0
Original line number Diff line number Diff line
@@ -701,6 +701,8 @@ public final class PermissionControllerManager {
        }, executor);
    }

    // TODO(b/272129940): Remove this API and device profile role description when we drop T
    //  support.
    /**
     * Gets the description of the privileges associated with the given device profiles
     *
@@ -708,8 +710,11 @@ public final class PermissionControllerManager {
     * @param executor Executor on which to invoke the callback
     * @param callback Callback to receive the result
     *
     * @deprecated Device profile privilege descriptions have been bundled in CDM APK since T.
     *
     * @hide
     */
    @Deprecated
    @RequiresPermission(Manifest.permission.MANAGE_COMPANION_DEVICES)
    public void getPrivilegesDescriptionStringForProfile(
            @NonNull String profileName,
+5 −0
Original line number Diff line number Diff line
@@ -348,6 +348,8 @@ public abstract class PermissionControllerService extends Service {
        throw new AbstractMethodError("Must be overridden in implementing class");
    }

    // TODO(b/272129940): Remove this API and device profile role description when we drop T
    //  support.
    /**
     * Get a user-readable sentence, describing the set of privileges that are to be granted to a
     * companion app managing a device of the given profile.
@@ -355,8 +357,11 @@ public abstract class PermissionControllerService extends Service {
     * @param deviceProfileName the
     *      {@link android.companion.AssociationRequest.DeviceProfile device profile} name
     *
     * @deprecated Device profile privilege descriptions have been bundled in CDM APK since T.
     *
     * @hide
     */
    @Deprecated
    @SystemApi
    @RequiresPermission(Manifest.permission.MANAGE_COMPANION_DEVICES)
    @NonNull