Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / aosp-stubs / AGENTS.md
| 1 | # AGENTS.md — library/aosp-stubs/ (':library:aosp-stubs') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/aosp-stubs/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | <!-- last-reviewed: 2026-10-16 --> |
| 6 | - Gradle: :library:aosp-stubs / dir: library/aosp-stubs/ |
| 7 | - Package roots present: (compile-only hidden-API stubs — merged from seven former `*-stubs` modules) |
| 8 | - Entry files: (none — stubs only, no runtime code) |
| 9 | - Deps: (none) |
| 10 | - Metadata: metadata_data/library-aosp-stubs.md (absent — libraries have none by design) |
| 11 | - Rust: no / screenshotTest: no |
| 12 | |
| 13 | ## Overview |
| 14 | **Purpose:** Compile-only stubs for Android hidden APIs — merged from seven former `*-stubs` modules into one. Lets privileged modules (appstore, cast, updater, parentalcontrols, euicc) reference system APIs without the SDK exposing them. |
| 15 | **How to use:** Depend on it, call the hidden API, guard with runtime availability checks — stubs satisfy the compiler, the OS provides the implementation. |
| 16 | **Entry points:** The stub matching your hidden API (verify via scoped `ls` — card had no Key files at last review). |
| 17 | **Gotchas:** Stubs are signatures only — calling one on an OS build that lacks the API crashes at runtime. This card was a near-empty stub; verify against `ls` before trusting it. |
| 18 | |
| 19 | ## Key files |
| 20 | - (Verify via scoped `ls` — card had no Key files at last review; add them when touching this module.) |
| 21 | |
| 22 | ## Verify (this module only) |
| 23 | ``` |
| 24 | ./gradlew :library:aosp-stubs:compileDevKotlin |
| 25 | ./gradlew :library:aosp-stubs:lint |
| 26 | ``` |