Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b24489e2 authored by Vladislav Kuzkokov's avatar Vladislav Kuzkokov Committed by Android (Google) Code Review
Browse files

Merge "Revert "Fix backup for users hit by erroneous backup disabling"" into nyc-mr1-dev

parents 1fefc8b9 9f61d17e
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -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)) {
@@ -9325,10 +9319,6 @@ 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);
@@ -9337,3 +9327,4 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            }
        }
    }
}