Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Fix hooking setUserAgent
Browse files Browse the repository at this point in the history
Refs #825
  • Loading branch information
M66B committed Nov 26, 2013
1 parent b6b5712 commit 1bd681e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biz/bokhorst/xprivacy/XWebView.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public String getClassName() {
// frameworks/base/core/java/android/webkit/WebView.java
// http://developer.android.com/reference/android/webkit/WebView.html

// public synchronize String getUserAgentString()
// public synchronized void setUserAgent(int ua)
// public synchronized void setUserAgentString (String ua)
// frameworks/base/core/java/android/webkit/WebSettings.java
// http://developer.android.com/reference/android/webkit/WebSettings.html
Expand Down Expand Up @@ -69,7 +69,7 @@ protected void after(MethodHookParam param) throws Throwable {

// setUserAgent
try {
Method setUserAgent = clazzWebSettings.getDeclaredMethod("setUserAgent", String.class);
Method setUserAgent = clazzWebSettings.getDeclaredMethod("setUserAgent", Integer.class);
Util.log(this, Log.INFO, "Hooking " + setUserAgent.getName());
XposedBridge.hookMethod(setUserAgent, new XC_MethodHook() {
@Override
Expand Down

0 comments on commit 1bd681e

Please sign in to comment.