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; // w w w.ja va 2 s.co m import org.mariotaku.utwitterapi.Constants; import org.mariotaku.utwitterapi.util.Utils; import org.mariotaku.utwitterapi.util.XposedPluginUtils; import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedBridge; public class Twitter4JFixURLCallback extends XC_MethodReplacement implements Constants { @Override protected Object replaceHookedMethod(final MethodHookParam param) throws Throwable { final Object[] args = param.args; if (args != null && args.length == 2 && args[0] instanceof Boolean && args[1] instanceof String) { final String url = (String) args[1]; if (Utils.isTwitterAPI(url) && XposedPluginUtils.isUsingCustomAPI()) { args[0] = XposedPluginUtils.isCustomAPIHttps(); } } return XposedBridge.invokeOriginalMethod(param.method, param.thisObject, args); } }