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

Commit bbaadc01 authored by Vladislav Kuzkokov's avatar Vladislav Kuzkokov
Browse files

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
parent 4e236046
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -8981,10 +8981,12 @@ 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.");
            if (mOwners.hasDeviceOwner()) {
                setBackupServiceEnabledInternal(false);
                Slog.w(LOG_TAG, "Backup is off as it's a managed device that has more that one user.");
            }
        }
    }

    @Override
    public void setSecurityLoggingEnabled(ComponentName admin, boolean enabled) {