Storage accessors; persist nickname, flags.
Move to using new public accessors on DiskInfo and VolumeInfo. Persist nickname changes, and remember when user has initialized a public volume. Also skip the migration part of storage wizard until it's implemented. Bug: 19993667 Change-Id: I642fb43afb95380fddd48a1dad438e87b06454da
This commit is contained in:
@@ -22,6 +22,9 @@ import android.os.storage.VolumeInfo;
|
||||
import com.android.internal.util.Preconditions;
|
||||
import com.android.settings.R;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class StorageWizardReady extends StorageWizardBase {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -34,15 +37,15 @@ public class StorageWizardReady extends StorageWizardBase {
|
||||
|
||||
// TODO: handle mixed partition cases instead of just guessing based on
|
||||
// first volume type we encounter
|
||||
for (String volId : mDisk.volumeIds) {
|
||||
final VolumeInfo vol = mStorage.findVolumeById(volId);
|
||||
if (vol == null) continue;
|
||||
final List<VolumeInfo> vols = mStorage.getVolumes();
|
||||
for (VolumeInfo vol : vols) {
|
||||
if (!Objects.equals(mDisk.getId(), vol.getDiskId())) continue;
|
||||
|
||||
if (vol.type == VolumeInfo.TYPE_PUBLIC) {
|
||||
if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
|
||||
setBodyText(R.string.storage_wizard_ready_external_body,
|
||||
mDisk.getDescription());
|
||||
break;
|
||||
} else if (vol.type == VolumeInfo.TYPE_PRIVATE) {
|
||||
} else if (vol.getType() == VolumeInfo.TYPE_PRIVATE) {
|
||||
setBodyText(R.string.storage_wizard_ready_internal_body,
|
||||
mDisk.getDescription());
|
||||
break;
|
||||
|
Reference in New Issue
Block a user