summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-02-18 16:06:38 -0800
committerMarco Nelissen <marcone@google.com>2014-02-18 16:06:38 -0800
commitd5a579765e06d69c1a33663c202c3593a5bd5c6b (patch)
tree35e1c3e8d427d63f4120b01e67c3b7db35c923bc /media
parent5441745effb885589c03050b59885e8a3ad96ad6 (diff)
downloadframeworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.zip
frameworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.tar.gz
frameworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.tar.bz2
Fix regression
Don't crash if an item is inserted without a slash in its path. b/13076381 Change-Id: I5cde2adaa038201e0692af3c8ca92540ce75f083
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/MediaScanner.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 01485b8..72f3e1a 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -1426,7 +1426,7 @@ public class MediaScanner
}
int firstSlash = path.lastIndexOf('/');
- if (firstSlash == 0) {
+ if (firstSlash <= 0) {
return false;
}
String parent = path.substring(0, firstSlash);