Android 10.0 关闭相机开始录像时的快门声音

Android 10.0 关闭相机开始录像时的快门声音

近来接到项目需求反馈提到在使用相机录像时,点击开始录像按钮后快门的声音也会被录进去,需要将开始录像的快门声音关闭,具体修改参照如下:

/vendor/mediatek/proprietary/packages/apps/Camera2/ common/src/com/mediatek/camera/common/mode/video/device/v2/VideoDevice2Controller.java

    public void startRecording() {
        LogHelper.i(TAG, "[startRecording] + ");
        mIsRecording = true;
-        mICameraContext.getSoundPlayback().play(ISoundPlayback.START_VIDEO_RECORDING);
        try {
            CaptureRequest.Builder builder = doCreateAndConfigRequest(true);
            setRepeatingRequest(builder);
        } catch (CameraAccessException e) {
            e.printStackTrace();
        }
        LogHelper.d(TAG, "[startRecording] - ");
    }

重新编译验证,修改生效,相机开始录像时的快门声音已被关闭

你可能感兴趣的:(Android,android)