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

Commit 8c4e9cff authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

Avoid NPE when dumping headset profile state.

Change-Id: I91767bcc09d4e16a9bd5c8dbe2e662a96f9880a5
parent 6eeb6b5f
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -175,15 +175,21 @@ final class HeadsetClientStateMachine extends StateMachine {
        ProfileService.println(sb, "mSubscriberInfo: " + mSubscriberInfo);
        ProfileService.println(sb, "mVoiceRecognitionActive: " + mVoiceRecognitionActive);
        ProfileService.println(sb, "mInBandRingtone: " + mInBandRingtone);

        ProfileService.println(sb, "mCalls:");
        if (mCalls != null) {
            for (BluetoothHeadsetClientCall call : mCalls.values()) {
                ProfileService.println(sb, "  " + call);
            }
        }

        ProfileService.println(sb, "mCallsUpdate:");
        if (mCallsUpdate != null) {
            for (BluetoothHeadsetClientCall call : mCallsUpdate.values()) {
                ProfileService.println(sb, "  " + call);
            }
        }
    }

    private void clearPendingAction() {
        mPendingAction = new Pair<Integer, Object>(NO_ACTION, 0);