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

Commit ea7bdc06 authored by Joanne Chung's avatar Joanne Chung Committed by Android (Google) Code Review
Browse files

Merge "Refine hotword dumpsys information"

parents 75dcc784 67ff750f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -766,11 +766,13 @@ public class VoiceInteractionService extends Service {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("VOICE INTERACTION");
        synchronized (mLock) {
            pw.println("  Sandboxed Detector(s)");
            pw.println("  Sandboxed Detector(s):");
            if (mActiveDetectors.size() == 0) {
                pw.println("    NULL");
                pw.println("    No detector.");
            } else {
                mActiveDetectors.forEach(detector -> {
                    pw.print("  Using sandboxed detection service=");
                    pw.println(detector.isUsingSandboxedDetectionService());
                    detector.dump("    ", pw);
                    pw.println();
                });
+5 −4
Original line number Diff line number Diff line
@@ -578,18 +578,19 @@ final class HotwordDetectionConnection {
    public void dump(String prefix, PrintWriter pw) {
        synchronized (mLock) {
            pw.print(prefix); pw.print("mReStartPeriodSeconds="); pw.println(mReStartPeriodSeconds);
            pw.print(prefix); pw.print("mBound=");
            pw.print(prefix); pw.print("bound for HotwordDetectionService=");
            pw.println(mRemoteHotwordDetectionService != null
                    && mRemoteHotwordDetectionService.isBound());
            pw.print(prefix); pw.print("bound for VisualQueryDetectionService=");
            pw.println(mRemoteVisualQueryDetectionService != null
                    && mRemoteHotwordDetectionService != null
                    && mRemoteHotwordDetectionService.isBound());
            pw.print(prefix); pw.print("mRestartCount=");
            pw.println(mRestartCount);
            pw.print(prefix); pw.print("mLastRestartInstant="); pw.println(mLastRestartInstant);
            pw.print(prefix); pw.print("mDetectorType=");
            pw.println(HotwordDetector.detectorTypeToString(mDetectorType));
            pw.print(prefix); pw.println("DetectorSession(s)");
            pw.print(prefix); pw.println("DetectorSession(s):");
            pw.print(prefix); pw.print("Num of DetectorSession(s)=");
            pw.println(mDetectorSessions.size());
            runForEachDetectorSessionLocked((session) -> {
                session.dumpLocked(prefix, pw);
            });
+2 −0
Original line number Diff line number Diff line
@@ -986,6 +986,8 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
        if (mHotwordDetectionConnection != null) {
            pw.println("  Hotword detection connection:");
            mHotwordDetectionConnection.dump("    ", pw);
        } else {
            pw.println("  No Hotword detection connection");
        }
        if (mActiveSession != null) {
            pw.println("  Active session:");