- try {
- pinnedSslCertificateMismatchListener = (PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener) context;
- } catch(ClassCastException exception) {
- throw new ClassCastException(context.toString() + " must implement PinnedSslCertificateMismatchListener");
- }
+ // Get a handle for `PinnedSslCertificateMismatchListener` from the launching context.
+ pinnedSslCertificateMismatchListener = (PinnedSslCertificateMismatchListener) context;