Merge "Finish the recents animation upon home rotation" into sc-dev

This commit is contained in:
Tracy Zhou authored and Android (Google) Code Review committed 2021-05-18 01:05:32 +00:00
commit f9071f92ef
1 file changed
+10
@@ -2617,6 +2617,16 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (LIVE_TILE.get()) {
switchToScreenshot(
() -> finishRecentsAnimation(true /* toRecents */,
this::onConfigurationChangedInternal));
} else {
onConfigurationChangedInternal();
}
}
private void onConfigurationChangedInternal() {
final int rotation = mActivity.getDisplay().getRotation();
if (mOrientationState.setRecentsRotation(rotation)) {
updateOrientationHandler();