From 07ec3fcce98228f67bcf7d1bc7a651610c07590b Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 16 Mar 2019 16:42:17 -0700 Subject: [PATCH] Fixed #250 --- .../playback/impl/streaming/StreamingPlaybackService.kt | 6 +++--- src/musikdroid/build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt index 3b14230e9..a34be0f58 100644 --- a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt +++ b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt @@ -572,14 +572,14 @@ class StreamingPlaybackService(context: Context) : IPlaybackService { } private fun resolveNextIndex(currentIndex: Int, count: Int, userInitiated: Boolean): Int { - if (shuffled) { /* our shuffle matches actually random for now. */ + if (shuffled) { /* our shuffle is implemented as random for now. */ if (count <= 1) { return currentIndex } - var r = random.nextInt(count - 1) + var r = random.nextInt(count) while (r == currentIndex) { - r = random.nextInt(count - 1) + r = random.nextInt(count) } return r } diff --git a/src/musikdroid/build.gradle b/src/musikdroid/build.gradle index 449e2da3b..836f1aaf2 100644 --- a/src/musikdroid/build.gradle +++ b/src/musikdroid/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.1' + classpath 'com.android.tools.build:gradle:3.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.2.0' }