Merge SP1A.210812.016

Merged-In: Idf95a75c8101246a2650fe69f476f9372b9cebd7
Change-Id: I407dc43fc27a6804ffbf1b0433fcd3a0734db6a3
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
         }