Merge "The JE about "android.process.media" will pop up when you eject the SD card after you set SD as internel phone storage" am: 83269acba7

am: a10effa6d4

Change-Id: Ibae7dcc2c76062b5a64a6d0825abafc8fa015eea
This commit is contained in:
mtk33169
2018-11-12 19:52:47 -08:00
committed by android-build-merger

View File

@@ -1634,7 +1634,7 @@ public class MediaScanner implements AutoCloseable {
selectionArgs = new String[] { path };
c = mMediaProvider.query(mFilesUriNoNotify, FILES_PRESCAN_PROJECTION,
where, selectionArgs, null, null);
if (c.moveToFirst()) {
if (c != null && c.moveToFirst()) {
long rowId = c.getLong(FILES_PRESCAN_ID_COLUMN_INDEX);
int format = c.getInt(FILES_PRESCAN_FORMAT_COLUMN_INDEX);
long lastModified = c.getLong(FILES_PRESCAN_DATE_MODIFIED_COLUMN_INDEX);