- fixed crash when empty accounts spinner is clicked
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ android {
|
|||||||
applicationId = 'com.tutpro.baresip'
|
applicationId = 'com.tutpro.baresip'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode = 35
|
versionCode = 36
|
||||||
versionName = '4.1.1'
|
versionName = '4.1.2'
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
cFlags '-DHAVE_INTTYPES_H'
|
cFlags '-DHAVE_INTTYPES_H'
|
||||||
|
|||||||
@@ -154,9 +154,6 @@ static void ua_event_handler(struct ua *ua, enum ua_event ev,
|
|||||||
case UA_EVENT_AUDIO_ERROR:
|
case UA_EVENT_AUDIO_ERROR:
|
||||||
mem_deref(call);
|
mem_deref(call);
|
||||||
return;
|
return;
|
||||||
case UA_EVENT_EXIT:
|
|
||||||
re_snprintf(event_buf, sizeof event_buf, "%s", "exit");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -419,6 +416,8 @@ Java_com_tutpro_baresip_BaresipService_baresipStart(JNIEnv *env, jobject instanc
|
|||||||
if (err) {
|
if (err) {
|
||||||
LOGE("stopping UAs due to error: (%d)\n", err);
|
LOGE("stopping UAs due to error: (%d)\n", err);
|
||||||
ua_stop_all(true);
|
ua_stop_all(true);
|
||||||
|
} else {
|
||||||
|
LOGI("main loop exit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
play = mem_deref(play);
|
play = mem_deref(play);
|
||||||
|
|||||||
@@ -239,8 +239,6 @@ class BaresipService: Service() {
|
|||||||
fun uaEvent(event: String, uap: String, callp: String) {
|
fun uaEvent(event: String, uap: String, callp: String) {
|
||||||
Log.d(LOG_TAG, "uaEvent got event $event/$uap/$callp")
|
Log.d(LOG_TAG, "uaEvent got event $event/$uap/$callp")
|
||||||
if (!isServiceRunning) return
|
if (!isServiceRunning) return
|
||||||
if (event == "exit")
|
|
||||||
return
|
|
||||||
val ua = UserAgent.find(uap)
|
val ua = UserAgent.find(uap)
|
||||||
if (ua == null) {
|
if (ua == null) {
|
||||||
Log.w(LOG_TAG, "uaEvent did not find ua $uap")
|
Log.w(LOG_TAG, "uaEvent did not find ua $uap")
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import android.text.TextWatcher
|
|||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import android.view.*
|
import android.view.*
|
||||||
|
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
@@ -138,6 +139,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||||
if (aorSpinner.selectedItemPosition == -1) {
|
if (aorSpinner.selectedItemPosition == -1) {
|
||||||
val i = Intent(this, AccountsActivity::class.java)
|
val i = Intent(this, AccountsActivity::class.java)
|
||||||
|
val b = Bundle()
|
||||||
|
b.putString("accp", "")
|
||||||
|
i.putExtras(b)
|
||||||
startActivityForResult(i, ACCOUNTS_CODE)
|
startActivityForResult(i, ACCOUNTS_CODE)
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user