21de56a946
Introduce new ACTION_PICK_DIRECTORY that allows users to grant access to an entire document subtree. Instead of requiring grants for each individual document, this leverages new prefix URI permission grants by defining new "via"-style URIs: content://com.example/via/12/document/24/ This references document 24 by using a prefix grant given for document 12. Internally, we use isChildDocument() to enforce that 24 is actually a descendant (child, grandchild, etc) of 12. Since this is an optional API, providers indicate support with Root.FLAG_SUPPORTS_DIR_SELECTION. Extend DocumentsUI to support picking directories. Expose createDocument() API to work with returned directories. Offer to canonicalize via-style URIs into direct URIs, generating exact permission grants along the way. Override openAssetFile() to pass through CancellationSignal. Move testing code into ApiDemos. Bug: 10607375 Change-Id: Ifffc1cff878870f8152eb6ca0199c5d014b9cb07
65 lines
2.8 KiB
XML
65 lines
2.8 KiB
XML
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.documentsui">
|
|
|
|
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
|
|
<uses-permission android:name="android.permission.REMOVE_TASKS" />
|
|
|
|
<application
|
|
android:name=".DocumentsApplication"
|
|
android:label="@string/app_label"
|
|
android:supportsRtl="true">
|
|
|
|
<activity
|
|
android:name=".DocumentsActivity"
|
|
android:theme="@style/Theme"
|
|
android:icon="@drawable/ic_doc_text">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.OPEN_DOCUMENT" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.OPENABLE" />
|
|
<data android:mimeType="*/*" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.CREATE_DOCUMENT" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.OPENABLE" />
|
|
<data android:mimeType="*/*" />
|
|
</intent-filter>
|
|
<intent-filter android:priority="100">
|
|
<action android:name="android.intent.action.GET_CONTENT" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.OPENABLE" />
|
|
<data android:mimeType="*/*" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.PICK_DIRECTORY" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="android.provider.action.MANAGE_ROOT" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<data android:mimeType="vnd.android.document/root" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<activity
|
|
android:name=".SettingsActivity"
|
|
android:label="@string/menu_settings"
|
|
android:theme="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge"
|
|
android:exported="false" />
|
|
|
|
<provider
|
|
android:name=".RecentsProvider"
|
|
android:authorities="com.android.documentsui.recents"
|
|
android:exported="false" />
|
|
|
|
<receiver android:name=".PackageReceiver">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
|
|
<action android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
|
|
<data android:scheme="package" />
|
|
</intent-filter>
|
|
</receiver>
|
|
</application>
|
|
</manifest>
|