use of com.android.settings.applications.UserManagerWrapper in project android_packages_apps_Settings by SudaMod.
the class StorageDashboardFragment method getPreferenceControllers.
@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
mSummaryController = new StorageSummaryDonutPreferenceController(context);
controllers.add(mSummaryController);
StorageManager sm = context.getSystemService(StorageManager.class);
mPreferenceController = new StorageItemPreferenceController(context, this, mVolume, new StorageManagerVolumeProvider(sm));
controllers.add(mPreferenceController);
UserManagerWrapper userManager = new UserManagerWrapperImpl(context.getSystemService(UserManager.class));
mSecondaryUsers = SecondaryUserController.getSecondaryUserControllers(context, userManager);
controllers.addAll(mSecondaryUsers);
final AutomaticStorageManagementSwitchPreferenceController asmController = new AutomaticStorageManagementSwitchPreferenceController(context, mMetricsFeatureProvider, getFragmentManager());
getLifecycle().addObserver(asmController);
controllers.add(asmController);
return controllers;
}
Aggregations