Fixed UI glitch if disconnecting bluetooth in call while audio routes menu is visible

This commit is contained in:
Sylvain Berfini 2019-12-12 10:09:40 +01:00
parent 937b9b8503
commit fe2d8b16c2

View file

@ -747,6 +747,11 @@ public class CallActivity extends LinphoneGenericActivity
boolean isBluetoothAvailable = mAudioManager.isBluetoothHeadsetConnected(); boolean isBluetoothAvailable = mAudioManager.isBluetoothHeadsetConnected();
mSpeaker.setVisibility(isBluetoothAvailable ? View.GONE : View.VISIBLE); mSpeaker.setVisibility(isBluetoothAvailable ? View.GONE : View.VISIBLE);
mAudioRoute.setVisibility(isBluetoothAvailable ? View.VISIBLE : View.GONE); mAudioRoute.setVisibility(isBluetoothAvailable ? View.VISIBLE : View.GONE);
if (!isBluetoothAvailable) {
mRouteBluetooth.setVisibility(View.GONE);
mRouteSpeaker.setVisibility(View.GONE);
mRouteEarpiece.setVisibility(View.GONE);
}
mVideo.setEnabled( mVideo.setEnabled(
LinphonePreferences.instance().isVideoEnabled() LinphonePreferences.instance().isVideoEnabled()