Add simple null checks to StorageWizard*, also listen to...

the disk destroyed event.

Bug 21336042

Change-Id: I9f53501a6122a4a9046774e3c4c08b5d6d6f8552
This commit is contained in:
Makoto Onuki
2015-06-11 16:16:22 -07:00
parent 0f6b243d4b
commit 1d37d0f7fb
10 changed files with 59 additions and 15 deletions

View File

@@ -34,10 +34,12 @@ public class StorageWizardInit extends StorageWizardBase {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (mDisk == null) {
finish();
return;
}
setContentView(R.layout.storage_wizard_init);
Preconditions.checkNotNull(mDisk);
setHeaderText(R.string.storage_wizard_init_title, mDisk.getDescription());
mRadioExternal = (RadioButton) findViewById(R.id.storage_wizard_init_external_title);