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

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

AndroidManifest.xml196 lines · 9.2 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 <!-- Watch-local timers/alarms wake the watch CPU when they fire. -->
26 <uses-permission android:name="android.permission.WAKE_LOCK" />
27
28 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove" />
29
30 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
31 <uses-permission android:name="android.permission.USE_EXACT_ALARM" />
32 <uses-permission
33 android:name="android.permission.SCHEDULE_EXACT_ALARM"
34 android:maxSdkVersion="32" />
35 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
36 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
37
38 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
39 <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
40 <uses-permission android:name="android.permission.VIBRATE" />
41 <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
42
43 <permission
44 android:name="com.vayunmathur.clock.permissions.ACCESS_CLOCK"
45 android:protectionLevel="signature" />
46
47 <application
48 android:allowBackup="true"
49 android:dataExtractionRules="@xml/data_extraction_rules"
50 android:icon="@mipmap/ic_launcher"
51 android:label="@string/app_name"
52 android:roundIcon="@mipmap/ic_launcher"
53 android:supportsRtl="true"
54 android:theme="@style/Theme.General">
55
56 <!-- Watch experience is paired with the phone app, not standalone. -->
57 <meta-data
58 android:name="com.google.android.wearable.standalone"
59 android:value="false" />
60 <activity
61 android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
62 android:name=".MainActivity"
63 android:exported="true"
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.SHOW_ALARMS" />
71 <category android:name="android.intent.category.DEFAULT" />
72 </intent-filter>
73 <intent-filter>
74 <action android:name="android.intent.action.SET_ALARM" />
75 <category android:name="android.intent.category.DEFAULT" />
76 </intent-filter>
77 <intent-filter>
78 <action android:name="android.intent.action.SET_TIMER" />
79 <category android:name="android.intent.category.DEFAULT" />
80 </intent-filter>
81 </activity>
82 <receiver
83 android:name=".platform.TimerReceiver"
84 android:enabled="true"
85 android:exported="false" />
86 <receiver
87 android:name=".platform.TimerActionReceiver"
88 android:enabled="true"
89 android:exported="false" />
90 <receiver
91 android:name=".platform.StopwatchActionReceiver"
92 android:enabled="true"
93 android:exported="false" />
94 <receiver
95 android:name=".platform.AlarmReceiver"
96 android:enabled="true"
97 android:directBootAware="true"
98 android:exported="false">
99 </receiver>
100 <receiver
101 android:name=".platform.BootReceiver"
102 android:enabled="true"
103 android:directBootAware="true"
104 android:exported="true">
105 <intent-filter>
106 <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
107 <action android:name="android.intent.action.BOOT_COMPLETED" />
108 <action android:name="android.intent.action.QUICKBOOT_POWERON" />
109 <action android:name="android.intent.action.TIMEZONE_CHANGED" />
110 <action android:name="android.intent.action.TIME_SET" />
111 </intent-filter>
112 </receiver>
113 <activity
114 android:name=".platform.AlarmActivity"
115 android:showWhenLocked="true"
116 android:turnScreenOn="true"
117 android:directBootAware="true"
118 android:lockTaskMode="if_whitelisted"
119 android:launchMode="singleInstance" />
120
121 <activity
122 android:name=".intents.SetAlarmIntent"
123 android:exported="true"
124 android:theme="@android:style/Theme.NoDisplay"
125 android:permission="com.vayunmathur.clock.permissions.ACCESS_CLOCK" />
126 <activity
127 android:name=".intents.SetTimerIntent"
128 android:exported="true"
129 android:theme="@android:style/Theme.NoDisplay"
130 android:permission="com.vayunmathur.clock.permissions.ACCESS_CLOCK" />
131 <service
132 android:name=".service.AlarmSoundService"
133 android:foregroundServiceType="mediaPlayback"
134 android:directBootAware="true"
135 android:exported="false" />
136 <!-- Watch experience: entered only via MainActivity's watch routing
137 (no launcher filter of its own), plus its ringing surface and
138 watch-local alarm/timer receivers. All are inert on a phone:
139 WearBootReceiver gates on the watch feature, and the rest are
140 reached only from watch-armed schedules. -->
141 <activity
142 android:name=".ui.WearMainActivity"
143 android:exported="false"
144 android:taskAffinity=""
145 android:theme="@android:style/Theme.Material.NoActionBar" />
146 <activity
147 android:name=".ui.WearRingActivity"
148 android:exported="false"
149 android:showWhenLocked="true"
150 android:turnScreenOn="true"
151 android:launchMode="singleInstance"
152 android:theme="@android:style/Theme.Material.NoActionBar" />
153 <receiver
154 android:name=".platform.WatchAlarmReceiver"
155 android:enabled="true"
156 android:exported="false" />
157 <receiver
158 android:name=".platform.WatchTimerReceiver"
159 android:enabled="true"
160 android:exported="false" />
161 <receiver
162 android:name=".platform.WearBootReceiver"
163 android:enabled="true"
164 android:exported="true">
165 <intent-filter>
166 <action android:name="android.intent.action.BOOT_COMPLETED" />
167 <action android:name="android.intent.action.TIMEZONE_CHANGED" />
168 <action android:name="android.intent.action.TIME_SET" />
169 </intent-filter>
170 </receiver>
171 <receiver
172 android:name=".widget.AnalogClockWidgetProvider"
173 android:exported="false"
174 android:label="@string/analog_clock_widget_label">
175 <intent-filter>
176 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
177 </intent-filter>
178 <meta-data
179 android:name="android.appwidget.provider"
180 android:resource="@xml/analog_clock_widget_info" />
181 </receiver>
182
183 <!-- Watch conduit scheduled push sync: the phone Watch app fires
184 ConduitSync.ACTION (signature permission, package-addressed)
185 and this receiver pushes the current snapshot over the
186 conduit. Exported only to holders of that permission. -->
187 <receiver
188 android:name=".sync.ConduitSyncTriggerReceiver"
189 android:exported="true"
190 android:permission="com.vayunmathur.watch.permissions.CONDUIT">
191 <intent-filter>
192 <action android:name="com.vayunmathur.watch.action.SYNC_TRIGGER" />
193 </intent-filter>
194 </receiver>
195 </application>
196</manifest>