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

Commit 5952f9ae authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Fixed issue with wrong stack fullscreen state on configuration change

- No need to run TaskStack#updateBoundsAfterConfigChange if the stack
is fullscreen as the bounds will already be updated to when the display
content changed due to rotation.
- Correctly set mTmpRect2 that we are using to calculate the rotated
bounds to the current mBounds.

Bug: 28319277
Bug: 27870534
Change-Id: Ic3d9407b735210351c28297de79bf035909afcfe
parent 4ace8366
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -383,6 +383,12 @@ public class TaskStack implements DimLayer.DimLayerUser,
    }
    }


    boolean updateBoundsAfterConfigChange(boolean scheduleResize) {
    boolean updateBoundsAfterConfigChange(boolean scheduleResize) {
        if (mFullscreen) {
            // Bounds will already be set correctly when display info is updated in the case of
            // fullscreen.
            return false;
        }

        if (mLastConfigChangedRotation != mLastUpdateDisplayInfoRotation) {
        if (mLastConfigChangedRotation != mLastUpdateDisplayInfoRotation) {
            // We wait for the rotation values after configuration change and display info. update
            // We wait for the rotation values after configuration change and display info. update
            // to be equal before updating the bounds due to rotation change otherwise things might
            // to be equal before updating the bounds due to rotation change otherwise things might
@@ -399,6 +405,7 @@ public class TaskStack implements DimLayer.DimLayerUser,
        }
        }


        final int oldDockSide = mStackId == DOCKED_STACK_ID ? getDockSide() : DOCKED_INVALID;
        final int oldDockSide = mStackId == DOCKED_STACK_ID ? getDockSide() : DOCKED_INVALID;
        mTmpRect2.set(mBounds);
        mDisplayContent.rotateBounds(mRotation, newRotation, mTmpRect2);
        mDisplayContent.rotateBounds(mRotation, newRotation, mTmpRect2);
        if (mStackId == DOCKED_STACK_ID) {
        if (mStackId == DOCKED_STACK_ID) {
            repositionDockedStackAfterRotation(mTmpRect2);
            repositionDockedStackAfterRotation(mTmpRect2);