summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dreams/phototable/PhotoSource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/dreams/phototable/PhotoSource.java b/src/com/android/dreams/phototable/PhotoSource.java
index d05eace..5b554ee 100644
--- a/src/com/android/dreams/phototable/PhotoSource.java
+++ b/src/com/android/dreams/phototable/PhotoSource.java
@@ -276,7 +276,7 @@ public abstract class PhotoSource {
if (max >= total) {
return -1;
} else {
- return (mRNG.nextInt() % (total - max)) - 1;
+ return mRNG.nextInt(total - max) - 1;
}
}