Package io.github.libxposed.api
Interface XposedModuleInterface.HotReloadingParam
- Enclosing interface:
XposedModuleInterface
@SinceApi(102)
public static interface XposedModuleInterface.HotReloadingParam
Wraps information about the hot reloading event.
-
Method Summary
Modifier and TypeMethodDescriptionGets the data passed from the module app when triggering hot reload through the service.voidsetSavedInstanceState(Object outState) Sets the data to be passed to the new code after hot reloading.
-
Method Details
-
getExtras
Gets the data passed from the module app when triggering hot reload through the service. This can be null if the app passesnullor the hot reload is triggered by app updating. The bundle should contain only values that can be unmarshalled without the module's class loader, such as primitive values, strings, arrays, and frameworkBundleinstances. -
setSavedInstanceState
Sets the data to be passed to the new code after hot reloading. This can be retrieved inXposedModuleInterface.onHotReloaded(HotReloadedParam). The saved state must not contain objects created under the old module classloader because retaining them in the new generation can keep the old generation strongly reachable after hot reload. Use classloader-neutral values to transfer state.Implementations should reject old-module-classloader objects when they are detected. This check is a diagnostic aid, not a complete object graph verifier; passing an undetected old-module object is still a module lifecycle bug.
- Parameters:
outState- The data to be passed to the new code after hot reloading- Throws:
IllegalArgumentException- ifoutStatecontains an object detected as being created under the old module classloader
-