mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Ensure RecentsOrientedState.mRecentsRotation is up to date on swipe up" into sc-dev
This commit is contained in:
@@ -394,6 +394,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) {
|
||||
return;
|
||||
}
|
||||
// RecentsView never updates the display rotation until swipe-up, force update
|
||||
// RecentsOrientedState before passing to TaskViewSimulator.
|
||||
mRecentsView.updateRecentsRotation();
|
||||
mTaskViewSimulator.setOrientationState(mRecentsView.getPagedViewOrientedState());
|
||||
|
||||
// If we've already ended the gesture and are going home, don't prepare recents UI,
|
||||
|
||||
@@ -2641,19 +2641,20 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
if (LIVE_TILE.get() && mEnableDrawingLiveTile && newConfig.orientation != mOrientation) {
|
||||
switchToScreenshot(
|
||||
() -> finishRecentsAnimation(true /* toRecents */,
|
||||
this::onConfigurationChangedInternal));
|
||||
this::updateRecentsRotation));
|
||||
mEnableDrawingLiveTile = false;
|
||||
} else {
|
||||
onConfigurationChangedInternal();
|
||||
updateRecentsRotation();
|
||||
}
|
||||
mOrientation = newConfig.orientation;
|
||||
}
|
||||
|
||||
private void onConfigurationChangedInternal() {
|
||||
/**
|
||||
* Updates {@link RecentsOrientedState}'s cached RecentsView rotation.
|
||||
*/
|
||||
public void updateRecentsRotation() {
|
||||
final int rotation = mActivity.getDisplay().getRotation();
|
||||
if (mOrientationState.setRecentsRotation(rotation)) {
|
||||
updateOrientationHandler();
|
||||
}
|
||||
mOrientationState.setRecentsRotation(rotation);
|
||||
}
|
||||
|
||||
public void setLayoutRotation(int touchRotation, int displayRotation) {
|
||||
|
||||
Reference in New Issue
Block a user