mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-19 02:19:23 +01:00
fix(Remove screenshot restriction): Improve reliability (#471)
This commit is contained in:
parent
37b3b6a837
commit
50933dc42d
@ -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…
Reference in New Issue
Block a user