Fix IllegalStateException in ViewKeyShareFragment
This commit is contained in:
@@ -408,6 +408,8 @@ public class ViewKeyShareFragment extends LoaderFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void onPostExecute(Bitmap qrCode) {
|
protected void onPostExecute(Bitmap qrCode) {
|
||||||
|
// only change view, if fragment is attached to activity
|
||||||
|
if (ViewKeyShareFragment.this.isAdded()) {
|
||||||
mFingerprintQrCode.setImageBitmap(qrCode);
|
mFingerprintQrCode.setImageBitmap(qrCode);
|
||||||
|
|
||||||
// Transition drawable with a transparent drawable and the final bitmap
|
// Transition drawable with a transparent drawable and the final bitmap
|
||||||
@@ -420,6 +422,7 @@ public class ViewKeyShareFragment extends LoaderFragment implements
|
|||||||
mFingerprintQrCode.setImageDrawable(td);
|
mFingerprintQrCode.setImageDrawable(td);
|
||||||
td.startTransition(200);
|
td.startTransition(200);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
loadTask.execute();
|
loadTask.execute();
|
||||||
|
|||||||
Reference in New Issue
Block a user