- fixed crash when empty accounts spinner is clicked
This commit is contained in:
@@ -239,8 +239,6 @@ class BaresipService: Service() {
|
||||
fun uaEvent(event: String, uap: String, callp: String) {
|
||||
Log.d(LOG_TAG, "uaEvent got event $event/$uap/$callp")
|
||||
if (!isServiceRunning) return
|
||||
if (event == "exit")
|
||||
return
|
||||
val ua = UserAgent.find(uap)
|
||||
if (ua == null) {
|
||||
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.*
|
||||
import android.view.*
|
||||
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
@@ -138,6 +139,9 @@ class MainActivity : AppCompatActivity() {
|
||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||
if (aorSpinner.selectedItemPosition == -1) {
|
||||
val i = Intent(this, AccountsActivity::class.java)
|
||||
val b = Bundle()
|
||||
b.putString("accp", "")
|
||||
i.putExtras(b)
|
||||
startActivityForResult(i, ACCOUNTS_CODE)
|
||||
true
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user