Merge "Fixing NPE in device policy tests" into cw-f-dev

This commit is contained in:
Ashley Smith
2016-08-08 16:22:38 +00:00
committed by Android (Google) Code Review

View File

@@ -5876,8 +5876,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
updateDeviceOwnerLocked();
disableSecurityLoggingIfNotCompliant();
try {
// Reactivate backup service.
mInjector.getIBackupManager().setBackupServiceActive(UserHandle.USER_SYSTEM, true);
if (mInjector.getIBackupManager() != null) {
// Reactivate backup service.
mInjector.getIBackupManager().setBackupServiceActive(UserHandle.USER_SYSTEM, true);
}
} catch (RemoteException e) {
throw new IllegalStateException("Failed reactivating backup service.", e);
}