* correct behavior of back button on Android
* removing of annoying debug logs on Android
This commit is contained in:
parent
fe7c66cf1d
commit
20846c8eff
4 changed files with 15 additions and 15 deletions
|
@ -196,7 +196,6 @@ class VPNServiceBinder(service: VPNService) : Binder() {
|
|||
try {
|
||||
mListener?.let {
|
||||
if (it.isBinderAlive) {
|
||||
Log.i(tag, "Dispatching event: binder alive")
|
||||
val data = Parcel.obtain()
|
||||
data.writeByteArray(payload?.toByteArray(charset("UTF-8")))
|
||||
it.transact(code, data, Parcel.obtain(), 0)
|
||||
|
|
|
@ -99,8 +99,6 @@ class VPNActivity : org.qtproject.qt.android.bindings.QtActivity() {
|
|||
if (!isBound) {
|
||||
Log.d(TAG, "dispatchParcel: not bound")
|
||||
return
|
||||
} else {
|
||||
Log.d(TAG, "dispatchParcel: bound")
|
||||
}
|
||||
|
||||
val out: Parcel = Parcel.obtain()
|
||||
|
@ -331,12 +329,4 @@ class VPNActivity : org.qtproject.qt.android.bindings.QtActivity() {
|
|||
onActivityMessage(UI_EVENT_QR_CODE_RECEIVED, extra)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.repeatCount == 0) {
|
||||
onBackPressed()
|
||||
return true
|
||||
}
|
||||
return super.onKeyDown(keyCode, event)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue