Bail if activity was destroyed.

Bug: 24172045
Change-Id: I723951b3478459fc70e29d25386f8d7197964e3d
This commit is contained in:
Jeff Sharkey
2015-10-14 14:45:52 -07:00
parent c16b10ea6b
commit cabb62faf3

View File

@@ -137,6 +137,10 @@ public class StorageWizardFormatProgress extends StorageWizardBase {
@Override
protected void onPostExecute(Exception e) {
final StorageWizardFormatProgress activity = mActivity;
if (activity.isDestroyed()) {
return;
}
if (e != null) {
Log.e(TAG, "Failed to partition", e);
Toast.makeText(activity, e.getMessage(), Toast.LENGTH_LONG).show();