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

Modern-Apps.git / library / wearlink / src / main / AndroidManifest.xml

AndroidManifest.xml34 lines · 1.9 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3 <!-- No Bluetooth permissions here: every app pair syncs through the
4 Watch conduit (WearLinkClientNode), so only the Watch apps
5 (:watch, :watch:wear) declare BLUETOOTH_CONNECT and own the real
6 RFCOMM WearLinkNode. Declaring the permissions in this library
7 would inject them into every consuming app. -->
8
9 <!-- Conduit access: both Watch apps' ConduitService (phone :watch and
10 watch :watch:wear, same permission string) are gated by the
11 signature permission com.vayunmathur.watch.permissions.CONDUIT,
12 declared <permission protectionLevel="signature"> in their
13 manifests. A client that has not declared <uses-permission> for
14 it is refused the bind ("requires
15 com.vayunmathur.watch.permissions.CONDUIT"), so this library
16 declares it and manifest merger injects it into every consuming
17 app on both sides. Signature protection grants it automatically
18 to same-signed apps: no user prompt, no runtime request. -->
19 <uses-permission android:name="com.vayunmathur.watch.permissions.CONDUIT" />
20
21 <!-- Package visibility for the conduit client: WearLinkClientNode
22 probes com.vayunmathur.watch with getPackageInfo and binds its
23 ConduitService implicitly by the CONDUIT action scoped to that
24 package. Under Android 11+ package visibility both fail unless
25 the calling app can see the Watch package, so every consuming
26 app must declare it visible. This <queries> entry lives in the
27 library manifest so manifest merger injects it into every
28 consumer; a <package> entry (rather than an <intent> one) covers
29 both the probe and the package-scoped bind, and it declares no
30 permission. -->
31 <queries>
32 <package android:name="com.vayunmathur.watch" />
33 </queries>
34</manifest>