目录 : framework\av\services\camera\libcameraservice\apil
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp
index 6e91290cc..771a6dcef 100644
--- a/services/camera/libcameraservice/api1/CameraClient.cpp
+++ b/services/camera/libcameraservice/api1/CameraClient.cpp
@@ -645,6 +645,8 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {
int orientation;
//CAMERA_CMD_STOP_FACE_DETECTION needn't get mLock,or will cause deadlock with datacallback,zyc
if(cmd == CAMERA_CMD_STOP_FACE_DETECTION){
+ if(mCameraFacing == CAMERA_FACING_FRONT)
+ orientation = 0;
return mHardware->sendCommand(cmd, arg1, arg2);
}
@@ -654,7 +656,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {
if (cmd == CAMERA_CMD_SET_DISPLAY_ORIENTATION) {
// Mirror the preview if the camera is front-facing.
- orientation = getOrientation(arg1, mCameraFacing == CAMERA_FACING_FRONT);
+ orientation = getOrientation(arg1, mCameraFacing ==! CAMERA_FACING_FRONT);
if (orientation == -1) return BAD_VALUE;
if (mOrientation != orientation) {