1<!-- 2 Copyright 2024 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17<manifest xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:tools="http://schemas.android.com/tools" 19 package="com.android.photopicker"> 20 21 <!-- 22 This permission identifies Photopicker to MediaProvider and allows access 23 to private system APIs. 24 25 Declared by MediaProvider and requires the 'media' certificate to obtain. 26 --> 27 <uses-permission 28 android:name="com.android.providers.media.permission.MANAGE_CLOUD_MEDIA_PROVIDERS"/> 29 30 <!-- Required to inspect network capabilities through ConnectivityManager --> 31 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 32 33 <!-- Permissions required for reading device configs --> 34 <uses-permission android:name="android.permission.READ_DEVICE_CONFIG"/> 35 36 <!-- Permissions required for fetching User profiles --> 37 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/> 38 39 <application 40 android:name="com.android.photopicker.PhotopickerApplication" 41 android:label="@string/photopicker_application_label" 42 android:allowBackup="false" 43 android:supportsRtl="true"> 44 45 <activity 46 android:name="com.android.photopicker.MainActivity" 47 android:exported="true" 48 android:theme="@style/Theme.Photopicker" 49 android:label="@string/photopicker_application_label" 50 android:windowSoftInputMode="adjustResize" 51 android:excludeFromRecents="true"> 52 53 <intent-filter android:priority="95" > 54 <action android:name="android.provider.action.PICK_IMAGES"/> 55 <category android:name="android.intent.category.DEFAULT" /> 56 <data android:mimeType="image/*" /> 57 <data android:mimeType="video/*" /> 58 </intent-filter> 59 <intent-filter android:priority="95" > 60 <action android:name="android.provider.action.PICK_IMAGES"/> 61 <category android:name="android.intent.category.DEFAULT"/> 62 </intent-filter> 63 </activity> 64 65 <activity-alias 66 android:name="com.android.photopicker.PhotopickerGetContentActivity" 67 android:targetActivity="com.android.photopicker.MainActivity" 68 android:exported="true" 69 android:excludeFromRecents="true" 70 android:enabled="true"> 71 <intent-filter android:priority="101" > 72 <action android:name="android.intent.action.GET_CONTENT"/> 73 <category android:name="android.intent.category.OPENABLE"/> 74 <category android:name="android.intent.category.DEFAULT"/> 75 <data android:mimeType="image/*"/> 76 <data android:mimeType="video/*"/> 77 </intent-filter> 78 </activity-alias> 79 80 </application> 81 82 <queries> 83 <!-- 84 Ensure that all CLOUD_MEDIA_PROVIDER packages are visible to this app. 85 Since Photopicker does not hold QUERY_ALL_PACKAGES, but it queries the 86 CloudMediaProviders directly when loading media, declare the intent 87 action that all CloudMediaProviders use to identify themselves so their 88 packages are visible to Photopicker. 89 --> 90 <intent> 91 <action android:name="android.content.action.CLOUD_MEDIA_PROVIDER" /> 92 </intent> 93 94 <!-- 95 Ensure that Photopicker can resolve DocumentsUI which is the 96 default handler of [OPEN_DOCUMENT]. Photopicker uses this to redirect 97 the user to DocumentsUI in some ACTION_GET_CONTENT cases. 98 --> 99 <intent> 100 <action android:name="android.intent.action.OPEN_DOCUMENT" /> 101 <data android:mimeType="*/*" /> 102 </intent> 103 </queries> 104 105</manifest> 106