Increase volume search timeout, fix dialog flow.

Slower devices can take longer to process kernel events, so try up
to 25 times (~6 seconds) to find the volume after the partitioning
is finished.

Fix bug where we'd finish() while trying to show the format
confirmation dialog, meaning users couldn't format corrupted
non-primary volumes.

Bug: 74129968, 77849654, 74132243
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I91144051cb6de0cd944d93b03dc5127676e24be8
This commit is contained in:
Jeff Sharkey
2018-04-20 14:34:29 -06:00
parent 3bdd65e255
commit b9a1ebcb45
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ public class StorageWizardFormatProgress extends StorageWizardBase {
storage.partitionPrivate(activity.mDisk.getId());
publishProgress(40);
final VolumeInfo privateVol = activity.findFirstVolume(TYPE_PRIVATE, 5);
final VolumeInfo privateVol = activity.findFirstVolume(TYPE_PRIVATE, 25);
final CompletableFuture<PersistableBundle> result = new CompletableFuture<>();
storage.benchmark(privateVol.getId(), new IVoldTaskListener.Stub() {
@Override