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