public final class ApplicationLifecycleMonitorRegistry
extends Object
java.lang.Object | |
↳ | android.support.test.runner.lifecycle.ApplicationLifecycleMonitorRegistry |
一个公开的注册表实例,使调用者可以轻松找到应用程序的应用程序生命周期监视器。
Public methods |
|
---|---|
static ApplicationLifecycleMonitor |
getInstance() 返回ActivityLifecycleMonitor。 |
static void |
registerInstance(ApplicationLifecycleMonitor monitor) 将生命周期监视器存储在注册表中。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
ApplicationLifecycleMonitor getInstance ()
返回ActivityLifecycleMonitor。 本显示器不保证在所有仪器下出现。
Returns | |
---|---|
ApplicationLifecycleMonitor |
ActivityLifecycleMonitor the monitor for this application. |
Throws | |
---|---|
IllegalStateException |
if no monitor has been registered. |
void registerInstance (ApplicationLifecycleMonitor monitor)
将生命周期监视器存储在注册表中。
这是一个全局注册表 - 因此请注意调用此方法的影响!
Parameters | |
---|---|
monitor |
ApplicationLifecycleMonitor : the monitor for this application. Null deregisters any existing monitor. |