|
41 | 41 | * apply the module on apps outside the scope list</li> |
42 | 42 | * <li>{@code exceptionMode} (string) [protective|passthrough] - Default to protective, see |
43 | 43 | * {@link io.github.libxposed.api.XposedInterface.ExceptionMode}</li> |
44 | | - * <li>{@code autoHotReload} (boolean, API 102+) - whether app updates should automatically trigger hot |
45 | | - * reloading. Hot reloading is supported only for modules that declare exactly one Java entry |
46 | | - * class, and still proceeds only when |
| 44 | + * <li>{@code autoHotReload} (boolean, API 102+) - whether app updates should automatically |
| 45 | + * trigger hot reloading. App-update hot reloading still proceeds only when |
47 | 46 | * {@link io.github.libxposed.api.XposedModuleInterface#onHotReloading(XposedModuleInterface.HotReloadingParam) |
48 | 47 | * onHotReloading()} returns {@code true}.</li> |
49 | 48 | * </ul> |
|
122 | 121 | * onSystemServerStarting()} – called once when system server is starting. This callback |
123 | 122 | * replaces the first package load phase.</li> |
124 | 123 | * <li>{@link io.github.libxposed.api.XposedModuleInterface#onHotReloading(XposedModuleInterface.HotReloadingParam) |
125 | | - * onHotReloading()} - called in old code before hot reloading proceeds. Hot reloading is |
126 | | - * supported only for modules that declare exactly one Java entry class.</li> |
| 124 | + * onHotReloading()} - called in old code before hot reloading proceeds.</li> |
127 | 125 | * <li>{@link io.github.libxposed.api.XposedModuleInterface#onHotReloaded(XposedModuleInterface.HotReloadedParam) |
128 | | - * onHotReloaded()} - called in new code after hot reloading completes. Package lifecycle |
129 | | - * callbacks are not automatically replayed; modules that opt into hot reload should install or |
130 | | - * replace their hooks explicitly from this callback.</li> |
| 126 | + * onHotReloaded()} - called in new code after hot reloading completes.</li> |
131 | 127 | * </ul> |
132 | 128 | * |
133 | 129 | * <p>Since API 102, an entry can call |
|
136 | 132 | * the framework also removes its reference to that entry instance. Hooks and other |
137 | 133 | * {@link io.github.libxposed.api.XposedInterface} APIs remain available. A module that expects its |
138 | 134 | * classloader to become collectible after detaching must also remove module-owned references and |
139 | | - * execution contexts that keep module objects reachable, such as installed hooks, Java or native |
140 | | - * threads, callbacks held by system or app objects, JNI global references, and native state. If |
141 | | - * native code is still running after all Java references to the module classloader are cleared, |
142 | | - * later runtime unloading of native libraries may crash the process; this is a module lifecycle |
143 | | - * bug.</p> |
| 135 | + * execution contexts that keep module objects reachable, such as installed hooks, Java threads, |
| 136 | + * and callbacks held by system or app objects. If native code is still running after all Java |
| 137 | + * references to the module classloader are cleared, later runtime unloading of native libraries |
| 138 | + * may crash the process; this is a module lifecycle bug.</p> |
144 | 139 | * |
145 | 140 | * <p>Hot reload is supported only for modules that declare exactly one Java entry class. Modules |
146 | | - * with zero or multiple Java entry classes are not hot-reloadable.</p> |
| 141 | + * with zero or multiple Java entry classes are not hot-reloadable. Framework implementations may |
| 142 | + * also report hot reload as unsupported when they cannot provide a valid new module generation for |
| 143 | + * the requested module or target. The API does not mandate how frameworks stage code or native |
| 144 | + * libraries across generations.</p> |
147 | 145 | * |
148 | 146 | * <p>State passed from {@code onHotReloading()} to {@code onHotReloaded()} through |
149 | 147 | * {@code setSavedInstanceState()} must be classloader-neutral. It must not contain objects created |
|
0 commit comments