Loading libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java +8 −3 Original line number Diff line number Diff line Loading @@ -514,7 +514,12 @@ class DividerPresenter implements View.OnTouchListener { mProperties.mDividerAttributes, mProperties.mIsVerticalSplit, calculateMinPosition(), calculateMaxPosition()); mRenderer.setDividerPosition(mDividerPosition); switch (event.getAction()) { // Convert to use screen-based coordinates to prevent lost track of motion events // while moving divider bar and calculating dragging velocity. event.setLocation(event.getRawX(), event.getRawY()); final int action = event.getAction() & MotionEvent.ACTION_MASK; switch (action) { case MotionEvent.ACTION_DOWN: onStartDragging(event); break; Loading Loading @@ -713,9 +718,9 @@ class DividerPresenter implements View.OnTouchListener { return snap(dividerPosition, possiblePositions); } if (velocity < 0) { return 0; return minPosition; } else { return fullyExpandedPosition; return maxPosition; } } Loading libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/DividerPresenterTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -720,7 +720,7 @@ public class DividerPresenterTest { // Divider position is greater than minPosition and the velocity is enough for fling assertEquals( 0, // Closed position 30, // minPosition DividerPresenter.dividerPositionWithDraggingToFullscreenAllowed( 50 /* dividerPosition */, 30 /* minPosition */, Loading @@ -731,7 +731,7 @@ public class DividerPresenterTest { // Divider position is less than maxPosition and the velocity is enough for fling assertEquals( 1200, // Fully expanded position 900, // maxPosition DividerPresenter.dividerPositionWithDraggingToFullscreenAllowed( 800 /* dividerPosition */, 30 /* minPosition */, Loading Loading
libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java +8 −3 Original line number Diff line number Diff line Loading @@ -514,7 +514,12 @@ class DividerPresenter implements View.OnTouchListener { mProperties.mDividerAttributes, mProperties.mIsVerticalSplit, calculateMinPosition(), calculateMaxPosition()); mRenderer.setDividerPosition(mDividerPosition); switch (event.getAction()) { // Convert to use screen-based coordinates to prevent lost track of motion events // while moving divider bar and calculating dragging velocity. event.setLocation(event.getRawX(), event.getRawY()); final int action = event.getAction() & MotionEvent.ACTION_MASK; switch (action) { case MotionEvent.ACTION_DOWN: onStartDragging(event); break; Loading Loading @@ -713,9 +718,9 @@ class DividerPresenter implements View.OnTouchListener { return snap(dividerPosition, possiblePositions); } if (velocity < 0) { return 0; return minPosition; } else { return fullyExpandedPosition; return maxPosition; } } Loading
libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/DividerPresenterTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -720,7 +720,7 @@ public class DividerPresenterTest { // Divider position is greater than minPosition and the velocity is enough for fling assertEquals( 0, // Closed position 30, // minPosition DividerPresenter.dividerPositionWithDraggingToFullscreenAllowed( 50 /* dividerPosition */, 30 /* minPosition */, Loading @@ -731,7 +731,7 @@ public class DividerPresenterTest { // Divider position is less than maxPosition and the velocity is enough for fling assertEquals( 1200, // Fully expanded position 900, // maxPosition DividerPresenter.dividerPositionWithDraggingToFullscreenAllowed( 800 /* dividerPosition */, 30 /* minPosition */, Loading