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

Commit b60c873d authored by Alex Dadukin's avatar Alex Dadukin
Browse files

Print RoutingSessionInfo list in the system dump

Bug: -
Test: adb shell dumpsys media_router
Change-Id: I65458c3ae6409fe19b708990b184a67fe0faf61c
parent e76d45b3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ abstract class MediaRoute2Provider {
    public void dump(PrintWriter pw, String prefix) {
        pw.println(prefix + getDebugString());
        prefix += "  ";

        if (mProviderInfo == null) {
            pw.println(prefix + "<provider info not received, yet>");
        } else if (mProviderInfo.getRoutes().isEmpty()) {
@@ -125,6 +126,17 @@ abstract class MediaRoute2Provider {
                pw.printf("%s%s | %s\n", prefix, route.getId(), route.getName());
            }
        }

        pw.println(prefix + "Active routing sessions:");
        synchronized (mLock) {
            if (mSessionInfos.isEmpty()) {
                pw.println(prefix + "  <no active routing sessions>");
            } else {
                for (RoutingSessionInfo routingSessionInfo : mSessionInfos) {
                    routingSessionInfo.dump(pw, prefix + "  ");
                }
            }
        }
    }

    @Override