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

Commit 0d7eebc9 authored by Paul Duffin's avatar Paul Duffin
Browse files

Remove unnecessary @Deprecated on parameter of deprecated method

Due to a bug in Metalava `@Deprecated` annotations on parameters were
ignored, both for suppressing issues and also in output files like API
signature files and stub source files. However, deprecating a method
did have the effect of deprecating the parameter, which means that the
`@Deprecated` annotation is unnecessary on a deprecated method.

The bug in Metalava has been fixed but the presence of the
`@Deprecated` annotation on the `DevicePolicyManager`'s
`setActiveProfileOwner` method's `ownerName` parameter means that the
Metalava fix causes a change in the API signature file. Rather than
change the API signature file to add information that is useless, or
complicate Metalava with special cases this change removes the
unnecessary `@Deprecated` annotation from the parameter.

Bug: 315206833
Test: ./gradlew
Change-Id: I4a9b41ac1a80d1c3461a571761a826cd096ef551
parent 6e39bef5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9344,7 +9344,7 @@ public class DevicePolicyManager {
    @Deprecated
    @SystemApi
    @RequiresPermission(MANAGE_DEVICE_ADMINS)
    public boolean setActiveProfileOwner(@NonNull ComponentName admin, @Deprecated String ownerName)
    public boolean setActiveProfileOwner(@NonNull ComponentName admin, String ownerName)
            throws IllegalArgumentException {
        throwIfParentInstance("setActiveProfileOwner");
        if (mService != null) {