use of com.android.settings.security.OwnerInfoPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ScreenLockSettingsTest method onOwnerInfoUpdated_shouldUpdateOwnerInfoController.
@Test
public void onOwnerInfoUpdated_shouldUpdateOwnerInfoController() {
final Map<Class, List<AbstractPreferenceController>> preferenceControllers = ReflectionHelpers.getField(mSettings, "mPreferenceControllers");
final OwnerInfoPreferenceController controller = mock(OwnerInfoPreferenceController.class);
List<AbstractPreferenceController> controllerList = new ArrayList<>();
controllerList.add(controller);
preferenceControllers.put(OwnerInfoPreferenceController.class, controllerList);
mSettings.onOwnerInfoUpdated();
verify(controller).updateSummary();
}
use of com.android.settings.security.OwnerInfoPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class LockStyleSettings method createPreferenceControllers.
@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final Lifecycle lifecycle = getSettingsLifecycle();
mOwnerInfoPreferenceController = new OwnerInfoPreferenceController(context, this, lifecycle);
controllers.add(mOwnerInfoPreferenceController);
return controllers;
}
use of com.android.settings.security.OwnerInfoPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ScreenLockSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Fragment parent, Lifecycle lifecycle, LockPatternUtils lockPatternUtils) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new PatternVisiblePreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new PatternErrorVisiblePreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new PatternDotsVisiblePreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new PowerButtonInstantLockPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new DirectlyShowLockPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new LockAfterTimeoutPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new PinScramblePreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new QuickUnlockPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new OwnerInfoPreferenceController(context, parent, lifecycle));
return controllers;
}
use of com.android.settings.security.OwnerInfoPreferenceController in project android_packages_apps_Settings by omnirom.
the class ScreenLockSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, DashboardFragment parent, LockPatternUtils lockPatternUtils) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new PatternVisiblePreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new PowerButtonInstantLockPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new LockAfterTimeoutPreferenceController(context, MY_USER_ID, lockPatternUtils));
controllers.add(new OwnerInfoPreferenceController(context, parent));
return controllers;
}
use of com.android.settings.security.OwnerInfoPreferenceController in project android_packages_apps_Settings by omnirom.
the class ScreenLockSettingsTest method onOwnerInfoUpdated_shouldUpdateOwnerInfoController.
@Test
public void onOwnerInfoUpdated_shouldUpdateOwnerInfoController() {
final Map<Class, List<AbstractPreferenceController>> preferenceControllers = ReflectionHelpers.getField(mSettings, "mPreferenceControllers");
final OwnerInfoPreferenceController controller = mock(OwnerInfoPreferenceController.class);
List<AbstractPreferenceController> controllerList = new ArrayList<>();
controllerList.add(controller);
preferenceControllers.put(OwnerInfoPreferenceController.class, controllerList);
mSettings.onOwnerInfoUpdated();
verify(controller).updateSummary();
}
Aggregations