接口 XposedModuleInterface
- 所有已知实现类:
XposedModule
-
嵌套类概要
嵌套类修饰符和类型接口说明static interfaceWraps information about the process in which the module is loaded.static interfaceWraps information about the package being loaded.static interfaceWraps information about the package whose classloader is ready.static interfaceWraps information about system server. -
方法概要
修饰符和类型方法说明default voidGets notified when the module is loaded into the target process.
This callback is guaranteed to be called exactly once for a process.default voidGets notified when aR.attr.hasCodepackage is loaded into the process.default voidGets notified whenAppComponentFactoryhas instantiated the classloader and is ready to createApplication.default voidGets notified when system server is ready to start critical services.
-
方法详细资料
-
onModuleLoaded
Gets notified when the module is loaded into the target process.
This callback is guaranteed to be called exactly once for a process.- 参数:
param- Information about the process in which the module is loaded- 抛出:
RuntimeException- Everything the callback throws is caught and logged.
-
onPackageLoaded
@RequiresApi(29) default void onPackageLoaded(@NonNull XposedModuleInterface.PackageLoadedParam param) Gets notified when aR.attr.hasCodepackage is loaded into the process. This is the time when the default classloader is ready but before the instantiation ofAppComponentFactory.This callback is invoked only once for each package name loaded into the process, note that a process may load multiple packages, such as
R.attr.sharedUserIdandContext.createPackageContext(String, int)withContext.CONTEXT_INCLUDE_CODE.In system server, the first callback is replaced by
onSystemServerStarting(SystemServerStartingParam), soparam.isFirstPackage()is nevertruehere.- 参数:
param- Information about the package being loaded- 抛出:
RuntimeException- Everything the callback throws is caught and logged.
-
onPackageReady
Gets notified whenAppComponentFactoryhas instantiated the classloader and is ready to createApplication.This callback is invoked only once for each package name loaded into the process, note that a process may load multiple packages, such as
R.attr.sharedUserIdandContext.createPackageContext(String, int)withContext.CONTEXT_INCLUDE_CODE.In system server, the first callback is replaced by
onSystemServerStarting(SystemServerStartingParam), soparam.isFirstPackage()is nevertruehere.- 参数:
param- Information about the package being loaded- 抛出:
RuntimeException- Everything the callback throws is caught and logged.
-
onSystemServerStarting
Gets notified when system server is ready to start critical services. In system server, this callback replaces the first callback phase ofonPackageLoaded(PackageLoadedParam)andonPackageReady(PackageReadyParam).- 参数:
param- Information about system server- 抛出:
RuntimeException- Everything the callback throws is caught and logged.
-