diff options
| author | 2016-10-13 08:41:52 +0000 | |
|---|---|---|
| committer | 2016-10-13 08:41:52 +0000 | |
| commit | 98a145b5afb71b5fb95092d9df0e6453dad77f79 (patch) | |
| tree | 51903cd7633d29176b2d4b8d6f07951f19211b57 | |
| parent | 0dcdae30cf37bf776741116f5736164d2bd9e67b (diff) | |
| parent | 9f61d17e6a41e80732fb78a8a8fb723b92498a15 (diff) | |
Revert "Fix backup for users hit by erroneous backup disabling"
am: 9f61d17e6a
Change-Id: I460fbb670fbc7a724c981c4fceae0048ff4c9ded
| -rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index fc14444ba6ef..f1166221ae3f 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -496,12 +496,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } }); } - // STOPSHIP: Remove this code once all dogfood devices are fixed. See b/31754835 - if (Intent.ACTION_BOOT_COMPLETED.equals(action) && !mOwners.hasDeviceOwner() - && !isBackupServiceEnabledInternal()) { - setBackupServiceEnabledInternal(true); - Slog.w(LOG_TAG, "Fix backup for device that is not in Device Owner mode."); - } if (Intent.ACTION_USER_UNLOCKED.equals(action) || Intent.ACTION_USER_STARTED.equals(action) || KeyChain.ACTION_STORAGE_CHANGED.equals(action)) { @@ -9327,15 +9321,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } synchronized (this) { getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER); - return isBackupServiceEnabledInternal(); - } - } - private boolean isBackupServiceEnabledInternal() { - try { - IBackupManager ibm = mInjector.getIBackupManager(); - return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM); - } catch (RemoteException e) { - throw new IllegalStateException("Failed requesting backup service state.", e); + try { + IBackupManager ibm = mInjector.getIBackupManager(); + return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM); + } catch (RemoteException e) { + throw new IllegalStateException("Failed requesting backup service state.", e); + } } } } |