Bump min Magisk version to v21.0

Close #5220
This commit is contained in:
topjohnwu
2022-01-18 04:27:40 -08:00
parent 7dfe3e53d5
commit 0ad0ef485c
5 changed files with 19 additions and 94 deletions
@@ -37,26 +37,16 @@ open class SuRequestActivity : BaseUIActivity<SuRequestViewModel, ActivityReques
setTheme(Theme.selected.themeRes)
super.onCreate(savedInstanceState)
fun showRequest() {
viewModel.handleRequest(intent)
}
fun runHandler(action: String?) {
SuCallbackHandler(this, action, intent.extras)
finish()
}
if (intent.action == Intent.ACTION_VIEW) {
val action = intent.getStringExtra("action")
if (action == REQUEST) {
showRequest()
viewModel.handleRequest(intent)
} else {
runHandler(action)
SuCallbackHandler.run(this, action, intent.extras)
finish()
}
} else if (intent.action == REQUEST) {
showRequest()
} else {
runHandler(intent.action)
finish()
}
}