Handle broken archives correctly.

Test: Manually and automated tests.
Bug: 32260433
Change-Id: I2c701c34184b7bb2954e28954398e0634ee0c4a1
(cherry picked from commit 40cec2ae53d637e186d0f6de105df4859bef2201)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 0df0ffc..6f4e78b 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -29,6 +29,18 @@
                 <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
             </intent-filter>
        </provider>
+       <!-- Provider for testing archives. -->
+       <provider
+            android:name="com.android.documentsui.archives.ResourcesProvider"
+            android:authorities="com.android.documentsui.archives.resourcesprovider"
+            android:exported="true"
+            android:grantUriPermissions="true"
+            android:permission="android.permission.MANAGE_DOCUMENTS"
+            android:enabled="true">
+            <intent-filter>
+                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
+            </intent-filter>
+      </provider>
     </application>
 
     <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"