Returning to wizard, enable migration.
Bring primary storage migration back into the adoption flow, and provide a path for long-lived notifications to re-launch into the Settings app. Also provide option to initiate migration if skipped during wizard. For now, estmiate migration size and time based on a Class 10 card. Follow other callback refactoring. Bug: 19993667 Change-Id: Ia0c28eb114bc6c8066c17b3142ed74f962140c91
This commit is contained in:
@@ -35,6 +35,8 @@ import com.android.setupwizardlib.view.NavigationBar;
|
||||
import com.android.setupwizardlib.view.NavigationBar.NavigationBarListener;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class StorageWizardBase extends Activity implements NavigationBarListener {
|
||||
protected StorageManager mStorage;
|
||||
@@ -56,7 +58,7 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
|
||||
final String diskId = getIntent().getStringExtra(DiskInfo.EXTRA_DISK_ID);
|
||||
if (!TextUtils.isEmpty(diskId)) {
|
||||
mDisk = mStorage.findDiskById(diskId);
|
||||
} else {
|
||||
} else if (mVolume != null) {
|
||||
mDisk = mVolume.getDisk();
|
||||
}
|
||||
|
||||
@@ -130,4 +132,14 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
|
||||
public void onNavigateNext() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
protected VolumeInfo findFirstVolume(int type) {
|
||||
final List<VolumeInfo> vols = mStorage.getVolumes();
|
||||
for (VolumeInfo vol : vols) {
|
||||
if (Objects.equals(mDisk.getId(), vol.getDiskId()) && (vol.getType() == type)) {
|
||||
return vol;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user