merge in nyc-release history after reset to nyc-dev
[android/platform/packages/providers/DownloadProvider.git] / AndroidManifest.xml
index 0db696b..8720523 100644 (file)
 
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
-    <uses-permission android:name="android.permission.ACCESS_DRM" />
     <uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
     <uses-permission android:name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.INSTALL_DRM" />
     <uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
+    <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
+    <!-- TODO: replace with READ_NETWORK_POLICY permission when it exists -->
+    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
+    <uses-permission android:name="android.permission.MODIFY_NETWORK_ACCOUNTING" />
+    <uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />
 
     <application android:process="android.process.media"
-                 android:label="@string/app_label">
+                 android:label="@string/app_label"
+                 android:icon="@mipmap/ic_launcher_download"
+                 android:allowBackup="false"
+                 android:supportsRtl="true"
+                 android:usesCleartextTraffic="true">
+
         <provider android:name=".DownloadProvider"
-                  android:authorities="downloads"
-                  android:permission="android.permission.ACCESS_ALL_DOWNLOADS">
+                  android:authorities="downloads" android:exported="true">
           <!-- Anyone can access /my_downloads, the provider internally restricts access by UID for
                these URIs -->
           <path-permission android:pathPrefix="/my_downloads"
                            android:permission="android.permission.INTERNET"/>
+          <!-- to access /all_downloads, ACCESS_ALL_DOWNLOADS permission is required -->
+          <path-permission android:pathPrefix="/all_downloads"
+                           android:permission="android.permission.ACCESS_ALL_DOWNLOADS"/>
           <!-- Temporary, for backwards compatibility -->
           <path-permission android:pathPrefix="/download"
                            android:permission="android.permission.INTERNET"/>
           <!-- Apps with access to /all_downloads/... can grant permissions, allowing them to share
                downloaded files with other viewers -->
           <grant-uri-permission android:pathPrefix="/all_downloads/"/>
+          <!-- Apps with access to /my_downloads/... can grant permissions, allowing them to share
+               downloaded files with other viewers -->
+          <grant-uri-permission android:pathPrefix="/my_downloads/"/>
+        </provider>
+
+        <provider
+            android:name=".DownloadStorageProvider"
+            android:authorities="com.android.providers.downloads.documents"
+            android:grantUriPermissions="true"
+            android:exported="true"
+            android:permission="android.permission.MANAGE_DOCUMENTS">
+            <intent-filter>
+                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
+            </intent-filter>
         </provider>
-        <service android:name=".DownloadService"
-                android:permission="android.permission.ACCESS_DOWNLOAD_MANAGER" />
+
+        <service
+            android:name=".DownloadJobService"
+            android:exported="true"
+            android:permission="android.permission.BIND_JOB_SERVICE" />
+
+        <service
+            android:name=".DownloadIdleService"
+            android:exported="true"
+            android:permission="android.permission.BIND_JOB_SERVICE" />
+
         <receiver android:name=".DownloadReceiver" android:exported="false">
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
-                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
+                <action android:name="android.intent.action.UID_REMOVED" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="android.intent.action.MEDIA_MOUNTED" />
+                <data android:scheme="file" />
             </intent-filter>
         </receiver>
-
-        <activity android:name=".SizeLimitActivity"
-                  android:launchMode="singleTask"
-                  android:theme="@style/Theme.Translucent"/>
     </application>
 </manifest>