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

Commit 73471b76 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed wipeData() so it doesn't depend on device_admin.

That method can be called by apps that have the MASTER_CLEAR
permission, even if the device doesn't support device_admin

Test: manual verification using automotive's KitchenSink app
Fixes: 190861794

Change-Id: I97ddb18580593e7b23f8fb55b3346049a2261144
parent 96d2926f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6832,7 +6832,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    @Override
    public void wipeDataWithReason(int flags, String wipeReasonForUser,
            boolean calledOnParentInstance) {
        if (!mHasFeature) {
        if (!mHasFeature && !hasCallingOrSelfPermission(permission.MASTER_CLEAR)) {
            return;
        }
        final CallerIdentity caller = getCallerIdentity();