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

Commit f5639d2d authored by Srinivas Paladugu's avatar Srinivas Paladugu
Browse files

Mark set/getProtectedPackages APIs as non-parent aware.

Fixes cts test
com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled

Bug: 135486391
Test: atest DevicePolicyManagerTest
Change-Id: Ic614cb4e9e30bc7a91fad57e7de79cd62ddc34d1
parent 71c3dbac
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11468,6 +11468,7 @@ public class DevicePolicyManager {
     * @throws SecurityException if {@code admin} is not a device owner.
     */
    public void setProtectedPackages(@NonNull ComponentName admin, @NonNull List<String> packages) {
        throwIfParentInstance("setProtectedPackages");
        if (mService != null) {
            try {
                mService.setProtectedPackages(admin, packages);
@@ -11484,6 +11485,7 @@ public class DevicePolicyManager {
     * @throws SecurityException if {@code admin} is not a device owner.
     */
    public @NonNull List<String> getProtectedPackages(@NonNull ComponentName admin) {
        throwIfParentInstance("getProtectedPackages");
        if (mService != null) {
            try {
                return mService.getProtectedPackages(admin);