Fixed databinding build issue that happens sometimes, caused by property & get/set functions names colliding
This commit is contained in:
parent
55c4c908a8
commit
4f667c7734
2 changed files with 6 additions and 8 deletions
|
@ -91,8 +91,6 @@ LinphoneSdkBuildDir=/home/<username>/linphone-sdk/build/
|
|||
- If you encounter the `couldn't find "libc++_shared.so"` crash when the app starts, simply clean the project in Android Studio (under Build menu) and build again.
|
||||
Also check you have built the SDK for the right CPU architecture using the `-DLINPHONESDK_ANDROID_ARCHS=armv7,arm64,x86,x86_64` cmake parameter.
|
||||
|
||||
- If during the build you have `DataBinderMapperImpl.java error: cannot find symbol`, `Could not find accessor org.linphone.activities.main.chat.viewmodels.ChatRoomsListViewModel.chatRooms` or `Could not find accessor org.linphone.activities.main.settings.viewmodels.NetworkSettingsViewModel.sipPort`, try building again. It is merely a build failure from Android Studio that happens sometimes.
|
||||
|
||||
- Push notification might not work when app has been started by Android Studio consecutively to an install. Remove the app from the recent activity view and start it again using the launcher icon to resolve this.
|
||||
|
||||
## Troubleshouting
|
||||
|
|
|
@ -56,7 +56,7 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
val randomPortsListener = object : SettingListenerStub() {
|
||||
override fun onBoolValueChanged(newValue: Boolean) {
|
||||
val port = if (newValue) -1 else 5060
|
||||
setSipPort(port)
|
||||
setTransportPort(port)
|
||||
sipPort.value = port
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
override fun onTextValueChanged(newValue: String) {
|
||||
try {
|
||||
val port = newValue.toInt()
|
||||
setSipPort(port)
|
||||
setTransportPort(port)
|
||||
} catch (nfe: NumberFormatException) {
|
||||
}
|
||||
}
|
||||
|
@ -79,11 +79,11 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
pushNotifications.value = core.isPushNotificationEnabled
|
||||
pushNotificationsAvailable.value = core.isPushNotificationAvailable
|
||||
legacyPushNotificationFormat.value = prefs.useLegacyPushNotificationFormat
|
||||
randomPorts.value = getSipPort() == -1
|
||||
sipPort.value = getSipPort()
|
||||
randomPorts.value = getTransportPort() == -1
|
||||
sipPort.value = getTransportPort()
|
||||
}
|
||||
|
||||
private fun setSipPort(port: Int) {
|
||||
private fun setTransportPort(port: Int) {
|
||||
val transports = core.transports
|
||||
transports.udpPort = port
|
||||
transports.tcpPort = port
|
||||
|
@ -91,7 +91,7 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
core.transports = transports
|
||||
}
|
||||
|
||||
private fun getSipPort(): Int {
|
||||
private fun getTransportPort(): Int {
|
||||
val transports = core.transports
|
||||
if (transports.udpPort > 0) return transports.udpPort
|
||||
return transports.tcpPort
|
||||
|
|
Loading…
Reference in a new issue