Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / communicate / src / main / AndroidManifest.xml
AndroidManifest.xml362 lines · 18.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 | <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> |
| 6 | <!-- This app uses no motion/environment sensors; MAOS withholds the --> |
| 7 | <!-- Sensors permission at install instead of auto-granting it. --> |
| 8 | <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> |
| 9 | |
| 10 | <!-- Assistant tools (find_conversations / get_conversation_messages / send_message_v2) |
| 11 | for openassistant. Signature-level: only apps signed with the Modern Apps key can call. --> |
| 12 | <permission |
| 13 | android:name="com.vayunmathur.communicate.permissions.ACCESS_COMMUNICATE" |
| 14 | android:protectionLevel="signature" /> |
| 15 | |
| 16 | <uses-permission android:name="android.permission.READ_CONTACTS" /> |
| 17 | <!-- ContactPlatformRows publishing (WhatsApp/Signal reachability rows). --> |
| 18 | <uses-permission android:name="android.permission.WRITE_CONTACTS" /> |
| 19 | <uses-permission android:name="android.permission.CALL_PHONE" /> |
| 20 | <uses-permission android:name="android.permission.READ_CALL_LOG" /> |
| 21 | <!-- Voicemail tab mark-read/delete via the VoicemailContract provider. --> |
| 22 | <uses-permission android:name="android.permission.WRITE_CALL_LOG" /> |
| 23 | <uses-permission android:name="android.permission.READ_SMS" /> |
| 24 | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| 25 | <uses-permission android:name="android.permission.RECEIVE_MMS" /> |
| 26 | <uses-permission android:name="android.permission.SEND_SMS" /> |
| 27 | <!-- WRITE_SMS is a real (role-granted) permission for the default SMS app; |
| 28 | lint's typo suggestion (WRITE_OBB) does not apply. --> |
| 29 | <uses-permission android:name="android.permission.WRITE_SMS" tools:ignore="SystemPermissionTypo" /> |
| 30 | <uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" /> |
| 31 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
| 32 | <!-- ProvisioningManager capability queries (API 33+). Signature|privileged: |
| 33 | only granted to carrier-privileged builds, so call sites also check |
| 34 | it at runtime and degrade when absent. --> |
| 35 | <uses-permission android:name="android.permission.READ_PRECISE_PHONE_STATE" tools:ignore="ProtectedPermissions" /> |
| 36 | <!-- Granted by the SMS role (internal|role): single-reg SIP delegate + GBA bootstrap. --> |
| 37 | <uses-permission android:name="android.permission.PERFORM_IMS_SINGLE_REGISTRATION" /> |
| 38 | |
| 39 | <uses-permission android:name="android.permission.INTERNET" /> |
| 40 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 41 | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
| 42 | <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> |
| 43 | <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" /> |
| 44 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| 45 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" /> |
| 46 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" /> |
| 47 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" /> |
| 48 | <uses-permission android:name="android.permission.WAKE_LOCK" /> |
| 49 | <uses-permission android:name="android.permission.VIBRATE" /> |
| 50 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
| 51 | <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" /> |
| 52 | |
| 53 | <uses-permission android:name="android.permission.CAMERA" /> |
| 54 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" /> |
| 55 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" /> |
| 56 | <!-- Screen sharing during a call: the capture must run under a mediaProjection foreground service. --> |
| 57 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" /> |
| 58 | |
| 59 | <uses-feature |
| 60 | android:name="android.hardware.camera.any" |
| 61 | android:required="false" /> |
| 62 | |
| 63 | <uses-feature |
| 64 | android:name="android.hardware.telephony" |
| 65 | android:required="false" /> |
| 66 | |
| 67 | <!-- Single APK for phone and watch. Deliberately NO |
| 68 | android.hardware.type.watch uses-feature here: required="true" |
| 69 | would block every phone install, and required="false" is |
| 70 | disallowed for this feature (lint InvalidWearFeatureAttribute; |
| 71 | Google's packaging model does not support one APK for Wear and |
| 72 | non-Wear via Play). This app does not distribute through Play's |
| 73 | watch channel — it is sideloaded / F-Droid-installed, where no |
| 74 | feature declaration is needed to install on a watch — so the |
| 75 | APK carries no watch feature filter at all and |
| 76 | FormFactor.isWatch (PackageManager.FEATURE_WATCH, still |
| 77 | reported by watch hardware at runtime) routes the experience. --> |
| 78 | <uses-feature |
| 79 | android:name="android.hardware.touchscreen" |
| 80 | android:required="false" /> |
| 81 | |
| 82 | <queries> |
| 83 | <intent> |
| 84 | <action android:name="android.intent.action.DIAL" /> |
| 85 | <data android:scheme="tel" /> |
| 86 | </intent> |
| 87 | <intent> |
| 88 | <action android:name="android.intent.action.SENDTO" /> |
| 89 | <data android:scheme="smsto" /> |
| 90 | </intent> |
| 91 | </queries> |
| 92 | |
| 93 | <application |
| 94 | android:allowBackup="true" |
| 95 | android:dataExtractionRules="@xml/data_extraction_rules" |
| 96 | android:icon="@mipmap/ic_launcher" |
| 97 | android:label="@string/app_name" |
| 98 | android:roundIcon="@mipmap/ic_launcher" |
| 99 | android:supportsRtl="true" |
| 100 | android:theme="@style/Theme.General"> |
| 101 | |
| 102 | <!-- Watch experience is paired with the phone app, not standalone. --> |
| 103 | <meta-data |
| 104 | android:name="com.google.android.wearable.standalone" |
| 105 | android:value="false" /> |
| 106 | <activity |
| 107 | android:name=".MainActivity" |
| 108 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 109 | android:exported="true" |
| 110 | android:supportsPictureInPicture="true" |
| 111 | android:theme="@style/Theme.General"> |
| 112 | <!-- WhatsApp and Signal contact links, so "message this number" from a browser or another app |
| 113 | lands here. No autoVerify: wa.me/signal.me (and the other hosts below) are WhatsApp/Signal |
| 114 | domains that can never publish assetlinks for this app, so verification would always |
| 115 | fail. Plain BROWSABLE handling still applies. --> |
| 116 | <intent-filter> |
| 117 | <action android:name="android.intent.action.VIEW" /> |
| 118 | <category android:name="android.intent.category.DEFAULT" /> |
| 119 | <category android:name="android.intent.category.BROWSABLE" /> |
| 120 | <data android:scheme="https" /> |
| 121 | <data android:host="wa.me" /> |
| 122 | <data android:host="api.whatsapp.com" /> |
| 123 | <data android:host="chat.whatsapp.com" /> |
| 124 | <data android:host="signal.me" /> |
| 125 | <data android:host="signal.group" /> |
| 126 | </intent-filter> |
| 127 | <!-- The vendors' own private schemes, which are not verifiable App Links. --> |
| 128 | <intent-filter> |
| 129 | <action android:name="android.intent.action.VIEW" /> |
| 130 | <category android:name="android.intent.category.DEFAULT" /> |
| 131 | <category android:name="android.intent.category.BROWSABLE" /> |
| 132 | <data android:scheme="whatsapp" /> |
| 133 | <data android:scheme="sgnl" /> |
| 134 | </intent-filter> |
| 135 | <!-- Contact rows we write into the provider. The contacts app opens a platform row with |
| 136 | ACTION_VIEW on its content URI, so our own rows must resolve back to us. --> |
| 137 | <intent-filter> |
| 138 | <action android:name="android.intent.action.VIEW" /> |
| 139 | <category android:name="android.intent.category.DEFAULT" /> |
| 140 | <data android:mimeType="vnd.android.cursor.item/vnd.com.whatsapp.profile" /> |
| 141 | <data android:mimeType="vnd.android.cursor.item/vnd.com.whatsapp.voip.call" /> |
| 142 | <data android:mimeType="vnd.android.cursor.item/vnd.com.whatsapp.video.call" /> |
| 143 | <data android:mimeType="vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.contact" /> |
| 144 | <data android:mimeType="vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.call" /> |
| 145 | <data android:mimeType="vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.video.call" /> |
| 146 | </intent-filter> |
| 147 | <intent-filter> |
| 148 | <action android:name="android.intent.action.MAIN" /> |
| 149 | <category android:name="android.intent.category.LAUNCHER" /> |
| 150 | </intent-filter> |
| 151 | <!-- Direct Share: the chooser delivers ACTION_SEND / SEND_MULTIPLE to the |
| 152 | activity named by the <share-target> in @xml/shortcuts, with |
| 153 | EXTRA_SHORTCUT_ID naming the conversation shortcut tapped. The same |
| 154 | filters also make Communicate a regular share target; DeepLinks |
| 155 | routes both (a picker share is held until a thread is opened). --> |
| 156 | <intent-filter> |
| 157 | <action android:name="android.intent.action.SEND" /> |
| 158 | <category android:name="android.intent.category.DEFAULT" /> |
| 159 | <data android:mimeType="text/plain" /> |
| 160 | <data android:mimeType="image/*" /> |
| 161 | <data android:mimeType="video/*" /> |
| 162 | <data android:mimeType="application/*" /> |
| 163 | </intent-filter> |
| 164 | <intent-filter> |
| 165 | <action android:name="android.intent.action.SEND_MULTIPLE" /> |
| 166 | <category android:name="android.intent.category.DEFAULT" /> |
| 167 | <data android:mimeType="image/*" /> |
| 168 | <data android:mimeType="video/*" /> |
| 169 | <data android:mimeType="application/*" /> |
| 170 | </intent-filter> |
| 171 | <meta-data |
| 172 | android:name="android.app.shortcuts" |
| 173 | android:resource="@xml/shortcuts" /> |
| 174 | <intent-filter> |
| 175 | <action android:name="android.intent.action.APPLICATION_PREFERENCES" /> |
| 176 | <category android:name="android.intent.category.DEFAULT" /> |
| 177 | </intent-filter> |
| 178 | <intent-filter> |
| 179 | <action android:name="android.intent.action.DIAL" /> |
| 180 | <category android:name="android.intent.category.DEFAULT" /> |
| 181 | <data android:scheme="tel" /> |
| 182 | </intent-filter> |
| 183 | <intent-filter> |
| 184 | <action android:name="android.intent.action.DIAL" /> |
| 185 | <category android:name="android.intent.category.DEFAULT" /> |
| 186 | </intent-filter> |
| 187 | <intent-filter> |
| 188 | <action android:name="android.intent.action.VIEW" /> |
| 189 | <action android:name="android.intent.action.SENDTO" /> |
| 190 | <category android:name="android.intent.category.DEFAULT" /> |
| 191 | <category android:name="android.intent.category.BROWSABLE" /> |
| 192 | <data android:scheme="sms" /> |
| 193 | <data android:scheme="smsto" /> |
| 194 | <data android:scheme="mms" /> |
| 195 | <data android:scheme="mmsto" /> |
| 196 | </intent-filter> |
| 197 | </activity> |
| 198 | |
| 199 | <activity |
| 200 | android:name=".intents.FindConversationsIntent" |
| 201 | android:exported="true" |
| 202 | android:permission="com.vayunmathur.communicate.permissions.ACCESS_COMMUNICATE" |
| 203 | android:theme="@android:style/Theme.NoDisplay" /> |
| 204 | <activity |
| 205 | android:name=".intents.GetMessagesIntent" |
| 206 | android:exported="true" |
| 207 | android:permission="com.vayunmathur.communicate.permissions.ACCESS_COMMUNICATE" |
| 208 | android:theme="@android:style/Theme.NoDisplay" /> |
| 209 | <activity |
| 210 | android:name=".intents.SendMessageIntent" |
| 211 | android:exported="true" |
| 212 | android:permission="com.vayunmathur.communicate.permissions.ACCESS_COMMUNICATE" |
| 213 | android:theme="@android:style/Theme.NoDisplay" /> |
| 214 | |
| 215 | <!-- Watch experience: entered only via MainActivity's watch routing |
| 216 | (no launcher filter of its own). Inert on a phone: it is |
| 217 | reached only from MainActivity's FEATURE_WATCH forward. --> |
| 218 | <activity |
| 219 | android:name=".ui.WearMainActivity" |
| 220 | android:exported="false" |
| 221 | android:taskAffinity="" |
| 222 | android:theme="@android:style/Theme.Material.NoActionBar" /> |
| 223 | |
| 224 | <!-- Expanded conversation bubble host: must be embeddable and document-launched. --> |
| 225 | <activity |
| 226 | android:name=".notifications.BubbleActivity" |
| 227 | android:allowEmbedded="true" |
| 228 | android:documentLaunchMode="always" |
| 229 | android:exported="false" |
| 230 | android:resizeableActivity="true" |
| 231 | android:theme="@style/Theme.General" /> |
| 232 | |
| 233 | <receiver |
| 234 | android:name=".telephony.SmsDeliverReceiver" |
| 235 | android:exported="true" |
| 236 | android:permission="android.permission.BROADCAST_SMS"> |
| 237 | <intent-filter> |
| 238 | <action android:name="android.provider.Telephony.SMS_DELIVER" /> |
| 239 | </intent-filter> |
| 240 | </receiver> |
| 241 | |
| 242 | <receiver |
| 243 | android:name=".telephony.MmsDeliverReceiver" |
| 244 | android:exported="true" |
| 245 | android:permission="android.permission.BROADCAST_WAP_PUSH"> |
| 246 | <intent-filter> |
| 247 | <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" /> |
| 248 | <data android:mimeType="application/vnd.wap.mms-message" /> |
| 249 | </intent-filter> |
| 250 | </receiver> |
| 251 | |
| 252 | <service |
| 253 | android:name=".telephony.RespondViaMessageService" |
| 254 | android:exported="true" |
| 255 | android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"> |
| 256 | <intent-filter> |
| 257 | <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" /> |
| 258 | <category android:name="android.intent.category.DEFAULT" /> |
| 259 | <data android:scheme="sms" /> |
| 260 | <data android:scheme="smsto" /> |
| 261 | <data android:scheme="mms" /> |
| 262 | <data android:scheme="mmsto" /> |
| 263 | </intent-filter> |
| 264 | </service> |
| 265 | |
| 266 | <service |
| 267 | android:name=".telephony.CommunicateInCallService" |
| 268 | android:exported="true" |
| 269 | android:permission="android.permission.BIND_INCALL_SERVICE"> |
| 270 | <meta-data |
| 271 | android:name="android.telecom.IN_CALL_SERVICE_UI" |
| 272 | android:value="true" /> |
| 273 | <meta-data |
| 274 | android:name="android.telecom.IN_CALL_SERVICE_RINGING" |
| 275 | android:value="true" /> |
| 276 | <intent-filter> |
| 277 | <action android:name="android.telecom.InCallService" /> |
| 278 | </intent-filter> |
| 279 | </service> |
| 280 | |
| 281 | <service |
| 282 | android:name=".telephony.GoogleVoiceConnectionService" |
| 283 | android:exported="true" |
| 284 | android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"> |
| 285 | <intent-filter> |
| 286 | <action android:name="android.telecom.ConnectionService" /> |
| 287 | </intent-filter> |
| 288 | </service> |
| 289 | |
| 290 | <service |
| 291 | android:name=".telephony.GoogleVoiceSyncService" |
| 292 | android:exported="false" |
| 293 | android:foregroundServiceType="remoteMessaging" /> |
| 294 | |
| 295 | <!-- Carrier service for the MA-OS privilege grant (UiccCarrierPrivilegeRules |
| 296 | reports this app as privileged): lets the platform select us as the carrier |
| 297 | service, which unblocks IMS socket bind + single-reg delegate on carriers |
| 298 | whose UICC profiles carry no rules. --> |
| 299 | <service |
| 300 | android:name=".telephony.CommunicateCarrierService" |
| 301 | android:exported="true" |
| 302 | android:permission="android.permission.BIND_CARRIER_SERVICES"> |
| 303 | <intent-filter> |
| 304 | <action android:name="android.service.carrier.CarrierService" /> |
| 305 | </intent-filter> |
| 306 | <meta-data |
| 307 | android:name="android.service.carrier.LONG_LIVED_BINDING" |
| 308 | android:value="true" /> |
| 309 | </service> |
| 310 | |
| 311 | <service |
| 312 | android:name=".telephony.GoogleVoiceCallForegroundService" |
| 313 | android:exported="false" |
| 314 | android:foregroundServiceType="phoneCall" /> |
| 315 | |
| 316 | <!-- Exported for the Android Automotive / Android Auto host, which |
| 317 | binds and validates the session itself; no binder permission can |
| 318 | be required here or the host could not connect. --> |
| 319 | <service |
| 320 | android:name=".service.car.CommunicateCarAppService" |
| 321 | android:exported="true" |
| 322 | tools:ignore="ExportedService"> |
| 323 | <intent-filter> |
| 324 | <action android:name="androidx.car.app.CarAppService" /> |
| 325 | <category android:name="androidx.car.app.category.MESSAGING" /> |
| 326 | <category android:name="androidx.car.app.category.CALLING" /> |
| 327 | </intent-filter> |
| 328 | </service> |
| 329 | |
| 330 | <meta-data |
| 331 | android:name="androidx.car.app.minCarApiLevel" |
| 332 | android:value="1" /> |
| 333 | |
| 334 | <meta-data |
| 335 | android:name="com.google.android.gms.car.application" |
| 336 | android:resource="@xml/automotive_app_desc" /> |
| 337 | |
| 338 | <provider |
| 339 | android:name="androidx.core.content.FileProvider" |
| 340 | android:authorities="${applicationId}.mmsfileprovider" |
| 341 | android:exported="false" |
| 342 | android:grantUriPermissions="true"> |
| 343 | <meta-data |
| 344 | android:name="android.support.FILE_PROVIDER_PATHS" |
| 345 | android:resource="@xml/mms_file_paths" /> |
| 346 | </provider> |
| 347 | |
| 348 | <!-- Watch conduit scheduled push sync: the phone Watch app fires |
| 349 | ConduitSync.ACTION (signature permission, package-addressed) |
| 350 | and this receiver pushes the current snapshot over the |
| 351 | conduit. Exported only to holders of that permission. --> |
| 352 | <receiver |
| 353 | android:name=".sync.ConduitSyncTriggerReceiver" |
| 354 | android:exported="true" |
| 355 | android:permission="com.vayunmathur.watch.permissions.CONDUIT"> |
| 356 | <intent-filter> |
| 357 | <action android:name="com.vayunmathur.watch.action.SYNC_TRIGGER" /> |
| 358 | </intent-filter> |
| 359 | </receiver> |
| 360 | </application> |
| 361 | |
| 362 | </manifest> |