Revert "Fix backup for users hit by erroneous backup disabling" am: 9f61d17e6a

am: 98a145b5af

Change-Id: I82ae89b2b0ebb5fefd44fec4f10184b6bb7123d3
This commit is contained in:
Vladislav Kuzkokov
2016-10-13 08:48:31 +00:00
committed by android-build-merger

View File

@@ -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) if (Intent.ACTION_USER_UNLOCKED.equals(action)
|| Intent.ACTION_USER_STARTED.equals(action) || Intent.ACTION_USER_STARTED.equals(action)
|| KeyChain.ACTION_STORAGE_CHANGED.equals(action)) { || KeyChain.ACTION_STORAGE_CHANGED.equals(action)) {
@@ -9327,15 +9321,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
} }
synchronized (this) { synchronized (this) {
getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER); getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
return isBackupServiceEnabledInternal(); try {
} IBackupManager ibm = mInjector.getIBackupManager();
} return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM);
private boolean isBackupServiceEnabledInternal() { } catch (RemoteException e) {
try { throw new IllegalStateException("Failed requesting backup service state.", e);
IBackupManager ibm = mInjector.getIBackupManager(); }
return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM);
} catch (RemoteException e) {
throw new IllegalStateException("Failed requesting backup service state.", e);
} }
} }
} }