• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  <!--
40    Required for resolving packages based on their UID for privacy banner
41    Also required for resolving DocumentsUI and CloudMediaProviders.
42  -->
43  <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
44
45  <application
46          android:name="com.android.photopicker.PhotopickerApplication"
47          android:icon="@mipmap/photopicker_app_icon"
48          android:label="@string/photopicker_application_label"
49          android:crossProfile="true"
50          android:allowBackup="false"
51          android:enableOnBackInvokedCallback="true"
52          android:supportsRtl="true">
53
54    <activity
55      android:name="com.android.photopicker.MainActivity"
56      android:enabled="false"
57      android:enableOnBackInvokedCallback="false"
58      android:exported="true"
59      android:theme="@style/Theme.Photopicker"
60      android:label="@string/photopicker_application_label"
61      android:windowSoftInputMode="adjustResize"
62      android:excludeFromRecents="true">
63
64      <intent-filter android:priority="110" >
65                <action android:name="android.provider.action.PICK_IMAGES"/>
66                <category android:name="android.intent.category.DEFAULT" />
67                <data android:mimeType="image/*" />
68                <data android:mimeType="video/*" />
69      </intent-filter>
70      <intent-filter android:priority="105" >
71                <action android:name="android.provider.action.PICK_IMAGES"/>
72                <category android:name="android.intent.category.DEFAULT"/>
73      </intent-filter>
74    </activity>
75
76    <activity-alias
77        android:name="com.android.photopicker.PhotopickerGetContentActivity"
78        android:enabled="false"
79        android:targetActivity="com.android.photopicker.MainActivity"
80        android:exported="true"
81        android:excludeFromRecents="true">
82        <intent-filter android:priority="110" >
83            <action android:name="android.intent.action.GET_CONTENT"/>
84            <category android:name="android.intent.category.OPENABLE"/>
85            <category android:name="android.intent.category.DEFAULT"/>
86            <data android:mimeType="image/*"/>
87            <data android:mimeType="video/*"/>
88        </intent-filter>
89    </activity-alias>
90
91    <activity-alias
92        android:name="com.android.photopicker.PhotopickerUserSelectActivity"
93        android:targetActivity="com.android.photopicker.MainActivity"
94        android:permission="android.permission.GRANT_RUNTIME_PERMISSIONS"
95        android:exported="true"
96        android:enabled="false"
97        android:excludeFromRecents="true">
98        <intent-filter android:priority="105">
99            <action android:name="android.provider.action.USER_SELECT_IMAGES_FOR_APP" />
100            <category android:name="android.intent.category.DEFAULT" />
101            <data android:mimeType="image/*" />
102            <data android:mimeType="video/*" />
103        </intent-filter>
104        <intent-filter android:priority="105">
105            <action android:name="android.provider.action.USER_SELECT_IMAGES_FOR_APP" />
106            <category android:name="android.intent.category.DEFAULT" />
107        </intent-filter>
108    </activity-alias>
109
110    <!--
111      Receiver that receives broadcasts from MediaProvider when the DeviceConfig is updated.
112      This is required because Photopicker does not have a persistent process of its own, but
113      needs to enable or disable various package components based on flag state. MediaProvider
114      sends broadcasts to Photopicker anytime the DeviceConfig is updated so that Photopicker
115      can wake up and evaluate its component state.
116
117      These broadcasts are scoped to the MANAGE_CLOUD_MEDIA_PROVIDERS permission so that other
118      apps are unable to eavesdrop on these broadcasts (though they contain no data and are just
119      a wake up signal).
120    -->
121    <receiver android:name="com.android.photopicker.PhotopickerDeviceConfigReceiver"
122              android:exported="true"
123              android:enabled="@bool/config_enablePhotopickerDeviceConfigReceiver"
124              android:permission="com.android.providers.media.permission.MANAGE_CLOUD_MEDIA_PROVIDERS">
125      <intent-filter>
126        <action android:name="android.intent.action.MAIN" />
127      </intent-filter>
128    </receiver>
129
130    <!--
131    The Embedded Photopicker service that allows external apps to launch an embedded photopicker
132    experience inside of their own application. This service uses Remote Rendering to provide a
133    view to the binding application, and renders the view from the photopicker process.
134    See EmbeddedService and Session classes for the entrypoints into the Embedded Photopicker.
135    -->
136    <service android:name="com.android.photopicker.core.embedded.EmbeddedService"
137             android:exported="true">
138      <intent-filter>
139        <action android:name="com.android.photopicker.core.embedded.EmbeddedService.BIND" />
140      </intent-filter>
141    </service>
142
143  </application>
144
145</manifest>
146