Back to project page utwitterapi.
The source code is released under:
GNU General Public License
If you think the Android project utwitterapi listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.mariotaku.utwitterapi.hook; //from w w w . j a v a 2 s. c o m import org.apache.http.conn.scheme.Scheme; import org.mariotaku.utwitterapi.util.TrustAllApacheSSLSocketFactory; import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedBridge; public class SchemeGetSocketFactoryCallback extends XC_MethodReplacement { @Override protected Object replaceHookedMethod(final MethodHookParam param) throws Throwable { final Scheme scheme = (Scheme) param.thisObject; if ("https".equals(scheme.getName()) || scheme.getDefaultPort() == 443) return TrustAllApacheSSLSocketFactory.getSocketFactory(); return XposedBridge.invokeOriginalMethod(param.method, scheme, param.args); } }