mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 12:27:39 +00:00
Prevent fake clicks on SuRequest
This commit is contained in:
parent
3b8d2fe8b7
commit
022151fefd
@ -6,6 +6,7 @@ import android.content.res.Resources
|
|||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
|
import android.view.WindowManager
|
||||||
import com.topjohnwu.magisk.R
|
import com.topjohnwu.magisk.R
|
||||||
import com.topjohnwu.magisk.core.su.SuCallbackHandler
|
import com.topjohnwu.magisk.core.su.SuCallbackHandler
|
||||||
import com.topjohnwu.magisk.core.su.SuCallbackHandler.REQUEST
|
import com.topjohnwu.magisk.core.su.SuCallbackHandler.REQUEST
|
||||||
@ -32,6 +33,8 @@ open class SuRequestActivity : BaseUIActivity<SuRequestViewModel, ActivityReques
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||||
lockOrientation()
|
lockOrientation()
|
||||||
|
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE,
|
||||||
|
WindowManager.LayoutParams.FLAG_SECURE)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
fun showRequest() {
|
fun showRequest() {
|
||||||
@ -40,11 +43,7 @@ open class SuRequestActivity : BaseUIActivity<SuRequestViewModel, ActivityReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun runHandler(action: String?) {
|
fun runHandler(action: String?) {
|
||||||
SuCallbackHandler(
|
SuCallbackHandler(this, action, intent.extras)
|
||||||
this,
|
|
||||||
action,
|
|
||||||
intent.extras
|
|
||||||
)
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user