*/
private Bundle mSslPrefTable;
+ /**
+ * Flag indicating that a client reponse is pending.
+ */
+ private boolean mResponsePending;
+
// Message id for handling the response
private static final int HANDLE_RESPONSE = 100;
// if we do not have information on record, ask
// the user (display a dialog)
CallbackProxy proxy = loader.getFrame().getCallbackProxy();
+ mResponsePending = true;
proxy.onReceivedSslError(this, error);
}
* Proceed with the SSL certificate.
*/
public void proceed() {
- sendMessage(obtainMessage(HANDLE_RESPONSE, 1, 0, mLoaderQueue.poll()));
+ if (mResponsePending) {
+ mResponsePending = false;
+ sendMessage(obtainMessage(HANDLE_RESPONSE, 1, 0,
+ mLoaderQueue.poll()));
+ }
}
/**
* the error.
*/
public void cancel() {
- sendMessage(obtainMessage(HANDLE_RESPONSE, 0, 0, mLoaderQueue.poll()));
+ if (mResponsePending) {
+ mResponsePending = false;
+ sendMessage(obtainMessage(HANDLE_RESPONSE, 0, 0,
+ mLoaderQueue.poll()));
+ }
}
/**