Merge cherrypicks of [15617994, 15618969, 15618970, 15617995, 15618032, 15618033, 15618190, 15620097, 15618565, 15620098, 15617967, 15619902, 15620257, 15619392] into sc-release
Change-Id: Iec841a938569f67a336121f562be0ffcd6bbc407
diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java
index f7e25d5..a9e0237 100644
--- a/src/com/android/providers/downloads/DownloadProvider.java
+++ b/src/com/android/providers/downloads/DownloadProvider.java
@@ -942,6 +942,13 @@
}
return mediaStoreUri;
}
+ } catch (IllegalArgumentException ignored) {
+ // Insert or update MediaStore failed. At this point we can't do
+ // much here. If the file belongs to MediaStore collection, it will
+ // get added to MediaStore collection during next scan, and we will
+ // obtain the uri to the file in the next MediaStore#scanFile
+ // initiated by us
+ Log.w(Constants.TAG, "Couldn't update MediaStore for " + filePath, ignored);
} catch (RemoteException e) {
// Should not happen
}