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

Commit 701e51ac authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Handle orientation changes more systematically. Bug: 4981385"

parents bf0613e7 21230c64
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -88,11 +88,6 @@ public:
        eElectronBeamAnimationOff = 0x10
    };

    // flags for setOrientation
    enum {
        eOrientationAnimationDisable = 0x00000001
    };

    /* create connection with surface flinger, requires
     * ACCESS_SURFACE_FLINGER permission
     */
@@ -112,7 +107,8 @@ public:
    virtual status_t freezeDisplay(DisplayID dpy, uint32_t flags) = 0;
    virtual status_t unfreezeDisplay(DisplayID dpy, uint32_t flags) = 0;

    /* Set display orientation. requires ACCESS_SURFACE_FLINGER permission */
    /* Set display orientation. requires ACCESS_SURFACE_FLINGER permission
     * No flags are currently defined.  Set flags to 0. */
    virtual int setOrientation(DisplayID dpy, int orientation, uint32_t flags) = 0;

    /* signal that we're done booting.
+2 −2
Original line number Diff line number Diff line
@@ -566,7 +566,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)

            const int dpy = 0;
            const int orientation = mCurrentState.orientation;
            const uint32_t type = mCurrentState.orientationType;
            // Currently unused: const uint32_t flags = mCurrentState.orientationFlags;
            GraphicPlane& plane(graphicPlane(dpy));
            plane.setOrientation(orientation);

@@ -1299,7 +1299,7 @@ int SurfaceFlinger::setOrientation(DisplayID dpy,
    Mutex::Autolock _l(mStateLock);
    if (mCurrentState.orientation != orientation) {
        if (uint32_t(orientation)<=eOrientation270 || orientation==42) {
            mCurrentState.orientationType = flags;
            mCurrentState.orientationFlags = flags;
            mCurrentState.orientation = orientation;
            setTransactionFlags(eTransactionNeeded);
            mTransactionCV.wait(mStateLock);
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ private:
        }
        LayerVector     layersSortedByZ;
        uint8_t         orientation;
        uint8_t         orientationType;
        uint8_t         orientationFlags;
        uint8_t         freezeDisplay;
    };