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

Commit 9e79dbe0 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Protect against null mBluetoothHeadset" into lmp-dev

parents d9bae25a e241cd6f
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -581,14 +581,19 @@ public final class BluetoothPhoneService extends Service {
                    index, direction, state, isPartOfConference, Log.piiHandle(address),
                    addressType);
        }

        if (mBluetoothHeadset != null) {
            mBluetoothHeadset.clccResponse(
                    index, direction, state, 0, isPartOfConference, address, addressType);
        }
    }

    private void sendClccEndMarker() {
        // End marker is recognized with an index value of 0. All other parameters are ignored.
        if (mBluetoothHeadset != null) {
            mBluetoothHeadset.clccResponse(0 /* index */, 0, 0, 0, false, null, 0);
        }
    }

    /**
     * Returns the caches index for the specified call.  If no such index exists, then an index is