mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent use of recording ViewModel property not initialized yet
This commit is contained in:
parent
08ce2783a4
commit
4b9ca10192
1 changed files with 3 additions and 0 deletions
|
|
@ -102,6 +102,8 @@ class RecordingMediaPlayerViewModel
|
|||
|
||||
@WorkerThread
|
||||
private fun initPlayer() {
|
||||
if (!::recordingModel.isInitialized) return
|
||||
|
||||
Log.i("$TAG Creating player")
|
||||
val playbackSoundCard = AudioUtils.getAudioPlaybackDeviceIdForCallRecordingOrVoiceMessage()
|
||||
val recordingPlayer = coreContext.core.createLocalPlayer(
|
||||
|
|
@ -158,6 +160,7 @@ class RecordingMediaPlayerViewModel
|
|||
@WorkerThread
|
||||
private fun startPlayback() {
|
||||
if (!::player.isInitialized) return
|
||||
if (!::recordingModel.isInitialized) return
|
||||
|
||||
Log.i("$TAG Starting player")
|
||||
if (player.state == Player.State.Closed) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue