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

Commit f03524ae authored by Alex Chau's avatar Alex Chau
Browse files

Re-calculate mLastComputedCarouselTaskSize when its empty before getMaxScaleForFullScreen

- Follow-up on ag/26499257 to do the same on mLastComputedCarouselTaskSize
- Also changing the mLastComputedTaskSize check to isEmpty

Bug: 326550571
Flag: none
Test: Swipe up, quick switch with Pixel / 3P launcher
Change-Id: If934bf4baf2782cd752b5621ad5e9be4a2013c49
parent bbdcade3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -5162,9 +5162,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
    public float getMaxScaleForFullScreen() {
        if (enableGridOnlyOverview() && mActivity.getDeviceProfile().isTablet
                && !mOverviewGridEnabled) {
            if (mLastComputedCarouselTaskSize.isEmpty()) {
                mSizeStrategy.calculateCarouselTaskSize(mActivity, mActivity.getDeviceProfile(),
                        mLastComputedCarouselTaskSize, getPagedOrientationHandler());
            }
            mTempRect.set(mLastComputedCarouselTaskSize);
        } else {
            if (mLastComputedTaskSize.height() == 0 || mLastComputedTaskSize.width() == 0) {
            if (mLastComputedTaskSize.isEmpty()) {
                getTaskSize(mLastComputedTaskSize);
            }
            mTempRect.set(mLastComputedTaskSize);