Commit 877200d2 authored by Edward Wang's avatar Edward Wang
Browse files

AudioService: use nextInt

parent 00578b8c
......@@ -35,6 +35,7 @@ import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import java.util.Stack;
import org.videolan.libvlc.EventHandler;
......@@ -830,7 +831,7 @@ public class AudioService extends Service {
// Find a new index not in mPrevious.
do
{
mNextIndex = (int)(Math.random() * size);
mNextIndex = new Random().nextInt(size);
}
while(mNextIndex == mCurrentIndex || mPrevious.contains(mNextIndex));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment