mirror of
https://github.com/LSPosed/DisableFlagSecure.git
synced 2025-05-04 19:19:41 +08:00
don't alter allowProtected
This commit is contained in:
parent
c5f1300bad
commit
5fddba5a28
@ -224,7 +224,6 @@ public class DisableFlagSecure extends XposedModule {
|
||||
}
|
||||
|
||||
private static Field captureSecureLayersField;
|
||||
private static Field allowProtectedField;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.S)
|
||||
private void hookScreenCapture(ClassLoader classLoader) throws ClassNotFoundException, NoSuchFieldException {
|
||||
@ -236,8 +235,6 @@ public class DisableFlagSecure extends XposedModule {
|
||||
"android.view.SurfaceControl$CaptureArgs");
|
||||
captureSecureLayersField = captureArgsClazz.getDeclaredField("mCaptureSecureLayers");
|
||||
captureSecureLayersField.setAccessible(true);
|
||||
allowProtectedField = captureArgsClazz.getDeclaredField("mAllowProtected");
|
||||
allowProtectedField.setAccessible(true);
|
||||
hookMethods(screenCaptureClazz, ScreenCaptureHooker.class, "nativeCaptureDisplay");
|
||||
hookMethods(screenCaptureClazz, ScreenCaptureHooker.class, "nativeCaptureLayers");
|
||||
}
|
||||
@ -352,7 +349,6 @@ public class DisableFlagSecure extends XposedModule {
|
||||
var captureArgs = callback.getArgs()[0];
|
||||
try {
|
||||
captureSecureLayersField.set(captureArgs, true);
|
||||
allowProtectedField.set(captureArgs, true);
|
||||
} catch (IllegalAccessException t) {
|
||||
module.log("ScreenCaptureHooker failed", t);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user