|
|
@ -105,16 +105,17 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main), |
|
|
|
view_pager_main.currentItem = 0 |
|
|
|
view_pager_main.currentItem = 0 |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
if (!BaseReadAloudService.pause) { |
|
|
|
if (System.currentTimeMillis() - exitTime > 2000) { |
|
|
|
if (System.currentTimeMillis() - exitTime > 2000) { |
|
|
|
toast(R.string.double_click_exit) |
|
|
|
toast(R.string.double_click_exit) |
|
|
|
exitTime = System.currentTimeMillis() |
|
|
|
exitTime = System.currentTimeMillis() |
|
|
|
} else { |
|
|
|
|
|
|
|
if (BaseReadAloudService.pause) { |
|
|
|
|
|
|
|
finish() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
moveTaskToBack(true) |
|
|
|
moveTaskToBack(true) |
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -128,15 +129,6 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun finish() { |
|
|
|
|
|
|
|
if (System.currentTimeMillis() - exitTime > 2000) { |
|
|
|
|
|
|
|
toast(R.string.double_click_exit) |
|
|
|
|
|
|
|
exitTime = System.currentTimeMillis() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
super.finish() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onDestroy() { |
|
|
|
override fun onDestroy() { |
|
|
|
super.onDestroy() |
|
|
|
super.onDestroy() |
|
|
|
ReadAloud.stop(this) |
|
|
|
ReadAloud.stop(this) |
|
|
|