1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4  Copyright (C) 2017 The Android Open Source Project
5
6  Licensed under the Apache License, Version 2.0 (the "License");
7  you may not use this file except in compliance with the License.
8  You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17  -->
18
19<manifest xmlns:android="http://schemas.android.com/apk/res/android"
20          package="com.android.car.settings"
21          coreApp="true"
22          android:sharedUserId="android.uid.system"
23          android:versionCode="1"
24          android:versionName="1.0">
25
26    <uses-sdk
27        android:minSdkVersion="24"
28        android:targetSdkVersion="24"/>
29
30    <uses-permission android:name="android.car.permission.CAR_ENROLL_TRUST"/>
31    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
32    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
33    <uses-permission android:name="android.permission.BACKUP"/>
34    <uses-permission android:name="android.permission.BLUETOOTH"/>
35    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
36    <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED"/>
37    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
38    <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA"/>
39    <uses-permission android:name="android.permission.DELETE_CACHE_FILES"/>
40    <uses-permission android:name="android.permission.DUMP"/>
41    <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES"/>
42    <uses-permission android:name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
43    <uses-permission android:name="android.permission.GET_PACKAGE_SIZE"/>
44    <uses-permission android:name="android.permission.INJECT_EVENTS"/>
45    <uses-permission android:name="android.permission.INTERNET"/>
46    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
47    <uses-permission android:name="android.permission.MANAGE_USERS"/>
48    <uses-permission android:name="android.permission.MASTER_CLEAR" />
49    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
50    <uses-permission android:name="android.permission.NETWORK_SETTINGS" />
51    <uses-permission android:name="android.permission.OVERRIDE_WIFI_CONFIG"/>
52    <uses-permission android:name="android.permission.READ_CONTACTS"/>
53    <uses-permission android:name="android.permission.REBOOT"/>
54    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
55    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
56    <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES"/>
57    <uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS"/>
58    <uses-permission android:name="android.permission.START_FOREGROUND"/>
59    <uses-permission android:name="android.permission.STATUS_BAR_SERVICE"/>
60    <uses-permission android:name="android.permission.SUGGEST_MANUAL_TIME_AND_ZONE"/>
61    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
62    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
63
64    <permission android:name="com.android.car.settings.SET_INITIAL_LOCK"
65        android:protectionLevel="signature|setup"/>
66
67    <application
68        android:icon="@drawable/ic_launcher_settings"
69        android:theme="@style/CarSettingTheme"
70        android:label="@string/settings_label"
71        android:requiredForAllUsers="true"
72        android:directBootAware="true"
73        android:supportsRtl="true">
74
75        <activity
76            android:name=".common.CarSettingActivity"
77            android:label="@string/settings_label"
78            android:launchMode="singleTask"
79            android:windowSoftInputMode="adjustPan"
80            android:exported="true">
81            <!-- Keep the order of intents same as .common.FragmentResolver -->
82            <intent-filter android:priority="1">
83                <action android:name="android.settings.SETTINGS" />
84                <category android:name="android.intent.category.DEFAULT"/>
85            </intent-filter>
86
87            <intent-filter android:priority="1">
88                <action android:name="android.settings.NIGHT_DISPLAY_SETTINGS" />
89                <category android:name="android.intent.category.DEFAULT" />
90            </intent-filter>
91
92            <intent-filter android:priority="1">
93                <action android:name="android.settings.DISPLAY_SETTINGS" />
94                <category android:name="android.intent.category.DEFAULT" />
95            </intent-filter>
96
97            <intent-filter android:priority="1">
98                <action android:name="android.settings.SOUND_SETTINGS" />
99                <action android:name="android.settings.panel.action.VOLUME" />
100                <category android:name="android.intent.category.DEFAULT" />
101            </intent-filter>
102
103            <intent-filter android:priority="100">
104                <action android:name="android.settings.panel.action.INTERNET_CONNECTIVITY" />
105                <category android:name="android.intent.category.DEFAULT" />
106            </intent-filter>
107
108            <intent-filter android:priority="100">
109                <action android:name="android.net.wifi.PICK_WIFI_NETWORK" />
110                <action android:name="android.settings.WIFI_SETTINGS" />
111                <action android:name="android.settings.WIRELESS_SETTINGS" />
112                <action android:name="android.settings.panel.action.WIFI" />
113                <category android:name="android.intent.category.DEFAULT" />
114            </intent-filter>
115
116            <intent-filter android:priority="100">
117                <action android:name="android.settings.WIFI_IP_SETTINGS" />
118                <category android:name="android.intent.category.DEFAULT" />
119            </intent-filter>
120
121            <intent-filter android:priority="100">
122                <action android:name="android.settings.DATA_USAGE_SETTINGS" />
123                <action android:name="android.settings.MOBILE_DATA_USAGE" />
124                <category android:name="android.intent.category.DEFAULT" />
125            </intent-filter>
126
127            <intent-filter android:priority="100">
128                <action android:name="android.settings.DATA_ROAMING_SETTINGS" />
129                <action android:name="android.settings.NETWORK_OPERATOR_SETTINGS" />
130                <category android:name="android.intent.category.DEFAULT" />
131            </intent-filter>
132
133            <intent-filter android:priority="1">
134                <action android:name="android.settings.BLUETOOTH_SETTINGS" />
135                <category android:name="android.intent.category.DEFAULT" />
136            </intent-filter>
137
138            <intent-filter android:priority="1">
139                <action android:name="android.settings.APPLICATION_SETTINGS" />
140                <action android:name="android.settings.MANAGE_APPLICATIONS_SETTINGS" />
141                <action android:name="android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS" />
142                <category android:name="android.intent.category.DEFAULT" />
143            </intent-filter>
144
145            <!-- The following intent actions are listed twice in order to support multiple ways to
146                 provide the package name. -->
147            <!-- This intent filter expects to receive the package name via the data field.
148                 i.e. adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS \
149                      -d "package:<package name>" -->
150            <intent-filter android:priority="100">
151                <action android:name="android.settings.APPLICATION_DETAILS_SETTINGS" />
152                <action android:name="android.settings.NOTIFICATION_SETTINGS" />
153                <action android:name="android.settings.CHANNEL_NOTIFICATION_SETTINGS" />
154                <action android:name="android.settings.APP_NOTIFICATION_SETTINGS" />
155                <data android:scheme="package" />
156                <category android:name="android.intent.category.DEFAULT" />
157            </intent-filter>
158
159            <!-- This intent filter expects to receive the package name via an extra string.
160                 i.e. adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS
161                      -e "android.provider.extra.APP_PACKAGE" "<package name>" -->
162            <intent-filter android:priority="100">
163                <action android:name="android.settings.APPLICATION_DETAILS_SETTINGS" />
164                <action android:name="android.settings.NOTIFICATION_SETTINGS" />
165                <action android:name="android.settings.CHANNEL_NOTIFICATION_SETTINGS" />
166                <action android:name="android.settings.APP_NOTIFICATION_SETTINGS" />
167                <category android:name="android.intent.category.DEFAULT" />
168            </intent-filter>
169
170            <intent-filter android:priority="100">
171                <action android:name="android.settings.action.MANAGE_WRITE_SETTINGS" />
172                <category android:name="android.intent.category.DEFAULT" />
173            </intent-filter>
174
175            <intent-filter android:priority="100">
176                <action android:name="android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS" />
177                <category android:name="android.intent.category.DEFAULT" />
178            </intent-filter>
179
180            <intent-filter android:priority="100">
181                <action android:name="android.settings.USAGE_ACCESS_SETTINGS" />
182                <category android:name="android.intent.category.DEFAULT" />
183            </intent-filter>
184
185            <intent-filter android:priority="1">
186                <action android:name="android.settings.DATE_SETTINGS" />
187                <action android:name="android.intent.action.QUICK_CLOCK" />
188                <category android:name="android.intent.category.DEFAULT" />
189            </intent-filter>
190
191            <intent-filter android:priority="1">
192                <action android:name="android.settings.USER_SETTINGS" />
193                <category android:name="android.intent.category.DEFAULT" />
194            </intent-filter>
195
196            <intent-filter android:priority="100">
197                <action android:name="android.settings.ADD_ACCOUNT_SETTINGS" />
198                <category android:name="android.intent.category.DEFAULT" />
199            </intent-filter>
200
201            <intent-filter android:priority="100">
202                <action android:name="android.settings.SYNC_SETTINGS" />
203                <category android:name="android.intent.category.DEFAULT" />
204            </intent-filter>
205
206            <intent-filter android:priority="100">
207                <action android:name="android.settings.INTERNAL_STORAGE_SETTINGS" />
208                <action android:name="android.os.storage.action.MANAGE_STORAGE" />
209                <category android:name="android.intent.category.DEFAULT" />
210            </intent-filter>
211
212            <intent-filter android:priority="100">
213                <action android:name="android.settings.SECURITY_SETTINGS" />
214                <category android:name="android.intent.category.DEFAULT" />
215            </intent-filter>
216
217            <intent-filter android:priority="100">
218                <action android:name="android.settings.LOCALE_SETTINGS" />
219                <category android:name="android.intent.category.DEFAULT"/>
220            </intent-filter>
221
222            <intent-filter android:priority="100">
223                <action android:name="android.settings.REQUEST_SET_AUTOFILL_SERVICE" />
224                <category android:name="android.intent.category.DEFAULT" />
225                <data android:scheme="package" />
226            </intent-filter>
227
228            <intent-filter android:priority="100">
229                <action android:name="android.settings.INPUT_METHOD_SETTINGS" />
230                <category android:name="android.intent.category.DEFAULT"/>
231            </intent-filter>
232
233            <intent-filter android:priority="100">
234                <action android:name="android.settings.DEVICE_INFO_SETTINGS" />
235                <action android:name="android.settings.DEVICE_NAME" />
236                <category android:name="android.intent.category.DEFAULT" />
237            </intent-filter>
238
239            <intent-filter android:priority="100">
240                <action android:name="android.settings.PRIVACY_SETTINGS" />
241                <category android:name="android.intent.category.DEFAULT" />
242            </intent-filter>
243
244            <meta-data android:name="distractionOptimized" android:value="true"/>
245        </activity>
246
247        <!-- Alias for launcher activity only, as this belongs to each profile. -->
248        <activity-alias android:name="Settings"
249                        android:label="@string/settings_label"
250                        android:launchMode="singleTask"
251                        android:exported="true"
252                        android:targetActivity=".common.CarSettingActivity">
253            <intent-filter android:priority="1">
254                <action android:name="android.intent.action.MAIN" />
255                <category android:name="android.intent.category.DEFAULT" />
256                <category android:name="android.intent.category.LAUNCHER" />
257            </intent-filter>
258            <meta-data android:name="distractionOptimized" android:value="true"/>
259        </activity-alias>
260
261        <activity android:name=".bluetooth.BluetoothPairingDialog"
262                  android:excludeFromRecents="true"
263                  android:windowSoftInputMode="stateVisible|adjustResize"
264                  android:taskAffinity="car.settings.bluetooth"
265                  android:launchMode="singleTask"
266                  android:theme="@*android:style/Theme.DeviceDefault.Settings.Dialog.NoActionBar">
267            <meta-data android:name="distractionOptimized" android:value="true"/>
268        </activity>
269
270        <activity android:name=".bluetooth.BluetoothDevicePickerActivity"
271                  android:label="@string/bluetooth_device_picker"
272                  android:configChanges="orientation|keyboardHidden|screenSize"
273                  android:exported="true"
274                  android:clearTaskOnLaunch="true">
275            <intent-filter>
276                <action android:name="android.bluetooth.devicepicker.action.LAUNCH" />
277                <category android:name="android.intent.category.DEFAULT" />
278            </intent-filter>
279        </activity>
280
281        <activity android:name=".bluetooth.BluetoothRequestPermissionActivity"
282                  android:theme="@style/ActionDialogTheme"
283                  android:excludeFromRecents="true"
284                  android:clearTaskOnLaunch="true"
285                  android:exported="true"
286                  android:launchMode="singleInstance">
287            <intent-filter>
288                <action android:name="android.bluetooth.adapter.action.REQUEST_DISCOVERABLE" />
289                <action android:name="android.bluetooth.adapter.action.REQUEST_ENABLE" />
290                <action android:name="android.bluetooth.adapter.action.REQUEST_DISABLE" />
291                <category android:name="android.intent.category.DEFAULT" />
292            </intent-filter>
293        </activity>
294
295        <activity android:name=".accounts.AddAccountActivity"
296                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
297                  android:configChanges="orientation|keyboardHidden|screenSize"/>
298
299        <activity android:name=".applications.managedomainurls.ManageDomainUrlsActivity"
300                  android:configChanges="orientation|keyboardHidden|screenSize"
301                  android:windowSoftInputMode="adjustResize"
302                  android:exported="true">
303            <intent-filter>
304                <action android:name="android.settings.MANAGE_DOMAIN_URLS" />
305                <category android:name="android.intent.category.DEFAULT" />
306            </intent-filter>
307            <meta-data android:name="distractionOptimized" android:value="true"/>
308        </activity>
309
310        <activity android:name=".applications.assist.ManageAssistActivity"
311                  android:configChanges="orientation|keyboardHidden|screenSize"
312                  android:windowSoftInputMode="adjustResize"
313                  android:exported="true">
314            <intent-filter>
315                <action android:name="android.settings.VOICE_INPUT_SETTINGS" />
316                <category android:name="android.intent.category.DEFAULT" />
317            </intent-filter>
318            <meta-data android:name="distractionOptimized" android:value="true"/>
319        </activity>
320
321        <activity android:name=".security.SettingsScreenLockActivity"
322                  android:configChanges="orientation|keyboardHidden|screenSize"
323                  android:exported="true"
324                  android:windowSoftInputMode="adjustResize">
325            <intent-filter>
326                <action android:name="android.car.settings.SCREEN_LOCK_ACTIVITY" />
327                <category android:name="android.intent.category.DEFAULT" />
328            </intent-filter>
329            <meta-data android:name="distractionOptimized" android:value="true"/>
330        </activity>
331
332        <activity android:name=".security.CheckLockActivity"
333                  android:configChanges="orientation|keyboardHidden|screenSize"
334                  android:exported="true"
335                  android:windowSoftInputMode="adjustResize">
336            <intent-filter>
337                <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL" />
338                <action android:name="android.app.action.CONFIRM_FRP_CREDENTIAL" />
339                <category android:name="android.intent.category.DEFAULT" />
340            </intent-filter>
341        </activity>
342
343        <activity android:name=".security.AddTrustedDeviceActivity"
344                  android:configChanges="orientation|keyboardHidden|screenSize"
345                  android:windowSoftInputMode="adjustResize">
346        </activity>
347
348        <activity android:name=".security.CredentialStorageActivity"
349                  android:theme="@style/ActionDialogTheme"
350                  android:launchMode="singleTop"
351                  android:exported="true"
352                  android:configChanges="orientation|keyboardHidden|screenSize">
353            <intent-filter android:priority="1">
354                <action android:name="com.android.credentials.INSTALL" />
355                <action android:name="com.android.credentials.RESET" />
356                <category android:name="android.intent.category.DEFAULT" />
357            </intent-filter>
358        </activity>
359
360        <activity android:name=".system.ThirdPartyLicensesActivity"
361                  android:label="@string/settings_license_activity_title"
362                  android:configChanges="orientation|keyboardHidden|screenSize"
363                  android:exported="true"
364                  android:windowSoftInputMode="adjustResize">
365            <intent-filter>
366                <action android:name="android.settings.THIRD_PARTY_LICENSE" />
367                <category android:name="android.intent.category.DEFAULT" />
368            </intent-filter>
369        </activity>
370
371        <activity
372            android:name=".system.RegulatoryInfoDisplayActivity"
373            android:label="@string/regulatory_labels"
374            android:exported="true"
375            android:enabled="@bool/config_show_regulatory_info">
376            <intent-filter>
377                <action android:name="android.settings.SHOW_REGULATORY_INFO" />
378                <category android:name="android.intent.category.DEFAULT" />
379            </intent-filter>
380        </activity>
381
382        <activity android:name=".location.LocationSettingsActivity"
383                  android:configChanges="orientation|keyboardHidden|screenSize"
384                  android:windowSoftInputMode="adjustResize"
385                  android:exported="true">
386            <intent-filter>
387                <action android:name="android.settings.LOCATION_SOURCE_SETTINGS" />
388                <category android:name="android.intent.category.DEFAULT" />
389            </intent-filter>
390            <meta-data android:name="distractionOptimized" android:value="true"/>
391        </activity>
392
393        <activity android:name=".datausage.DataWarningAndLimitActivity"
394                  android:configChanges="orientation|keyboardHidden|screenSize"
395                  android:windowSoftInputMode="adjustResize"
396                  android:exported="true">
397            <meta-data android:name="distractionOptimized" android:value="true"/>
398        </activity>
399
400        <activity
401            android:name=".wifi.WifiRequestToggleActivity"
402            android:theme="@style/ActionDialogTheme"
403            android:excludeFromRecents="true"
404            android:clearTaskOnLaunch="true"
405            android:exported="true"
406            android:launchMode="singleInstance">
407            <intent-filter>
408                <action android:name="android.net.wifi.action.REQUEST_ENABLE" />
409                <action android:name="android.net.wifi.action.REQUEST_DISABLE" />
410                <category android:name="android.intent.category.DEFAULT" />
411            </intent-filter>
412        </activity>
413
414        <!-- This logic is copied from phone.-->
415        <!-- Ensures there's lightweight fallback activity when no other MAIN/HOME activity is present.-->
416        <activity android:name=".FallbackHome"
417                  android:excludeFromRecents="true"
418                  android:label=""
419                  android:screenOrientation="nosensor"
420                  android:exported="true"
421                  android:theme="@style/FallbackHome">
422            <intent-filter android:priority="-900">
423                <action android:name="android.intent.action.MAIN" />
424                <category android:name="android.intent.category.HOME" />
425                <category android:name="android.intent.category.DEFAULT" />
426            </intent-filter>
427            <meta-data android:name="distractionOptimized" android:value="true"/>
428        </activity>
429
430        <service android:name=".bluetooth.BluetoothPairingService" />
431
432        <service android:name=".setupservice.InitialLockSetupService"
433                 android:exported="true"
434                 android:permission="com.android.car.settings.SET_INITIAL_LOCK"/>
435
436        <receiver android:name=".bluetooth.BluetoothPairingRequest"
437            android:exported="true">
438            <intent-filter>
439                <action android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
440            </intent-filter>
441        </receiver>
442
443        <!-- Exported for SystemUI to trigger -->
444        <receiver android:name=".storage.StorageUnmountReceiver"
445                  android:exported="true"
446                  android:permission="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
447
448        <!-- FileProvider to share a generated license html file.
449             Note that "com.android.settings.files" is set here as its authorities because a Uri
450             permission grant should be allowed to share a file with an external browser but it is
451             allowed only for Settings' authorities in ActivityManagerService.  -->
452        <provider android:name="androidx.core.content.FileProvider"
453                  android:authorities="com.android.settings.files"
454                  android:grantUriPermissions="true"
455                  android:exported="false">
456            <meta-data android:name="android.support.FILE_PROVIDER_PATHS"
457                       android:resource="@xml/file_paths" />
458        </provider>
459
460    </application>
461</manifest>
462