Loading core/java/android/app/admin/DevicePolicyManager.java +0 −17 Original line number Diff line number Diff line Loading @@ -12677,21 +12677,4 @@ public class DevicePolicyManager { } } } // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore /** * Used by ManagedProvisioning app to factory reset the device when DO cannto be provisioned. * * @hide */ @RequiresPermission(android.Manifest.permission.MASTER_CLEAR) public void factoryReset(String reason) { if (mService != null) { try { mService.factoryReset(reason); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } } } core/java/android/app/admin/IDevicePolicyManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -488,6 +488,4 @@ interface IDevicePolicyManager { boolean canProfileOwnerResetPasswordWhenLocked(int userId); void setNextOperationSafety(int operation, boolean safe); // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore void factoryReset(String reason); } services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −17 Original line number Diff line number Diff line Loading @@ -1025,23 +1025,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { mSafetyChecker = new OneTimeSafetyChecker(this, operation, safe); } // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore @Override public void factoryReset(String reason) { Preconditions.checkCallAuthorization( hasCallingOrSelfPermission(permission.MASTER_CLEAR)); Slog.w(LOG_TAG, "factoryReset(): " + reason); final long identity = Binder.clearCallingIdentity(); try { FactoryResetter.newBuilder(mContext).setReason(reason).build().factoryReset(); } catch (IOException e) { // Shouldn't happen. Slog.wtf(LOG_TAG, "Could not factory reset", e); } finally { Binder.restoreCallingIdentity(identity); } } /** * Unit test will subclass it to inject mocks. */ Loading Loading
core/java/android/app/admin/DevicePolicyManager.java +0 −17 Original line number Diff line number Diff line Loading @@ -12677,21 +12677,4 @@ public class DevicePolicyManager { } } } // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore /** * Used by ManagedProvisioning app to factory reset the device when DO cannto be provisioned. * * @hide */ @RequiresPermission(android.Manifest.permission.MASTER_CLEAR) public void factoryReset(String reason) { if (mService != null) { try { mService.factoryReset(reason); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } } }
core/java/android/app/admin/IDevicePolicyManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -488,6 +488,4 @@ interface IDevicePolicyManager { boolean canProfileOwnerResetPasswordWhenLocked(int userId); void setNextOperationSafety(int operation, boolean safe); // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore void factoryReset(String reason); }
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −17 Original line number Diff line number Diff line Loading @@ -1025,23 +1025,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { mSafetyChecker = new OneTimeSafetyChecker(this, operation, safe); } // TODO(b/175392542): remove if not needed by ManagedProvisioning app anymore @Override public void factoryReset(String reason) { Preconditions.checkCallAuthorization( hasCallingOrSelfPermission(permission.MASTER_CLEAR)); Slog.w(LOG_TAG, "factoryReset(): " + reason); final long identity = Binder.clearCallingIdentity(); try { FactoryResetter.newBuilder(mContext).setReason(reason).build().factoryReset(); } catch (IOException e) { // Shouldn't happen. Slog.wtf(LOG_TAG, "Could not factory reset", e); } finally { Binder.restoreCallingIdentity(identity); } } /** * Unit test will subclass it to inject mocks. */ Loading