| Strategy | Meaning | Cost |
|---|---|---|
| Translate | The app's own code, made into host code by a translator and a JIT | None at run time once cached |
| Map | An Android interface that a host interface already gives, nearly one to one (libcore's java.* onto OpenJDK) | A remap table for the differences |
| HLE | The runtime answers the interface itself, below the level Android implements it at. Nothing of Android's implementation runs | The interface's behavior, as apps see it |
| Abstract | A whole subsystem collapsed onto one host facility (every window an SDL window, every surface a Vulkan swapchain) | The subsystem's few entry points |
| Implement | Our own Java code, as Android's does it, because apps subclass it or depend on its exact logic (View, TextView layout) | Real code, kept minimal |
| Off | A service that reports itself absent or disabled, which apps must already handle (accessibility, autofill, telephony) | A stub |
An interface is HLE'd or abstracted unless the app can see the difference. Apps subclass View and Activity, so
their logic is implemented. Apps never see system_server, binder transactions, SurfaceFlinger or gralloc, so
those collapse. Where a native library does the work (SQLite, HarfBuzz, libdeflate), the Java side is a thin
wrapper over it through JNI, not a copy of the library in Java.
Made from docs/platforms/android-apps/interfaces.md at 69237645142c. GPL-3.0-or-later.