Compatible with flyme10 (#14)

* Compatible with flyme10

English
android.view.SurfaceControl$ScreenshotHardwareBuffer is in the framework (bootclass), so the scope needs to include com.flyme.systemuiex

中文
android.view.SurfaceControl$ScreenshotHardwareBuffer
在framework中(也就是bootclass),
所以作用域需要包含com.flyme.systemuiex

* Update DisableFlagSecure.java
This commit is contained in:
EX3124 2023-07-31 00:57:32 +08:00 committed by GitHub
parent 0504f174b5
commit 5b16ace48f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -78,6 +78,12 @@ public class DisableFlagSecure implements IXposedHookLoadPackage {
} catch (Throwable t) { } catch (Throwable t) {
XposedBridge.log(t); XposedBridge.log(t);
} }
} else if (loadPackageParam.packageName.equals("com.flyme.systemuiex")) {
try {
XposedHelpers.findAndHookMethod("android.view.SurfaceControl$ScreenshotHardwareBuffer", loadPackageParam.classLoader, "containsSecureLayers", XC_MethodReplacement.returnConstant(false));
}catch (Throwable t) {
XposedBridge.log(t);
}
} }
} }

View File

@ -3,5 +3,6 @@
<string name="xposed_description">Disable FLAG_SECURE on all windows, enabling screenshots in apps that normally wouldn\'t allow it.</string> <string name="xposed_description">Disable FLAG_SECURE on all windows, enabling screenshots in apps that normally wouldn\'t allow it.</string>
<string-array name="scope"> <string-array name="scope">
<item>android</item> <item>android</item>
<item>com.flyme.systemuiex</item>
</string-array> </string-array>
</resources> </resources>