Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne authored and TacoTheDank committed Oct 31, 2023
1 parent 26ad752 commit 78f781c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ class MainPlayerGestureListener(
}

override fun onScroll(
initialEvent: MotionEvent,
initialEvent: MotionEvent?,
movingEvent: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {

if (!playerUi.isFullscreen) {
return false
}
Expand All @@ -175,7 +174,7 @@ class MainPlayerGestureListener(
val navigationBarHeight = getAndroidDimenPx(player.context, "navigation_bar_height")

// Do not handle this event if initially it started from status or navigation bars
val isTouchingStatusBar = initialEvent.y < statusBarHeight
val isTouchingStatusBar = initialEvent!!.y < statusBarHeight
val isTouchingNavigationBar = initialEvent.y > (binding.root.height - navigationBarHeight)
if (isTouchingStatusBar || isTouchingNavigationBar) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class PopupPlayerGestureListener(
}

override fun onFling(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
velocityX: Float,
velocityY: Float
Expand Down Expand Up @@ -218,12 +218,11 @@ class PopupPlayerGestureListener(
}

override fun onScroll(
initialEvent: MotionEvent,
initialEvent: MotionEvent?,
movingEvent: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {

if (isResizing) {
return super.onScroll(initialEvent, movingEvent, distanceX, distanceY)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private void setLargeIcon(final NotificationCompat.Builder builder) {
final Bitmap thumbnail = player.getThumbnail();
if (thumbnail == null || !showThumbnail) {
// since the builder is reused, make sure the thumbnail is unset if there is not one
builder.setLargeIcon(null);
builder.setLargeIcon((Bitmap) null);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ class CircleClipTapView(context: Context?, attrs: AttributeSet) : View(context,
updatePathShape()
}

override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)

canvas?.clipPath(shapePath)
canvas?.drawPath(shapePath, backgroundPaint)
canvas.clipPath(shapePath)
canvas.drawPath(shapePath, backgroundPaint)
}
}

0 comments on commit 78f781c

Please sign in to comment.