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' }