Hook up the storage item preferences to actual data.
This uses the same storage query implementation as the previous iteration of the Storage Settings. In b/32206268, a new API for querying this information will be added for querying this info. Once the new API has landed, a future patch will swap out the impl, but this should work for today. Bug: 33199077 Test: Settings Robo Tests Change-Id: I58763e8ee38aabbea533bc614268288e854ff8d4
This commit is contained in:
@@ -81,6 +81,8 @@ public class StorageDashboardFragment extends DashboardFragment {
|
||||
final long usedBytes = mTotalSize - mVolume.getPath().getFreeSpace();
|
||||
mSummaryController.updateBytes(usedBytes, mTotalSize);
|
||||
mPreferenceController.setVolume(mVolume);
|
||||
mPreferenceController.setSystemSize(systemSize);
|
||||
mPreferenceController.startMeasurement();
|
||||
|
||||
// Initialize the footer preference to go to the smart storage management.
|
||||
final FooterPreference pref = mFooterPreferenceMixin.createFooterPreference();
|
||||
@@ -119,8 +121,8 @@ public class StorageDashboardFragment extends DashboardFragment {
|
||||
controllers.add(mSummaryController);
|
||||
|
||||
StorageManager sm = context.getSystemService(StorageManager.class);
|
||||
mPreferenceController = new StorageItemPreferenceController(context, this, mVolume,
|
||||
new StorageManagerVolumeProvider(sm));
|
||||
mPreferenceController = new StorageItemPreferenceController(context, getLifecycle(), this,
|
||||
mVolume, new StorageManagerVolumeProvider(sm));
|
||||
controllers.add(mPreferenceController);
|
||||
controllers.add(new ManageStoragePreferenceController(context));
|
||||
return controllers;
|
||||
|
Reference in New Issue
Block a user