In the era of android3.x, the title does not exist. But by 4.0, I don't know why all android arm versions use the V8 engine by default using the Chrome browser. During the test of CTS, we found that if you use a proxy to access the Internet (because the test items in CTS often need to access the Internet such as YouTube, you need to flip the wall to browse), you cannot play YouTube videos, apart from opening some videos because they cannot be played due to format problems, android4.0's own design defects account for a large proportion. Because 4.0 uses the non-proxy parser creation method when creating the proxy service, the media cannot use the proxy during playback.
Network. Of course, this can be said that Google's design is not good. After all, in most regions outside the tianchao dynasty, There is no wall flip, if Google engineers are asked to consider the special circumstances of tianchao during design, it is really difficult.
No way, you can only change the code for the product through CTS. First, add the following in frameworks/base/Media/libstagefright/chromium_http/support. cpp sfrequestcontext:
Property_get ("net. Proxy. hostname", proxy_name ,"");
STD: String host_name = proxy_name;
If (host_name.length ()> 0 ){
Set_proxy_service (net: proxyservice: createfixed (host_name ));
}
Else {
Set_proxy_service (net: proxyservice: createwithoutproxyresolver (
New net: proxyconfigserviceandroid, net_log ()));
}
Add systemproperties. Set ("net. Proxy. hostname", host) in packages/apps/settings/src/COM/Android/settings/WiFi/wificonfigcontroller. Java 416 );
This is a little worse, because every time you restart the machine, Android will automatically judge the network connection status in the wifiservice before the restart, and re-connect. That is to say, the settings will not be taken away at this time, and after media restarts, it will re-create proxy_service to open the webpage, then the createwithoutproxyresolver method will be used at this time, in CTS, it is common to restart the machine. Therefore, you need to make some modifications in the WiFi state machine:
Is to send the net again after the connection is successful. proxy. the environment variable of hostname. As for where to send this message, I personally think that it can be sent within this period of time after the state machine enters connectsuccess and before the media set_proxy_service.