From bbaadc01663495736fa597305525e874a896ade4 Mon Sep 17 00:00:00 2001 From: Vladislav Kuzkokov Date: Wed, 28 Sep 2016 13:15:40 +0200 Subject: 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 --- .../com/android/server/devicepolicy/DevicePolicyManagerService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index c2ffa9bbab15..2eceb0b0a52e 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -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."); + } } } -- cgit v1.2.3-59-g8ed1b