Disable the camera, including system applications and any other third-party applications cannot call the camera.

/frameworks/base/core/java/android/hardware/Camera.java

Return directly before each new camera, because I am not sure which method to use, so all related returns are null

public static Camera open(int cameraId) {
       //*/tyd.yantao 20230307 disable camera
       if(true)return null;
       //*/
       return new Camera(cameraId);
    }

In the same way there are

publicstatic Camera open() {

publicstatic Camera openLegacy(int cameraId, int halVersion) {

publicstatic Camera openUninitialized() {

Guess you like

Origin blog.csdn.net/youthking1314/article/details/129622788