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

Commit 3120f97c authored by Calvin On's avatar Calvin On Committed by William Escande
Browse files

Fix logging in HeadsetClientStateMachine.

aosp/703867 incorrectly killed the entire HSM dumpsys if there
is no connected HFP device.

Bug: 240690432
Test: manual test
Change-Id: I271da857381189d09f0861aa93b0edad8678b82f
(cherry picked from commit 500ec8a6fe2bf57dcbf653f2ba00b17de272939b)
parent 735aeb1e
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -200,11 +200,12 @@ public class HeadsetClientStateMachine extends StateMachine {
    }

    public void dump(StringBuilder sb) {
        if (mCurrentDevice == null) return;
        if (mCurrentDevice != null) {
            ProfileService.println(sb,
                    "==== StateMachine for " + mCurrentDevice + " ====");
            ProfileService.println(sb, "  mCurrentDevice: " + mCurrentDevice.getAddress() + "("
                    + Utils.getName(mCurrentDevice) + ") " + this.toString());
        }
        ProfileService.println(sb, "  mAudioState: " + mAudioState);
        ProfileService.println(sb, "  mAudioWbs: " + mAudioWbs);
        ProfileService.println(sb, "  mIndicatorNetworkState: " + mIndicatorNetworkState);