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

Commit 803e3cd3 authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge "Add pending messages to dumpsys"

parents 495e1a8c a51c99f1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -477,6 +477,16 @@ public class CallAudioManager extends CallsManagerListenerBase {

        pw.println("Foreground call:");
        pw.println(mForegroundCall);

        pw.println("CallAudioModeStateMachine pending messages:");
        pw.increaseIndent();
        mCallAudioModeStateMachine.dumpPendingMessages(pw);
        pw.decreaseIndent();

        pw.println("CallAudioRouteStateMachine pending messages:");
        pw.increaseIndent();
        mCallAudioRouteStateMachine.dumpPendingMessages(pw);
        pw.decreaseIndent();
    }

    @VisibleForTesting
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.telecom.Logging.Session;
import android.util.SparseArray;

import com.android.internal.util.IState;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;

@@ -515,6 +516,10 @@ public class CallAudioModeStateMachine extends StateMachine {
        }
    }

    public void dumpPendingMessages(IndentingPrintWriter pw) {
        getHandler().getLooper().dump(pw::println, "");
    }

    @Override
    protected void onPostHandleMessage(Message msg) {
        Log.endSession();
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.telecom.Logging.Session;
import android.util.SparseArray;

import com.android.internal.util.IState;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
import com.android.server.telecom.bluetooth.BluetoothRouteManager;
@@ -1318,6 +1319,10 @@ public class CallAudioRouteStateMachine extends StateMachine {
        quitNow();
    }

    public void dumpPendingMessages(IndentingPrintWriter pw) {
        getHandler().getLooper().dump(pw::println, "");
    }

    /**
     * Sets whether notifications should be suppressed or not.  Used when in a call to ensure the
     * device will not vibrate due to notifications.