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

Commit 5d6da708 authored by Andrea Zilio's avatar Andrea Zilio Committed by Android Build Coastguard Worker
Browse files

Re-enable backup dumpsys in bugreports, and remove some behaviour change...

Re-enable backup dumpsys in bugreports, and remove some behaviour change introduced after ag/26833810
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1d2f763fa1c3ff7b499923abc547040d82279c95)
Merged-In: I501151d4d73490b3f6f3c0326e741ec046cad36b
Change-Id: I501151d4d73490b3f6f3c0326e741ec046cad36b
parent 78cdab07
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -1516,7 +1516,7 @@ public class BackupManagerService extends IBackupManager.Stub {
        String op = nextArg(args, argIndex);
        argIndex++;

        if ("--help".equals(op)) {
        if ("--help".equals(op) || "-h".equals(op)) {
            showDumpUsage(pw);
            return;
        }
@@ -1548,8 +1548,10 @@ public class BackupManagerService extends IBackupManager.Stub {
            }
            return;
        }
        if (op == null || "agents".startsWith(op) || "transportclients".equals(op)
                || "transportstats".equals(op)) {

        // We get here if we have no parameters or parameters unkonwn to us.
        // Print dumpsys info in either case: bug report creation passes some parameter to
        // dumpsys that we don't need to check.
        for (int i = 0; i < mUserServices.size(); i++) {
            UserBackupManagerService userBackupManagerService =
                    getServiceForUserIfCallerHasPermission(mUserServices.keyAt(i), "dump()");
@@ -1557,10 +1559,6 @@ public class BackupManagerService extends IBackupManager.Stub {
                userBackupManagerService.dump(fd, pw, args);
            }
        }
            return;
        }

        showDumpUsage(pw);
    }

    private String nextArg(String[] args, int argIndex) {