Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / calendar / src / main / AndroidManifest.xml

AndroidManifest.xml204 lines · 10.4 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools">
4
5 <!-- Offline app (#884): androidx.work merges in ACCESS_NETWORK_STATE, which nothing here uses. -->
6 <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). -->
7 <!-- This app uses no motion/environment sensors; MAOS withholds the -->
8 <!-- Sensors permission at install instead of auto-granting it. -->
9 <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" />
10
11 <!-- Single APK for phone and watch. Deliberately NO
12 android.hardware.type.watch uses-feature here: required="true"
13 would block every phone install, and required="false" is
14 disallowed for this feature (lint InvalidWearFeatureAttribute;
15 Google's packaging model does not support one APK for Wear and
16 non-Wear via Play). This app does not distribute through Play's
17 watch channel — it is sideloaded / F-Droid-installed, where no
18 feature declaration is needed to install on a watch — so the
19 APK carries no watch feature filter at all and
20 FormFactor.isWatch (PackageManager.FEATURE_WATCH, still
21 reported by watch hardware at runtime) routes the experience. -->
22 <uses-feature
23 android:name="android.hardware.touchscreen"
24 android:required="false" />
25
26 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove" />
27
28 <uses-permission android:name="android.permission.READ_CALENDAR" />
29 <uses-permission android:name="android.permission.WRITE_CALENDAR" />
30 <uses-permission android:name="android.permission.USE_EXACT_ALARM" />
31 <!-- SCHEDULE_EXACT_ALARM is only needed up to API 32: on API 33+ the
32 USE_EXACT_ALARM permission above covers exact reminders (install-granted,
33 non-revocable). The gate still checks canScheduleExactAlarms() at runtime
34 via SpecialAccess.hasExactAlarms() so a denial routes through
35 AppPermissionsGate instead of silently degrading. -->
36 <uses-permission
37 android:name="android.permission.SCHEDULE_EXACT_ALARM"
38 android:maxSdkVersion="32" />
39 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
40 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
41
42 <permission
43 android:name="com.vayunmathur.calendar.permissions.ACCESS_CALENDAR"
44 android:protectionLevel="signature" />
45
46 <application
47 android:allowBackup="true"
48 android:dataExtractionRules="@xml/data_extraction_rules"
49 android:icon="@mipmap/ic_launcher"
50 android:label="@string/app_name"
51 android:roundIcon="@mipmap/ic_launcher"
52 android:supportsRtl="true"
53 android:theme="@style/Theme.General">
54
55 <!-- Watch experience is paired with the phone app, not standalone. -->
56 <meta-data
57 android:name="com.google.android.wearable.standalone"
58 android:value="false" />
59 <activity
60 android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
61 android:name="MainActivity"
62 android:exported="true"
63 android:launchMode="singleTask"
64 android:theme="@style/Theme.General">
65 <intent-filter>
66 <action android:name="android.intent.action.MAIN" />
67 <category android:name="android.intent.category.LAUNCHER" />
68 </intent-filter>
69 <intent-filter>
70 <action android:name="android.intent.action.APPLICATION_PREFERENCES" />
71 <category android:name="android.intent.category.DEFAULT" />
72 </intent-filter>
73 <intent-filter>
74 <action android:name="android.intent.action.INSERT" />
75 <data android:mimeType="vnd.android.cursor.dir/event" />
76 <category android:name="android.intent.category.DEFAULT" />
77 </intent-filter>
78 <!-- Date-jump from the system provider. The provider usually sends
79 these VIEW intents with a null type, so the second filter matches
80 on scheme+host+path only (no mimeType). Both are scoped to /time
81 so event URIs never fall into the ICS path. -->
82 <intent-filter>
83 <action android:name="android.intent.action.VIEW" />
84 <category android:name="android.intent.category.DEFAULT" />
85 <data android:mimeType="time/epoch" />
86 <data android:host="com.android.calendar" />
87 <data android:scheme="content"/>
88 <data android:pathPrefix="/time" />
89 </intent-filter>
90 <intent-filter>
91 <action android:name="android.intent.action.VIEW" />
92 <category android:name="android.intent.category.DEFAULT" />
93 <data android:scheme="content" />
94 <data android:host="com.android.calendar" />
95 <data android:pathPrefix="/time" />
96 </intent-filter>
97 <!-- ICS import: text/calendar family only, via content/file URIs
98 (file managers, Downloads, shares, picker). application/octet-stream
99 is deliberately excluded: it matched every download. http/https are
100 deliberately excluded too: browsers only route links to BROWSABLE
101 activities and App Links require declared hosts, so keeping them
102 would either re-introduce browser hijacking or break lint; a
103 browser-downloaded .ics still imports fine via the Downloads app.
104 No pathPattern: filter dimensions AND-match, and opaque content
105 URIs (MediaStore/Gmail IDs) rarely end in .ics — the mimeType
106 scoping above is what prevents hijacks. -->
107 <intent-filter>
108 <action android:name="android.intent.action.VIEW" />
109 <action android:name="android.intent.action.SEND" />
110 <action android:name="android.intent.action.SEND_MULTIPLE" />
111 <action android:name="android.intent.action.GET_CONTENT" />
112 <category android:name="android.intent.category.DEFAULT" />
113 <data android:scheme="content" />
114 <data android:scheme="file" />
115 <data android:mimeType="text/calendar" />
116 <data android:mimeType="application/calendar" />
117 <data android:mimeType="application/x-icalendar" />
118 <data android:mimeType="text/x-icalendar" />
119 <data android:mimeType="text/icalendar" />
120 <data android:mimeType="application/ics" />
121 </intent-filter>
122 </activity>
123 <receiver
124 android:name=".widget.CalendarGlanceWidgetReceiver"
125 android:exported="true">
126 <intent-filter>
127 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
128 </intent-filter>
129 <intent-filter>
130 <action android:name="android.intent.action.DATE_CHANGED" />
131 <action android:name="android.intent.action.TIME_SET" />
132 <action android:name="android.intent.action.TIMEZONE_CHANGED" />
133 </intent-filter>
134 <intent-filter>
135 <action android:name="android.intent.action.PROVIDER_CHANGED" />
136 <data android:scheme="content" />
137 </intent-filter>
138 <meta-data
139 android:name="android.appwidget.provider"
140 android:resource="@xml/calendar_glance_widget_info" />
141 </receiver>
142 <receiver
143 android:name=".widget.CalendarMonthGlanceWidgetReceiver"
144 android:exported="true">
145 <intent-filter>
146 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
147 </intent-filter>
148 <intent-filter>
149 <action android:name="android.intent.action.DATE_CHANGED" />
150 <action android:name="android.intent.action.TIME_SET" />
151 <action android:name="android.intent.action.TIMEZONE_CHANGED" />
152 </intent-filter>
153 <intent-filter>
154 <action android:name="android.intent.action.PROVIDER_CHANGED" />
155 <data android:scheme="content" />
156 </intent-filter>
157 <meta-data
158 android:name="android.appwidget.provider"
159 android:resource="@xml/calendar_month_widget_info" />
160 </receiver>
161
162 <!-- WearLink delivery is app-lifecycle-bound; no system listener service. -->
163 <receiver
164 android:name=".platform.ReminderReceiver"
165 android:enabled="true"
166 android:directBootAware="true"
167 android:exported="false" />
168 <receiver
169 android:name=".platform.BootReceiver"
170 android:enabled="true"
171 android:directBootAware="true"
172 android:exported="true">
173 <intent-filter>
174 <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
175 <action android:name="android.intent.action.BOOT_COMPLETED" />
176 <action android:name="android.intent.action.QUICKBOOT_POWERON" />
177 <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
178 </intent-filter>
179 </receiver>
180 <activity
181 android:name=".intents.GetIntent"
182 android:exported="true"
183 android:theme="@android:style/Theme.NoDisplay"
184 android:permission="com.vayunmathur.calendar.permissions.ACCESS_CALENDAR">
185 </activity>
186
187 <activity
188 android:name=".intents.InsertIntent"
189 android:exported="true"
190 android:theme="@android:style/Theme.NoDisplay"
191 android:permission="com.vayunmathur.calendar.permissions.ACCESS_CALENDAR">
192 </activity>
193
194 <!-- Watch experience: entered only via MainActivity's watch routing
195 (no launcher filter of its own). It renders from the watch's
196 synced store and is inert on a phone. -->
197 <activity
198 android:name=".ui.WearMainActivity"
199 android:exported="false"
200 android:taskAffinity=""
201 android:theme="@android:style/Theme.Material.NoActionBar" />
202 </application>
203
204</manifest>