Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / aosp-stubs / build.gradle.kts
build.gradle.kts38 lines · 3.2 KiBRaw
| 1 | plugins { |
| 2 | id("common-conventions-library") |
| 3 | } |
| 4 | // Compile-only stubs for framework @SystemApi / hidden classes absent from the public SDK. |
| 5 | // Depend on this with `compileOnly`; it must NOT be packaged into any APK. |
| 6 | // |
| 7 | // One module holds every stub family so consumers take a single dependency: |
| 8 | // android.app.backup.* — @SystemApi app-data backup transport (BackupTransport, |
| 9 | // RestoreDescription, RestoreSet). Mirrors AOSP so |
| 10 | // ConfigurableBackupTransport overrides exactly. Live use |
| 11 | // needs a platform-signed priv-app whitelisted for |
| 12 | // android.permission.BACKUP. |
| 13 | // android.app.supervision.* — @SystemApi parental-controls classes. `SupervisionAppService.onBind` |
| 14 | // is FINAL upstream and final here; `Policy.Builder<P, B>` generics |
| 15 | // are mirrored exactly so javac emits the same invokevirtual + |
| 16 | // checkcast as against the real SDK. Inlined `static final` |
| 17 | // constant values matter (TYPE_ALLOWED/BLOCKED/TIME_LIMIT are 0/1/2). |
| 18 | // android.nearby.NearbyManager - @SystemApi, ships in the Connectivity mainline module |
| 19 | // (com.android.tethering); only the powered-off finding surface. |
| 20 | // android.net.Network{Agent,AgentConfig,Provider,Score} - @SystemApi local-network agent surface |
| 21 | // (framework-connectivity); :share registers Mosey's `mosey0` |
| 22 | // AirDrop link with it. Needs NETWORK_FACTORY on a priv-app. |
| 23 | // android.os.UpdateEngine{,Callback} — @SystemApi A/B slot writer; only the surface :updater calls. |
| 24 | // android.service.euicc.* — @SystemApi eSIM LPA classes; signatures mirror AOSP so |
| 25 | // EuiccManagerService overrides the abstract methods exactly. |
| 26 | // android.telephony.ims.* (+ gba) — @SystemApi single-registration RCS (SipDelegateManager, |
| 27 | // DelegateRequest, SipMessage, ...). Same-FQN stubs for the two |
| 28 | // otherwise-public classes (ImsManager, RcsUceAdapter) carry only the |
| 29 | // hidden members used plus the public members RCS code touches, so |
| 30 | // resolution is self-contained; the framework class wins at runtime. |
| 31 | // com.android.media.remotedisplay.* — NOT hidden framework classes but a separate Java shared library |
| 32 | // (com.android.media.remotedisplay); the app must also carry a |
| 33 | // `<uses-library>` tag. Only the members MaRemoteDisplayProvider touches. |
| 34 | // |
| 35 | // A stub is a compile-time promise about the runtime class: every member here is one more thing that |
| 36 | // has to stay true. Signatures copied verbatim from AOSP/MAOS; if they drift, the failure is a runtime |
| 37 | // NoSuchMethodError, not a build error. Javac inlines `static final` constants, so their VALUES are |
| 38 | // silently baked into the APK — never add an unused constant. |