diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index fa79dd965..2eae91a6c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -193,9 +193,6 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { when (keyCode) { - KeyEvent.KEYCODE_BACK -> { - event?.startTracking() - } KeyEvent.KEYCODE_VOLUME_UP -> { if (volumeKeyPage(PageDelegate.Direction.PREV)) { return true @@ -234,7 +231,10 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo } KeyEvent.KEYCODE_BACK -> { event?.let { - if ((event.flags and KeyEvent.FLAG_CANCELED_LONG_PRESS == 0)) { + if ((event.flags and KeyEvent.FLAG_CANCELED_LONG_PRESS == 0) + && event.isTracking + && !event.isCanceled + ) { if (readAloudStatus == Status.PLAY) { ReadAloud.pause(this) toast(R.string.read_aloud_pause)