Fix logic in disabling BackupTransport in DO mode.

We were disabling backup in consumer mode as well.

BUG=31754835
TEST=android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest

Change-Id: I42e5cfa512fda1b471eb62c7eb8bc346383da2fa
This commit is contained in:
Vladislav Kuzkokov
2016-09-28 13:15:40 +02:00
parent 4e236046ae
commit bbaadc0166

View File

@@ -8981,8 +8981,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
if (!isDeviceOwnerManagedSingleUserDevice()) {
mInjector.securityLogSetLoggingEnabledProperty(false);
Slog.w(LOG_TAG, "Security logging turned off as it's no longer a single user device.");
setBackupServiceEnabledInternal(false);
Slog.w(LOG_TAG, "Backup is off as it's a managed device that has more that one user.");
if (mOwners.hasDeviceOwner()) {
setBackupServiceEnabledInternal(false);
Slog.w(LOG_TAG, "Backup is off as it's a managed device that has more that one user.");
}
}
}