Merge "Make sure DividerFreeSnapMode work as expected" into udc-qpr-dev
This commit is contained in:
@@ -434,7 +434,7 @@ public class DividerView extends FrameLayout implements View.OnTouchListener {
|
|||||||
"Set divider bar %s from %s", interactive ? "interactive" : "non-interactive",
|
"Set divider bar %s from %s", interactive ? "interactive" : "non-interactive",
|
||||||
from);
|
from);
|
||||||
mInteractive = interactive;
|
mInteractive = interactive;
|
||||||
if (!mInteractive && mMoving) {
|
if (!mInteractive && hideHandle && mMoving) {
|
||||||
final int position = mSplitLayout.getDividePosition();
|
final int position = mSplitLayout.getDividePosition();
|
||||||
mSplitLayout.flingDividePosition(
|
mSplitLayout.flingDividePosition(
|
||||||
mLastDraggingPosition,
|
mLastDraggingPosition,
|
||||||
|
|||||||
@@ -323,7 +323,11 @@ public class SplitDecorManager extends WindowlessWindowManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mShown) {
|
if (mShown) {
|
||||||
fadeOutDecor(()-> animFinishedCallback.accept(true));
|
fadeOutDecor(()-> {
|
||||||
|
if (mRunningAnimationCount == 0 && animFinishedCallback != null) {
|
||||||
|
animFinishedCallback.accept(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// Decor surface is hidden so release it directly.
|
// Decor surface is hidden so release it directly.
|
||||||
releaseDecor(t);
|
releaseDecor(t);
|
||||||
|
|||||||
@@ -593,9 +593,6 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
|||||||
void flingDividePosition(int from, int to, int duration,
|
void flingDividePosition(int from, int to, int duration,
|
||||||
@Nullable Runnable flingFinishedCallback) {
|
@Nullable Runnable flingFinishedCallback) {
|
||||||
if (from == to) {
|
if (from == to) {
|
||||||
// No animation run, still callback to stop resizing.
|
|
||||||
mSplitLayoutHandler.onLayoutSizeChanged(this);
|
|
||||||
|
|
||||||
if (flingFinishedCallback != null) {
|
if (flingFinishedCallback != null) {
|
||||||
flingFinishedCallback.run();
|
flingFinishedCallback.run();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user