mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-13 18:21:49 +00:00
Hide overlay windows
This commit is contained in:
@@ -89,6 +89,10 @@ class SettingsViewModel(
|
||||
// Re-authenticate is not feasible on 8.0+
|
||||
list.add(Reauthenticate)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
// Can hide overlay windows on 12.0+
|
||||
list.remove(Tapjack)
|
||||
}
|
||||
}
|
||||
|
||||
return list
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.topjohnwu.magisk.ui.surequest
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
@@ -29,6 +30,9 @@ open class SuRequestActivity : BaseUIActivity<SuRequestViewModel, ActivityReques
|
||||
lockOrientation()
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
window.addFlags(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
window.setHideOverlayWindows(true)
|
||||
}
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
fun showRequest() {
|
||||
|
||||
Reference in New Issue
Block a user