Merge change 7686 into donut
* changes: MediaScanner: Add check for null object in empty title handling code.
This commit is contained in:
@@ -657,7 +657,7 @@ public class MediaScanner
|
|||||||
|
|
||||||
ContentValues values = toValues();
|
ContentValues values = toValues();
|
||||||
String title = values.getAsString(MediaStore.MediaColumns.TITLE);
|
String title = values.getAsString(MediaStore.MediaColumns.TITLE);
|
||||||
if (TextUtils.isEmpty(title.trim())) {
|
if (title == null || TextUtils.isEmpty(title.trim())) {
|
||||||
title = values.getAsString(MediaStore.MediaColumns.DATA);
|
title = values.getAsString(MediaStore.MediaColumns.DATA);
|
||||||
// extract file name after last slash
|
// extract file name after last slash
|
||||||
int lastSlash = title.lastIndexOf('/');
|
int lastSlash = title.lastIndexOf('/');
|
||||||
|
|||||||
Reference in New Issue
Block a user