Add simple null checks to StorageWizard*, also listen to...
the disk destroyed event. Bug 21336042 Change-Id: I9f53501a6122a4a9046774e3c4c08b5d6d6f8552
This commit is contained in:
@@ -36,6 +36,10 @@ public class StorageWizardMoveConfirm extends StorageWizardBase {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (mVolume == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
setContentView(R.layout.storage_wizard_generic);
|
||||
|
||||
try {
|
||||
@@ -45,9 +49,6 @@ public class StorageWizardMoveConfirm extends StorageWizardBase {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Preconditions.checkNotNull(mVolume);
|
||||
Preconditions.checkNotNull(mApp);
|
||||
|
||||
// Sanity check that target volume is candidate
|
||||
Preconditions.checkState(
|
||||
getPackageManager().getPackageCandidateVolumes(mApp).contains(mVolume));
|
||||
|
Reference in New Issue
Block a user