AdapterAPI

interface AdapterAPI(source)

查询和启停 AutoTweaker 加载的适配器,AutoTweaker 不支持动态加载或卸载适配器。

See also

Functions

Link copied to clipboard
abstract suspend fun alive(name: KebabCase): Boolean

根据适配器的 name 获取适配器是否正在运行。

Link copied to clipboard
abstract suspend fun list(): PairList<AdapterInfo, Boolean>

列出 AutoTweaker 加载的全部适配器。

Link copied to clipboard
abstract suspend fun start(name: KebabCase): Boolean

根据适配器的 name 启动适配器,AutoTweaker 不会捕获适配器在此过程中抛出的异常,请自行处理。

Link copied to clipboard
abstract suspend fun stop(name: KebabCase): Boolean

根据适配器的 name 停止适配器,AutoTweaker 不会捕获适配器在此过程中抛出的异常,请自行处理。