- Resume baresip to paused acticity instead of main activity.
This commit is contained in:
@@ -12,23 +12,39 @@ import android.widget.TextView
|
||||
class AboutActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_about)
|
||||
|
||||
BaresipService.activities.add(0, "about")
|
||||
|
||||
val aboutText = findViewById<TextView>(R.id.aboutText)
|
||||
val text = String.format(getString(R.string.about_text), BuildConfig.VERSION_NAME)
|
||||
aboutText.text = HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_LEGACY)
|
||||
aboutText.setMovementMethod(LinkMovementMethod.getInstance())
|
||||
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
BaresipService.activities.remove("about")
|
||||
val i = Intent()
|
||||
setResult(Activity.RESULT_CANCELED, i)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
|
||||
BaresipService.activities.remove("about")
|
||||
super.onBackPressed()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user