When mLastComputedTaskSize is empty we will recalculate and set it before determining scale and pivot

Bug: 326550571

Test: manually set computed task size to 0 simulating unset circumstance, and ran logs verifying infinite, added fix, and verified logs showing the same scale before and after with get tasksize set

Flag: none

(cherry picked from commit fca7ee23ba)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9c4039e12dbc20dabf1d7e62b06bfd650706eaa7)
Merged-In: I0f928885e2fc6cfc0d6a064d6e9f1c614bf7a5af
Change-Id: I0f928885e2fc6cfc0d6a064d6e9f1c614bf7a5af
This commit is contained in:
randypfohl
2024-03-07 12:07:24 -08:00
committed by Cherrypicker Worker
parent f8302c388f
commit c91aad150c
@@ -5164,6 +5164,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
&& !mOverviewGridEnabled) {
mTempRect.set(mLastComputedCarouselTaskSize);
} else {
if (mLastComputedTaskSize.height() == 0 || mLastComputedTaskSize.width() == 0) {
getTaskSize(mLastComputedTaskSize);
}
mTempRect.set(mLastComputedTaskSize);
}
return getPagedViewOrientedState().getFullScreenScaleAndPivot(