Search in sources :

Example 6 with UserManagerWrapperImpl

use of com.android.settings.applications.UserManagerWrapperImpl 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;
}
Also used : AutomaticStorageManagementSwitchPreferenceController(com.android.settings.deviceinfo.storage.AutomaticStorageManagementSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) StorageItemPreferenceController(com.android.settings.deviceinfo.storage.StorageItemPreferenceController) UserManager(android.os.UserManager) ArrayList(java.util.ArrayList) StorageManager(android.os.storage.StorageManager) UserManagerWrapperImpl(com.android.settings.applications.UserManagerWrapperImpl) StorageManagerVolumeProvider(com.android.settingslib.deviceinfo.StorageManagerVolumeProvider) StorageSummaryDonutPreferenceController(com.android.settings.deviceinfo.storage.StorageSummaryDonutPreferenceController) UserManagerWrapper(com.android.settings.applications.UserManagerWrapper)

Aggregations

UserManager (android.os.UserManager)6 StorageManager (android.os.storage.StorageManager)6 UserManagerWrapper (com.android.settings.applications.UserManagerWrapper)6 UserManagerWrapperImpl (com.android.settings.applications.UserManagerWrapperImpl)6 AutomaticStorageManagementSwitchPreferenceController (com.android.settings.deviceinfo.storage.AutomaticStorageManagementSwitchPreferenceController)6 StorageItemPreferenceController (com.android.settings.deviceinfo.storage.StorageItemPreferenceController)6 StorageSummaryDonutPreferenceController (com.android.settings.deviceinfo.storage.StorageSummaryDonutPreferenceController)6 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)6 StorageManagerVolumeProvider (com.android.settingslib.deviceinfo.StorageManagerVolumeProvider)6 ArrayList (java.util.ArrayList)6