/** * Creates an instance of the MemorizingTrustManager class using the system X509TrustManager. * * <p>You need to supply the application context. This has to be one of: - Application - Activity * - Service * * <p>The context is used for file management, to display the dialog / notification and for * obtaining translated strings. * * @param m Context for the application. */ public MemorizingTrustManager(Context m) { init(m); this.appTrustManager = getTrustManager(appKeyStore); this.defaultTrustManager = getTrustManager(null); }
/** * Creates an instance of the MemorizingTrustManager class that falls back to a custom * TrustManager. * * <p>You need to supply the application context. This has to be one of: - Application - Activity * - Service * * <p>The context is used for file management, to display the dialog / notification and for * obtaining translated strings. * * @param m Context for the application. * @param defaultTrustManager Delegate trust management to this TM. If null, the user must accept * every certificate. */ public MemorizingTrustManager(Context m, X509TrustManager defaultTrustManager) { init(m); this.appTrustManager = getTrustManager(appKeyStore); this.defaultTrustManager = defaultTrustManager; }