OSDN Git Service

Handle null uris in content changed events.
authorSteve McKay <smckay@google.com>
Tue, 19 Apr 2016 00:35:41 +0000 (17:35 -0700)
committerSteve McKay <smckay@google.com>
Tue, 19 Apr 2016 00:36:17 +0000 (17:36 -0700)
Bug: 28244958
Change-Id: Id3a7adb0ab4a751cfcf6ed3fee4cc6337ce512bb

packages/DocumentsUI/src/com/android/documentsui/RootsCache.java

index 594e02f..1e82857 100644 (file)
@@ -110,6 +110,10 @@ public class RootsCache {
 
         @Override
         public void onChange(boolean selfChange, Uri uri) {
+            if (uri == null) {
+                Log.w(TAG, "Received onChange event for null uri. Skipping.");
+                return;
+            }
             if (DEBUG) Log.d(TAG, "Updating roots due to change at " + uri);
             updateAuthorityAsync(uri.getAuthority());
         }