Add the automatic storage manager settings.
This provides a toggle for changing if the storage manager is turned on or off and how many days of data to retain. It is currently not hooked up to anything currently and only acts as the view, pending b/28600825. Bug: 28560570 Change-Id: Iaa2d819f26addab4dc02ced80e9ba79e0fcf0980
This commit is contained in:
@@ -59,6 +59,7 @@ import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.applications.ManageApplications;
|
||||
import com.android.settings.deletionhelper.DeletionHelperFragment;
|
||||
import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
|
||||
import com.android.settings.deviceinfo.StorageSettings.MountTask;
|
||||
import com.android.settingslib.deviceinfo.StorageMeasurement;
|
||||
import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementDetails;
|
||||
@@ -117,6 +118,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
private int mItemPoolIndex;
|
||||
|
||||
private Preference mExplore;
|
||||
private Preference mAutomaticStorageManagement;
|
||||
|
||||
private boolean mNeedsUpdate;
|
||||
|
||||
@@ -164,6 +166,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
mCurrentUser = mUserManager.getUserInfo(UserHandle.myUserId());
|
||||
|
||||
mExplore = buildAction(R.string.storage_menu_explore);
|
||||
mAutomaticStorageManagement = buildAction(R.string.storage_settings);
|
||||
|
||||
mNeedsUpdate = true;
|
||||
|
||||
@@ -190,6 +193,9 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
|
||||
screen.removeAll();
|
||||
|
||||
if (getResources().getBoolean(R.bool.config_has_storage_manager)) {
|
||||
addPreference(screen, mAutomaticStorageManagement);
|
||||
}
|
||||
addPreference(screen, mSummary);
|
||||
|
||||
List<UserInfo> allUsers = mUserManager.getUsers();
|
||||
@@ -475,6 +481,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
case R.string.storage_menu_explore: {
|
||||
intent = mSharedVolume.buildBrowseIntent();
|
||||
} break;
|
||||
case R.string.storage_settings: {
|
||||
startFragment(this, AutomaticStorageManagerSettings.class.getCanonicalName(),
|
||||
R.string.automatic_storage_manager_settings, 0, null);
|
||||
return true;
|
||||
}
|
||||
case 0: {
|
||||
UserInfoFragment.show(this, pref.getTitle(), pref.getSummary());
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user