Redraw live tile in updatePageOffsets()

Also finish recents controller in RecentsView#reset() if it hasn't
been already.

Test: in 2 button mode, swipe up from overview when a live tile is
running, ensure it moves offscreen with its TaskView; after swiping
from overview to home, tap nav bar to ensure controller was finished
Fixes: 185588376

Change-Id: Ibfdea9fcfb69dbc20c51474198c7cc2f9281c705
This commit is contained in:
Tony Wickham
2021-04-16 13:06:16 -07:00
parent e1ce26e70c
commit 2e3b7c6e97
@@ -1420,7 +1420,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mTaskListChangeId = -1;
mFocusedTaskId = -1;
mRecentsAnimationController = null;
if (mRecentsAnimationController != null) {
finishRecentsAnimation(true /* toRecents */, null);
}
mLiveTileParams.setTargetSet(null);
mLiveTileTaskViewSimulator.setDrawsBelowRecents(true);
@@ -2517,6 +2519,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
? ((TaskView) child).getPrimaryTaskOffsetTranslationProperty()
: mOrientationHandler.getPrimaryViewTranslate();
translationProperty.set(child, totalTranslation);
if (LIVE_TILE.get() && mEnableDrawingLiveTile && i == getRunningTaskIndex()) {
mLiveTileTaskViewSimulator.taskPrimaryTranslation.value = totalTranslation;
redrawLiveTile();
}
}
updateCurveProperties();
}