From 8ff0e3c2727c6d061c91f0f080432a924b1c3dad Mon Sep 17 00:00:00 2001 From: BlueMatthew Date: Mon, 15 Jan 2024 13:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=B8=BA=E5=90=8E=E9=9D=A2=E7=A7=BB=E9=99=A4java=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=81=9A=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 44527c82..d413109d 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -775,9 +775,10 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector< params.orientation = mPhotoInfo.orientation; // GpioControl::EnableGpio(CMD_SET_CAM_3V3_EN_STATE, true); + bool res = false; JNIEnv* env = NULL; bool didAttachThread = false; - bool res = GetJniEnv(m_vm, &env, didAttachThread); + res = GetJniEnv(m_vm, &env, didAttachThread); if (!res) { ALOGE("Failed to get JNI Env"); @@ -790,7 +791,6 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector< } TurnOnCameraPower(env); - res = true; if (mPhotoInfo.mediaType == 0) {