- Fixed rare crash that can happen when first account is created and
message or call comes in before user has returned to main activity.
This commit is contained in:
@ -7,8 +7,8 @@ android {
|
||||
applicationId = 'com.tutpro.baresip'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
versionCode = 44
|
||||
versionName = '5.4.1'
|
||||
versionCode = 45
|
||||
versionName = '5.4.2'
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cFlags '-DHAVE_INTTYPES_H'
|
||||
|
||||
@ -474,7 +474,8 @@ class MainActivity : AppCompatActivity() {
|
||||
Log.e("Baresip", "Incoming call $callp not found")
|
||||
return
|
||||
}
|
||||
if (ua != UserAgent.uas()[aorSpinner.selectedItemPosition]) {
|
||||
if ((aorSpinner.selectedItemPosition == -1) ||
|
||||
(ua != UserAgent.uas()[aorSpinner.selectedItemPosition])) {
|
||||
aorSpinner.setSelection(account_index)
|
||||
} else {
|
||||
callTitle.text = "Incoming call from ..."
|
||||
@ -655,7 +656,8 @@ class MainActivity : AppCompatActivity() {
|
||||
Message.add(Message(aor, peerUri, R.drawable.arrow_down_green, msgText,
|
||||
time.toLong(), true))
|
||||
if (Utils.isVisible()) {
|
||||
if (ua != UserAgent.uas()[aorSpinner.selectedItemPosition])
|
||||
if ((aorSpinner.selectedItemPosition == -1) ||
|
||||
(ua != UserAgent.uas()[aorSpinner.selectedItemPosition]))
|
||||
aorSpinner.setSelection(account_index)
|
||||
val i = Intent(applicationContext, ChatsActivity::class.java)
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
@ -678,11 +680,12 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
if ((aorSpinner.selectedItemPosition >= 0) &&
|
||||
(ua == UserAgent.uas()[aorSpinner.selectedItemPosition]))
|
||||
(ua == UserAgent.uas()[aorSpinner.selectedItemPosition])) {
|
||||
if (acc.vmNew > 0)
|
||||
voicemailButton.setImageResource(R.drawable.voicemail_new)
|
||||
else
|
||||
voicemailButton.setImageResource(R.drawable.voicemail)
|
||||
}
|
||||
}
|
||||
else -> Log.w("Baresip", "Unknown event '${ev[0]}'")
|
||||
}
|
||||
|
||||
2
fastlane/metadata/android/en-US/changelogs/5.4.2.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/5.4.2.txt
Normal file
@ -0,0 +1,2 @@
|
||||
- Fixed rare crash that can happen when first account is created and
|
||||
message or call comes in before user has returned to main activity.
|
||||
Reference in New Issue
Block a user