Fix split black when enable in landscape
We assume dismissing side should be DOCKED_INVALID when split active, however, if snap algorithm only have one target, it will get other side due to current algorithm. Fix this by correct algorithm and ensure dismissing side be DOCKED_INVALID when split active or layout. Fix: 203745267 Test: manual Test: pass existing tests Change-Id: I077a93472dad89bc620e490dcae5170e9a56279b
This commit is contained in:
@@ -565,11 +565,11 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
mDismissingDimValue = 0;
|
||||
|
||||
int totalDismissingDistance = 0;
|
||||
if (position <= mDividerSnapAlgorithm.getFirstSplitTarget().position) {
|
||||
if (position < mDividerSnapAlgorithm.getFirstSplitTarget().position) {
|
||||
mDismissingSide = isLandscape ? DOCKED_LEFT : DOCKED_TOP;
|
||||
totalDismissingDistance = mDividerSnapAlgorithm.getDismissStartTarget().position
|
||||
- mDividerSnapAlgorithm.getFirstSplitTarget().position;
|
||||
} else if (position >= mDividerSnapAlgorithm.getLastSplitTarget().position) {
|
||||
} else if (position > mDividerSnapAlgorithm.getLastSplitTarget().position) {
|
||||
mDismissingSide = isLandscape ? DOCKED_RIGHT : DOCKED_BOTTOM;
|
||||
totalDismissingDistance = mDividerSnapAlgorithm.getLastSplitTarget().position
|
||||
- mDividerSnapAlgorithm.getDismissEndTarget().position;
|
||||
|
||||
Reference in New Issue
Block a user