- avoid possible crash when returning to main activity after deleting an
account - use force when Quit is done again (it may still take some time to quit if there is no network connectivity) - increased version codes
This commit is contained in:
@ -7,8 +7,8 @@ android {
|
|||||||
applicationId = 'com.tutpro.baresip'
|
applicationId = 'com.tutpro.baresip'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode = 31
|
versionCode = 32
|
||||||
versionName = '3.2.2'
|
versionName = '3.2.3'
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
cFlags '-DHAVE_INTTYPES_H'
|
cFlags '-DHAVE_INTTYPES_H'
|
||||||
|
|||||||
@ -427,9 +427,10 @@ class BaresipService: Service() {
|
|||||||
if (this::nm.isInitialized) nm.cancelAll()
|
if (this::nm.isInitialized) nm.cancelAll()
|
||||||
if (this::wl.isInitialized && wl.isHeld) wl.release()
|
if (this::wl.isInitialized && wl.isHeld) wl.release()
|
||||||
if (this::fl.isInitialized && fl.isHeld) fl.release()
|
if (this::fl.isInitialized && fl.isHeld) fl.release()
|
||||||
if (IS_SERVICE_RUNNING)
|
if (IS_SERVICE_RUNNING) {
|
||||||
baresipStop(false)
|
baresipStop(forceStop)
|
||||||
else if (RESTARTING)
|
if (!forceStop) forceStop = true
|
||||||
|
} else if (RESTARTING)
|
||||||
restart()
|
restart()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,6 +453,7 @@ class BaresipService: Service() {
|
|||||||
val DEFAULT_CHANNEL_ID = "com.tutpro.baresip.default"
|
val DEFAULT_CHANNEL_ID = "com.tutpro.baresip.default"
|
||||||
val HIGH_CHANNEL_ID = "com.tutpro.baresip.high"
|
val HIGH_CHANNEL_ID = "com.tutpro.baresip.high"
|
||||||
var disconnected = false
|
var disconnected = false
|
||||||
|
var forceStop = false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -860,9 +860,10 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
ACCOUNTS_CODE -> {
|
ACCOUNTS_CODE -> {
|
||||||
uaAdapter.notifyDataSetChanged()
|
uaAdapter.notifyDataSetChanged()
|
||||||
if ((aorSpinner.selectedItemPosition == -1) && (uas.size > 0))
|
if (uas.size > 0) {
|
||||||
aorSpinner.setSelection(0)
|
if ((aorSpinner.selectedItemPosition == -1) ||
|
||||||
if (aorSpinner.selectedItemPosition >= 0) {
|
(aorSpinner.selectedItemPosition >= uas.size))
|
||||||
|
aorSpinner.setSelection(0)
|
||||||
val acc = uas[aorSpinner.selectedItemPosition].account
|
val acc = uas[aorSpinner.selectedItemPosition].account
|
||||||
if (acc.vmUri != "") {
|
if (acc.vmUri != "") {
|
||||||
if (acc.vmNew > 0)
|
if (acc.vmNew > 0)
|
||||||
@ -873,6 +874,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
} else {
|
} else {
|
||||||
voicemailButton.visibility = View.INVISIBLE
|
voicemailButton.visibility = View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
aorSpinner.setSelection(-1)
|
||||||
}
|
}
|
||||||
baresipService.setAction("UpdateNotification")
|
baresipService.setAction("UpdateNotification")
|
||||||
startService(baresipService)
|
startService(baresipService)
|
||||||
|
|||||||
Reference in New Issue
Block a user