It is said that in the technical team, leaders and employees will never look at the problem in an angle.
Well, let's not say the law of XX.
I made a Webview.java and two callbacks (Webviewclient.java and Webchromeclient.java) based on the Content API (CHROMIUM34), with this problem:
In the Onpagestarted method, the request UA is changed, which causes the onpagestarted method to be re-executed again.
In this way, some wonderful invocation logic cannot be satisfied.
Based on this, it is necessary to make an adjustment, how to make the request UA changed in the Onpagestarted method, theonpagestarted method will not be re-executed again.
The problem is: in the web_contents_impl.cc file, there are methods Setuseragentoverride, there are controller_. Reloadignoringcache (True).
This line of code is the culprit. Commented out, the previous issue does not occur.
About UA settings in content, causing the page onpagestarted to be recalled again