Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b760a2db authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "Camera: Rotate display if app doesn't use setDisplayOrientation."

This reverts commit 4b52ba4c.
parent 36355ee6
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ CameraClient::CameraClient(const sp<CameraService>& cameraService,
    mPreviewWindow = 0;
    mDestructionStarted = false;

    mIsOrientationSetByApp = false;

    // Callback is disabled by default
    mPreviewCallbackFlag = CAMERA_FRAME_CALLBACK_FLAG_NOOP;
    mOrientation = getOrientation(0, mCameraFacing == CAMERA_FACING_FRONT);
@@ -410,13 +408,8 @@ status_t CameraClient::startPreviewMode() {
    if (mPreviewWindow != 0) {
        native_window_set_scaling_mode(mPreviewWindow.get(),
                NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
        if (!mIsOrientationSetByApp) {
            int orientationCorrection = getOrientation(0,mCameraFacing == CAMERA_FACING_FRONT);
        native_window_set_buffers_transform(mPreviewWindow.get(),
                                                mOrientation + orientationCorrection);
        } else {
            native_window_set_buffers_transform(mPreviewWindow.get(), mOrientation);
        }
                mOrientation);
    }

#if defined(OMAP_ICS_CAMERA) || defined(OMAP_ENHANCEMENT_BURST_CAPTURE)
@@ -476,8 +469,6 @@ void CameraClient::stopPreview() {
    disableMsgType(CAMERA_MSG_POSTVIEW_FRAME);
#endif

    mIsOrientationSetByApp = false;

    disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
#ifdef QCOM_HARDWARE
    //Disable picture related message types
@@ -689,8 +680,6 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {
        orientation = getOrientation(arg1, mCameraFacing == CAMERA_FACING_FRONT);
        if (orientation == -1) return BAD_VALUE;

        mIsOrientationSetByApp = true;

        if (mOrientation != orientation) {
            mOrientation = orientation;
            if (mPreviewWindow != 0) {
+0 −2
Original line number Diff line number Diff line
@@ -160,8 +160,6 @@ private:
    // This function keeps trying to grab mLock, or give up if the message
    // is found to be disabled. It returns true if mLock is grabbed.
    bool                    lockIfMessageWanted(int32_t msgType);

    bool                            mIsOrientationSetByApp;
};

}