Prevent set bounds to child task
For child tasks in root task, it usually follow root task bounds so we should prevent setting it while DefaultTransitionHandler handle TRANSIT_CHANGE. Bug: 206872147 Test: manual Test: pass existing tests Change-Id: Iad34886c392e9c568362339395746e9bd4ca501f
This commit is contained in:
@@ -346,6 +346,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
|
||||
}
|
||||
|
||||
if (change.getMode() == TRANSIT_CHANGE) {
|
||||
// If task is child task, only set position in parent.
|
||||
if (isTask && change.getParent() != null
|
||||
&& info.getChange(change.getParent()).getTaskInfo() != null) {
|
||||
final Point positionInParent = change.getTaskInfo().positionInParent;
|
||||
startTransaction.setPosition(change.getLeash(),
|
||||
positionInParent.x, positionInParent.y);
|
||||
continue;
|
||||
}
|
||||
|
||||
// No default animation for this, so just update bounds/position.
|
||||
startTransaction.setPosition(change.getLeash(),
|
||||
change.getEndAbsBounds().left - change.getEndRelOffset().x,
|
||||
|
||||
Reference in New Issue
Block a user