Merge "Reset adjacent TaskFragments while updating split container" into sc-v2-dev
This commit is contained in:
@@ -252,7 +252,8 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {
|
|||||||
// Getting the parent bounds using the updated container - it will have the recent value.
|
// Getting the parent bounds using the updated container - it will have the recent value.
|
||||||
final Rect parentBounds = getParentContainerBounds(updatedContainer);
|
final Rect parentBounds = getParentContainerBounds(updatedContainer);
|
||||||
final SplitRule rule = splitContainer.getSplitRule();
|
final SplitRule rule = splitContainer.getSplitRule();
|
||||||
final Activity activity = splitContainer.getPrimaryContainer().getTopNonFinishingActivity();
|
final TaskFragmentContainer primaryContainer = splitContainer.getPrimaryContainer();
|
||||||
|
final Activity activity = primaryContainer.getTopNonFinishingActivity();
|
||||||
if (activity == null) {
|
if (activity == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -264,10 +265,12 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {
|
|||||||
|
|
||||||
// If the task fragments are not registered yet, the positions will be updated after they
|
// If the task fragments are not registered yet, the positions will be updated after they
|
||||||
// are created again.
|
// are created again.
|
||||||
resizeTaskFragmentIfRegistered(wct, splitContainer.getPrimaryContainer(),
|
resizeTaskFragmentIfRegistered(wct, primaryContainer, primaryRectBounds);
|
||||||
primaryRectBounds);
|
final TaskFragmentContainer secondaryContainer = splitContainer.getSecondaryContainer();
|
||||||
resizeTaskFragmentIfRegistered(wct, splitContainer.getSecondaryContainer(),
|
resizeTaskFragmentIfRegistered(wct, secondaryContainer, secondaryRectBounds);
|
||||||
secondaryRectBounds);
|
|
||||||
|
setAdjacentTaskFragments(wct, primaryContainer.getTaskFragmentToken(),
|
||||||
|
secondaryContainer.getTaskFragmentToken(), rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user