Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / aosp-stubs / src / main / java / android / os / UpdateEngineCallback.java
UpdateEngineCallback.java26 lines · 1.0 KiBRaw
| 1 | package android.os; |
| 2 | |
| 3 | /** |
| 4 | * Compile-only stub. See the module's build.gradle.kts. |
| 5 | * |
| 6 | * <p>Mirrors {@code @SystemApi android.os.UpdateEngineCallback}. Both methods are abstract in |
| 7 | * the real class, so a subclass must implement both. |
| 8 | * |
| 9 | * <p>Notes from the AOSP source that the signatures do not show: |
| 10 | * |
| 11 | * <ul> |
| 12 | * <li>Callbacks arrive on the {@link Handler} passed to |
| 13 | * {@link UpdateEngine#bind(UpdateEngineCallback, Handler)}, or on a binder thread when |
| 14 | * the single-argument {@code bind} is used. The single-argument form therefore delivers |
| 15 | * {@code onStatusUpdate} OFF the main thread. |
| 16 | * <li>{@code onStatusUpdate} fires immediately on bind with the current status, not only on |
| 17 | * change — so a freshly bound caller sees the state of an update already in progress. |
| 18 | * <li>{@code percent} is 0..1, not 0..100. |
| 19 | * </ul> |
| 20 | */ |
| 21 | public abstract class UpdateEngineCallback { |
| 22 | |
| 23 | public abstract void onStatusUpdate(int status, float percent); |
| 24 | |
| 25 | public abstract void onPayloadApplicationComplete(int errorCode); |
| 26 | } |