Merge change 7686 into donut

* changes:
  MediaScanner: Add check for null object in empty title handling code.
This commit is contained in:
Android (Google) Code Review
2009-07-17 10:14:32 -07:00

View File

@@ -657,7 +657,7 @@ public class MediaScanner
ContentValues values = toValues();
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);
// extract file name after last slash
int lastSlash = title.lastIndexOf('/');