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

Commit f377c28f authored by Felipe Leme's avatar Felipe Leme
Browse files

Add parent check on DevicePolicyManager.isSafeOperation()

Test: atest ManagedProfileTest#testParentProfileApiDisabled
Fixes: 180922138

Change-Id: I8b709edca8bd96569484be2f14bd7cb9768fa54e
parent 4f507282
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2997,6 +2997,7 @@ public class DevicePolicyManager {
     */
    // TODO(b/173541467): should it throw SecurityException if caller is not admin?
    public boolean isSafeOperation(@OperationSafetyReason int reason) {
        throwIfParentInstance("isSafeOperation");
        if (mService == null) return false;
        try {