Turning off AE/AF might not be a good approach because the quality may become unacceptable.
If you want to lock the AE/AF. suggest to use the following camera2 interop API to set CONTROL_AE_LOCK for locking AE, and set CONTROL_AF_MODE to CONTROL_AF_MODE_AUTO to prevent from performing AF continuously.
if (shouldLockAeAf) {
Camera2CameraControl.from(cameraControl).setCaptureRequestOptions(
new CaptureRequestOptions.Builder()
.setCaptureRequestOption(CaptureRequest.CONTROL_AE_LOCK, true)
.setCaptureRequestOption(CaptureRequest.CONTROL_AF_MODE,
CaptureRequest.CONTROL_AF_MODE_AUTO).build());
} else {
// you might need to check if CONTROL_AF_MODE_CONTINUOUS_PICTURE is supported on device or not.
Camera2CameraControl.from(cameraControl).setCaptureRequestOptions(
new CaptureRequestOptions.Builder()
.setCaptureRequestOption(CaptureRequest.CONTROL_AE_LOCK, false)
.setCaptureRequestOption(CaptureRequest.CONTROL_AF_MODE,
CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE).build());
}