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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user