mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
code quality
This commit is contained in:
parent
25fe56116c
commit
666f3ea152
2 changed files with 7 additions and 5 deletions
|
@ -38,9 +38,7 @@ class CallAudioManager(
|
|||
WIRELESS_HEADSET
|
||||
}
|
||||
|
||||
/*
|
||||
* if all calls to audio manager not in the same thread it's not working well...
|
||||
*/
|
||||
// if all calls to audio manager not in the same thread it's not working well.
|
||||
private val executor = Executors.newSingleThreadExecutor()
|
||||
|
||||
private var audioManager: AudioManager? = null
|
||||
|
|
|
@ -545,12 +545,16 @@ class RoomDetailFragment @Inject constructor(
|
|||
val startCallAction = RoomDetailAction.StartCall(isVideoCall)
|
||||
roomDetailViewModel.pendingAction = startCallAction
|
||||
if (isVideoCall) {
|
||||
if (checkPermissions(PERMISSIONS_FOR_VIDEO_IP_CALL, this, VIDEO_CALL_PERMISSION_REQUEST_CODE, R.string.permissions_rationale_msg_camera_and_audio)) {
|
||||
if (checkPermissions(PERMISSIONS_FOR_VIDEO_IP_CALL,
|
||||
this, VIDEO_CALL_PERMISSION_REQUEST_CODE,
|
||||
R.string.permissions_rationale_msg_camera_and_audio)) {
|
||||
roomDetailViewModel.pendingAction = null
|
||||
roomDetailViewModel.handle(startCallAction)
|
||||
}
|
||||
} else {
|
||||
if (checkPermissions(PERMISSIONS_FOR_AUDIO_IP_CALL, this, AUDIO_CALL_PERMISSION_REQUEST_CODE, R.string.permissions_rationale_msg_record_audio)) {
|
||||
if (checkPermissions(PERMISSIONS_FOR_AUDIO_IP_CALL,
|
||||
this, AUDIO_CALL_PERMISSION_REQUEST_CODE,
|
||||
R.string.permissions_rationale_msg_record_audio)) {
|
||||
roomDetailViewModel.pendingAction = null
|
||||
roomDetailViewModel.handle(startCallAction)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue