mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-12 04:26:55 +01:00
fix(Remove screenshot restriction): Improve reliability (#471)
This commit is contained in:
parent
c73f8f752d
commit
4b8a9b9b13
@ -5,6 +5,10 @@ import android.view.WindowManager;
|
|||||||
|
|
||||||
public class RemoveScreenshotRestrictionPatch {
|
public class RemoveScreenshotRestrictionPatch {
|
||||||
|
|
||||||
|
public static void addFlags(Window window, int flags) {
|
||||||
|
window.addFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE);
|
||||||
|
}
|
||||||
|
|
||||||
public static void setFlags(Window window, int flags, int mask) {
|
public static void setFlags(Window window, int flags, int mask) {
|
||||||
window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
|
window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user