我想使用xposed
停用相机。所以我无法理解我应该挂钩哪种原生方法,以便我的手机摄像头被禁用。
我试过了: -
public class main1 implements IXposedHookLoadPackage {
@Override
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable{
if(!lpparam.packageName.equals("android.hardware.camera2"))
return;
findAndHookMethod("android.hardware.camera2.CameraManager", lpparam.classLoader, "openCamera", String.class, CameraDevice.StateCallback.class, Handler.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
XposedBridge.log("CameraBlocked");
return null;
}
});
XposedBridge.log("Loaded app: " + lpparam.packageName);
}
}
但它不起作用。请帮帮我。