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

Commit d5edfef5 authored by Satoshi Niwa's avatar Satoshi Niwa Committed by Android (Google) Code Review
Browse files

Merge "Fix bmgr whitelist on HSUM devices" into main

parents 6787109a a5f21141
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -130,6 +130,12 @@ public class Bmgr {
            return;
            return;
        }
        }


        // The transport whitelist is a device-scoped property, so we skip isBackupActive check.
        if ("whitelist".equals(op)) {
            doPrintAllowlist();
            return;
        }

        if (!isBackupActive(userId)) {
        if (!isBackupActive(userId)) {
            return;
            return;
        }
        }
@@ -199,11 +205,6 @@ public class Bmgr {
            return;
            return;
        }
        }


        if ("whitelist".equals(op)) {
            doPrintAllowlist();
            return;
        }

        if ("scheduling".equals(op)) {
        if ("scheduling".equals(op)) {
            setSchedulingEnabled(userId);
            setSchedulingEnabled(userId);
            return;
            return;
+2 −5
Original line number Original line Diff line number Diff line
@@ -1101,11 +1101,8 @@ public class BackupManagerService extends IBackupManager.Stub implements BackupM


    @Override
    @Override
    public String[] getTransportWhitelist() {
    public String[] getTransportWhitelist() {
        int userId = binderGetCallingUserId();
        // The transport whitelist is a device-scoped property, so we don't check the user's backup
        if (!isUserReadyForBackup(userId)) {
        // status here.
            return null;
        }
        // No permission check, intentionally.
        String[] whitelistedTransports = new String[mTransportWhitelist.size()];
        String[] whitelistedTransports = new String[mTransportWhitelist.size()];
        int i = 0;
        int i = 0;
        for (ComponentName component : mTransportWhitelist) {
        for (ComponentName component : mTransportWhitelist) {