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

Commit e2793832 authored by Alex Dadukin's avatar Alex Dadukin Committed by Android (Google) Code Review
Browse files

Merge "Print RoutingSessionInfo list in the system dump" into main

parents 06d93787 b60c873d
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