From 347f820db539de4823572a22ae8c16611167af72 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 23:32:16 -0700 Subject: Revert viewdraghelper exposure --- core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt | 6 +++--- core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/main/kotlin') diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt index d26fb92..8f1da04 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt @@ -236,10 +236,10 @@ internal class SwipeBackLayout @JvmOverloads constructor( override fun onInterceptTouchEvent(event: MotionEvent): Boolean { if (!swipeEnabled || disallowIntercept) return false - try { - return dragHelper.shouldInterceptTouchEvent(event) + return try { + dragHelper.shouldInterceptTouchEvent(event) } catch (e: Exception) { - return false + false } } diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java index dab9bb8..f6e907a 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java @@ -28,7 +28,7 @@ import static ca.allanwang.kau.swipe.SwipeBackHelperKt.SWIPE_EDGE_TOP; * This is an extension of {@link androidx.customview.widget.ViewDragHelper} * Along with additional methods defined in {@link ViewDragHelperExtras} */ -public class ViewDragHelper implements ViewDragHelperExtras { +class ViewDragHelper implements ViewDragHelperExtras { private static final String TAG = "ViewDragHelper"; /** -- cgit v1.2.3