Modern Apps git

MAOS.git

Public
git clone https://git.maproj.org/MAOS.git
main ▾

MAOS.git / default-permissions-modern-apps.xml

default-permissions-modern-apps.xml65 lines · 4.3 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Default runtime-permission grants for Modern Apps that act as headless system services.
4 Copied to /product/etc/default-permissions/ by modern_apps.mk. Without this, the Speech
5 app (default on-device recognizer + TTS engine) would have no RECORD_AUDIO until a user
6 manually granted it, so voice input would fail out of the box.
7-->
8<exceptions>
9 <exception package="com.vayunmathur.speech">
10 <permission name="android.permission.RECORD_AUDIO" fixed="false" />
11 </exception>
12
13 <!-- NetworkLocation is the always-on system network location provider. Default-grant
14 location (incl. background) so it works headless out of the box with no user toggle. -->
15 <exception package="com.vayunmathur.networklocation">
16 <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false" />
17 <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false" />
18 <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false" />
19 <permission name="android.permission.READ_PHONE_STATE" fixed="false" />
20 <permission name="android.permission.INTERNET" fixed="false" />
21</exception>
22 <!-- Cast finds receivers with NsdManager. Android 16's Local Network Protections gate
23 that browse on ACCESS_LOCAL_NETWORK, and rather than throwing, the platform
24 intercepts it and puts its own NsdPickerActivity in front of the user - so Settings'
25 Cast page lists nothing and spins forever while a system "choose a device to
26 connect" prompt appears over it. The app cannot ask for this itself: its route list
27 is published headlessly by a bound RemoteDisplayProvider service with no UI.
28 fixed="false" like the entries above, so the user can still revoke it. -->
29 <exception package="com.vayunmathur.cast">
30 <permission name="android.permission.ACCESS_LOCAL_NETWORK" fixed="false" />
31 <permission name="android.permission.INTERNET" fixed="false" />
32 <permission name="android.permission.POST_NOTIFICATIONS" fixed="false" />
33</exception>
34
35 <!-- Share discovers peers over mDNS, Wi-Fi Aware and BLE. Every one of these is a
36 transport rather than a feature: with any of them missing a peer is simply never
37 found, which presents to the user as "nothing here" rather than as an error. -->
38 <exception package="com.vayunmathur.share">
39 <permission name="android.permission.ACCESS_LOCAL_NETWORK" fixed="false" />
40 <permission name="android.permission.NEARBY_WIFI_DEVICES" fixed="false" />
41 <permission name="android.permission.BLUETOOTH_ADVERTISE" fixed="false" />
42 <permission name="android.permission.BLUETOOTH_SCAN" fixed="false" />
43 <permission name="android.permission.INTERNET" fixed="false" />
44 <permission name="android.permission.POST_NOTIFICATIONS" fixed="false" />
45 </exception>
46
47 <!-- Files reports long copies and deletions through a notification; its actual storage
48 access is MANAGE_EXTERNAL_STORAGE, which is an appop and not grantable here. -->
49 <exception package="com.vayunmathur.files">
50 <permission name="android.permission.POST_NOTIFICATIONS" fixed="false" />
51 </exception>
52 <!-- Emergency (com.vayunmathur.emergency) is the EMERGENCY role holder / stock EmergencyInfo
53 replacement. These are default-granted and fixed="true" (non-revocable) so the card shows
54 allergies, current medications and emergency contacts to a first responder with no manual
55 setup and no way to accidentally turn them off. The two health.* reads are the Personal
56 Health Record permissions for allergies and medications; a foreground read by the view
57 activity is sufficient (see the app's HealthConnectMedical). -->
58 <exception package="com.vayunmathur.emergency">
59 <permission name="android.permission.health.READ_MEDICAL_DATA_ALLERGIES_INTOLERANCES" fixed="true" />
60 <permission name="android.permission.health.READ_MEDICAL_DATA_MEDICATIONS" fixed="true" />
61 <permission name="android.permission.READ_CONTACTS" fixed="true" />
62 <permission name="android.permission.POST_NOTIFICATIONS" fixed="true" />
63 <permission name="android.permission.READ_PHONE_STATE" fixed="true" />
64 </exception>
65</exceptions>