Disable "internal" when adoption not possible.

When adoption isn't possible, we shortcut to try formatting as
external, but that still results in a warning dialog that the user
could cancel away from and then manually pick "internal."

Bug: 110863258
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I04645c3fce11a883c10996772d73440a0dcd51ec
This commit is contained in:
Jeff Sharkey
2018-06-28 11:56:35 -06:00
parent ce287b9fb6
commit 9a3bac25fd

View File

@@ -56,6 +56,7 @@ public class StorageWizardInit extends StorageWizardBase {
if (!mDisk.isAdoptable()) {
// If not adoptable, we only have one choice
mInternal.setEnabled(false);
onNavigateExternal(null);
} else if (!mIsPermittedToAdopt) {
// TODO: Show a message about why this is disabled for guest and