Skip to content

Instantly share code, notes, and snippets.

@tresf
Created November 14, 2019 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tresf/f9a6b0a060f96108e9f76a5238795975 to your computer and use it in GitHub Desktop.
Save tresf/f9a6b0a060f96108e9f76a5238795975 to your computer and use it in GitHub Desktop.
String[] methods = { "impl_updatePeer", "doUpdatePeer" };
for(String method : methods) {
for(Method m : webView.getClass().getDeclaredMethods()) {
if(m.getName().equals(method)) {
if(!m.isAccessible()) {
m.setAccessible(true);
}
try {
m.invoke(webView);
} catch(IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment