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 | - Gradle: :library:aosp-stubs / dir: library/aosp-stubs/ |
| 6 | - Package roots present: (compile-only hidden-API stubs) |
| 7 | - Entry files: (none — stubs only, no runtime code) |
| 8 | - Deps: (none) |
| 9 | - Metadata: metadata_data/library-aosp-stubs.md (absent — libraries have none by design) |
| 10 | - Rust: no / screenshotTest: no |
| 11 | |
| 12 | ## Overview |
| 13 | **Purpose:** Compile-only stubs for Android hidden APIs in one module. Lets privileged modules (appstore, cast, updater, parentalcontrols, euicc) reference system APIs without the SDK exposing them. |
| 14 | **How to use:** Depend on it, call the hidden API, guard with runtime availability checks — stubs satisfy the compiler, the OS provides the implementation. |
| 15 | **Entry points:** The stub matching your hidden API (verify via scoped `ls`). |
| 16 | **Gotchas:** Stubs are signatures only — calling one on an OS build that lacks the API crashes at runtime. Verify stub coverage against `ls` before relying on it. |
| 17 | |
| 18 | ## Key files |
| 19 | - (No key files listed — verify via scoped `ls` when touching this module.) |
| 20 | |
| 21 | ## Verify (this module only) |
| 22 | ``` |
| 23 | ./gradlew :library:aosp-stubs:compileDevKotlin |
| 24 | ./gradlew :library:aosp-stubs:lint |
| 25 | ``` |