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

Change-Id: Ib4d191f415370d09a9bc556cd4575f730a5f19fe
This commit is contained in:
mtk33169
2018-11-12 19:37:13 -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);