OSDN Git Service

Show storage slow dialog allowing state loss.
authorJeff Sharkey <jsharkey@android.com>
Thu, 13 Aug 2015 23:57:46 +0000 (16:57 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 13 Aug 2015 23:57:48 +0000 (16:57 -0700)
We're not picky about losing state here, since the adoption actually
finished under the hood and we're just warning the user that it's
slow.

Without this change, we could end up throwing and re-adopting the
same device twice, which causes issues on sprout-style devices that
only migrate primary storage once.

Bug: 22867250
Change-Id: I1491679ab802f19fe25b82e9b452ca3dabdfec0d

src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java

index 1a5a70c..6f89ff5 100644 (file)
@@ -153,7 +153,7 @@ public class StorageWizardFormatProgress extends StorageWizardBase {
                 // storage or slower.
                 if (Float.isNaN(pct) || pct < 0.25) {
                     final SlowWarningFragment dialog = new SlowWarningFragment();
-                    dialog.show(activity.getFragmentManager(), TAG_SLOW_WARNING);
+                    dialog.showAllowingStateLoss(activity.getFragmentManager(), TAG_SLOW_WARNING);
                 } else {
                     activity.onFormatFinished();
                 }