Skip to content

Commit

Permalink
Validate activePeer during Bluetooth and Speaker audio state transiti…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
cbrune-signal authored and greyson-signal committed Feb 26, 2020
1 parent 4ea886d commit 9506da6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ private void handleSetSpeakerAudio(Intent intent) {
lockManager.updatePhoneState(getInCallPhoneState());
}

sendMessage(viewModelStateFor(activePeer), activePeer, localCameraState, remoteVideoEnabled, bluetoothAvailable, microphoneEnabled);
if (activePeer != null) {
sendMessage(viewModelStateFor(activePeer), activePeer, localCameraState, remoteVideoEnabled, bluetoothAvailable, microphoneEnabled);
}
}

private void handleSetBluetoothAudio(Intent intent) {
Expand All @@ -475,7 +477,9 @@ private void handleSetBluetoothAudio(Intent intent) {
lockManager.updatePhoneState(getInCallPhoneState());
}

sendMessage(viewModelStateFor(activePeer), activePeer, localCameraState, remoteVideoEnabled, bluetoothAvailable, microphoneEnabled);
if (activePeer != null) {
sendMessage(viewModelStateFor(activePeer), activePeer, localCameraState, remoteVideoEnabled, bluetoothAvailable, microphoneEnabled);
}
}

private void handleSetMuteAudio(Intent intent) {
Expand Down

0 comments on commit 9506da6

Please sign in to comment.