fix crash after MemorizingTrustManager's TOFU/POP Always/Once/Abort prompt

If there is an unknown HTTPS certificate, MemorizingTrustManager puts up a
prompt to ask whether the user wants to trust the certificate.  It comes at
a weird time in the lifecycle of the dialogs, so the previous dialog might
be null.  Therefore add a null check.

This situation should probably be improved and better integrated.
This commit is contained in:
Hans-Christoph Steiner 2014-08-02 00:27:47 -04:00
parent 249e38c32f
commit b695bbc4b1

View File

@ -180,7 +180,7 @@ public class UpdateService extends IntentService implements ProgressListener {
if (finished) {
forwardEvent(EVENT_FINISHED);
if (dialog.isShowing()) {
if (dialog != null && dialog.isShowing()) {
try {
dialog.dismiss();
} catch (IllegalArgumentException e) {