Merge "Fixed wipeData() so it doesn't depend on device_admin." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-16 06:45:36 +00:00
committed by Android (Google) Code Review

View File

@@ -6832,7 +6832,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
@Override @Override
public void wipeDataWithReason(int flags, String wipeReasonForUser, public void wipeDataWithReason(int flags, String wipeReasonForUser,
boolean calledOnParentInstance) { boolean calledOnParentInstance) {
if (!mHasFeature) { if (!mHasFeature && !hasCallingOrSelfPermission(permission.MASTER_CLEAR)) {
return; return;
} }
final CallerIdentity caller = getCallerIdentity(); final CallerIdentity caller = getCallerIdentity();