fix(Remove screenshot restriction): Improve reliability (#471)

This commit is contained in:
Linus 2023-11-10 01:06:01 +00:00 committed by GitHub
parent 37b3b6a837
commit 50933dc42d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,10 @@ import android.view.WindowManager;
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) {
window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
}