Merge "Reset windows bounds when stop one handed mode" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
08b0b82df9
@@ -89,6 +89,7 @@ public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer {
|
||||
OneHandedAnimationController.OneHandedTransitionAnimator animator) {
|
||||
mAnimationController.removeAnimator(animator.getToken());
|
||||
if (mAnimationController.isAnimatorsConsumed()) {
|
||||
resetWindowsOffsetInternal(animator.getTransitionDirection());
|
||||
finishOffset(animator.getDestinationOffset(),
|
||||
animator.getTransitionDirection());
|
||||
}
|
||||
@@ -99,6 +100,7 @@ public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer {
|
||||
OneHandedAnimationController.OneHandedTransitionAnimator animator) {
|
||||
mAnimationController.removeAnimator(animator.getToken());
|
||||
if (mAnimationController.isAnimatorsConsumed()) {
|
||||
resetWindowsOffsetInternal(animator.getTransitionDirection());
|
||||
finishOffset(animator.getDestinationOffset(),
|
||||
animator.getTransitionDirection());
|
||||
}
|
||||
@@ -205,6 +207,16 @@ public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer {
|
||||
applyTransaction(wct);
|
||||
}
|
||||
|
||||
private void resetWindowsOffsetInternal(
|
||||
@OneHandedAnimationController.TransitionDirection int td) {
|
||||
if (td == TRANSITION_DIRECTION_TRIGGER) {
|
||||
return;
|
||||
}
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
resetWindowsOffset(wct);
|
||||
applyTransaction(wct);
|
||||
}
|
||||
|
||||
private void resetWindowsOffset(WindowContainerTransaction wct) {
|
||||
final SurfaceControl.Transaction tx =
|
||||
mSurfaceControlTransactionFactory.getTransaction();
|
||||
|
||||
Reference in New Issue
Block a user