diff options
author | Alan Viverette <alanv@google.com> | 2022-10-06 11:20:20 -0400 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2022-10-06 11:23:01 -0400 |
commit | 9eb1f41c014c436faf78c7a90ebadc668601d70c (patch) | |
tree | 91b1437e7164aab36a3465c4928757c2f2835413 | |
parent | 7a4ea6c85d285eccc0aba970cd25b02d95010d05 (diff) | |
download | Calendar-9eb1f41c014c436faf78c7a90ebadc668601d70c.tar.gz |
Fix nullability to reflect platform SDK
Bug: 249227476
Test: existing Calendar tests
Change-Id: I0aced2b25295250ac0c3a15f7e47ff37ab2edef5
-rw-r--r-- | src/com/android/calendar/DayView.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/calendar/DayView.kt b/src/com/android/calendar/DayView.kt index 84ad5833..d5f4f483 100644 --- a/src/com/android/calendar/DayView.kt +++ b/src/com/android/calendar/DayView.kt @@ -2796,7 +2796,7 @@ class DayView( performLongClick() } - private fun doScroll(e1: MotionEvent, e2: MotionEvent, deltaX: Float, deltaY: Float) { + private fun doScroll(e1: MotionEvent?, e2: MotionEvent, deltaX: Float, deltaY: Float) { cancelAnimation() if (mStartingScroll) { mInitialScrollX = 0f @@ -2909,7 +2909,7 @@ class DayView( } } - private fun doFling(e1: MotionEvent, e2: MotionEvent, velocityX: Float, velocityY: Float) { + private fun doFling(e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float) { cancelAnimation() mSelectionMode = SELECTION_HIDDEN eventClickCleanup() @@ -2919,7 +2919,7 @@ class DayView( // initNextView(deltaX); mTouchMode = TOUCH_MODE_INITIAL_STATE if (DEBUG) Log.d(TAG, "doFling: velocityX $velocityX") - val deltaX = e2.getX().toInt() - e1.getX().toInt() + val deltaX = e2.getX().toInt() - e1!!.getX().toInt() switchViews(deltaX < 0, mViewStartX.toFloat(), mViewWidth.toFloat(), velocityX) mViewStartX = 0 return @@ -3526,7 +3526,7 @@ class DayView( @Override override fun onScroll( - e1: MotionEvent, + e1: MotionEvent?, e2: MotionEvent, distanceX: Float, distanceY: Float @@ -3550,7 +3550,7 @@ class DayView( @Override override fun onFling( - e1: MotionEvent, + e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float @@ -3987,4 +3987,4 @@ class DayView( OVERFLING_DISTANCE = vc.getScaledOverflingDistance() init(context as Context) } -}
\ No newline at end of file +} |