use of com.android.settingslib.core.lifecycle.LifecycleObserver in project android_packages_apps_Settings by DirtyUnicorns.
the class LanguageAndInputSettingsTest method testGetPreferenceControllers_shouldRegisterLifecycleObservers.
@Test
public void testGetPreferenceControllers_shouldRegisterLifecycleObservers() {
final List<AbstractPreferenceController> controllers = mFragment.getPreferenceControllers(mActivity);
int lifecycleObserverCount = 0;
for (AbstractPreferenceController controller : controllers) {
if (controller instanceof LifecycleObserver) {
lifecycleObserverCount++;
}
}
verify(mFragment.getLifecycle(), times(lifecycleObserverCount)).addObserver(any(LifecycleObserver.class));
}
use of com.android.settingslib.core.lifecycle.LifecycleObserver in project android_packages_apps_Settings by SudaMod.
the class LanguageAndInputSettingsTest method testGetPreferenceControllers_shouldRegisterLifecycleObservers.
@Test
public void testGetPreferenceControllers_shouldRegisterLifecycleObservers() {
final List<AbstractPreferenceController> controllers = mFragment.getPreferenceControllers(mActivity);
int lifecycleObserverCount = 0;
for (AbstractPreferenceController controller : controllers) {
if (controller instanceof LifecycleObserver) {
lifecycleObserverCount++;
}
}
verify(mFragment.getLifecycle(), times(lifecycleObserverCount)).addObserver(any(LifecycleObserver.class));
}
Aggregations