mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash due to calling chatRoom.getLocalAddress() when it's in Instanciated state (because returned value is null)
This commit is contained in:
parent
c2e1333be1
commit
95c4106bd0
6 changed files with 10 additions and 2 deletions
|
|
@ -368,6 +368,8 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
|||
@WorkerThread
|
||||
override fun onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State?) {
|
||||
val state = chatRoom.state
|
||||
if (state == ChatRoom.State.Instantiated) return
|
||||
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Conversation [$id] (${chatRoom.subject}) state changed: [$state]")
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ class ConversationForwardMessageViewModel @UiThread constructor() : AddressSelec
|
|||
@WorkerThread
|
||||
override fun onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State?) {
|
||||
val state = chatRoom.state
|
||||
if (state == ChatRoom.State.Instantiated) return
|
||||
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Conversation [$id] (${chatRoom.subject}) state changed: [$state]")
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ class StartConversationViewModel @UiThread constructor() : AddressSelectionViewM
|
|||
@WorkerThread
|
||||
override fun onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State?) {
|
||||
val state = chatRoom.state
|
||||
if (state == ChatRoom.State.Instantiated) return
|
||||
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Conversation [$id] (${chatRoom.subject}) state changed: [$state]")
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,8 @@ class ContactViewModel @UiThread constructor() : GenericViewModel() {
|
|||
@WorkerThread
|
||||
override fun onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State?) {
|
||||
val state = chatRoom.state
|
||||
if (state == ChatRoom.State.Instantiated) return
|
||||
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Conversation [$id] (${chatRoom.subject}) state changed: [$state]")
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ class HistoryViewModel @UiThread constructor() : GenericViewModel() {
|
|||
@WorkerThread
|
||||
override fun onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State?) {
|
||||
val state = chatRoom.state
|
||||
if (state == ChatRoom.State.Instantiated) return
|
||||
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
Log.i("$TAG Conversation [$id] (${chatRoom.subject}) state changed: [$state]")
|
||||
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ class AccountSettingsViewModel @UiThread constructor() : GenericViewModel() {
|
|||
|
||||
val accountFoundEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
||||
val showUpdatePasswordDialog = MutableLiveData<Event<String>>()
|
||||
|
||||
private lateinit var account: Account
|
||||
private lateinit var natPolicy: NatPolicy
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue