码迷,mamicode.com
首页 > 移动开发 > 详细

解决Android 5.0 (移动网络待机)耗电问题

时间:2015-01-30 19:40:12      阅读:876      评论:0      收藏:0      [点我收藏+]

标签:android   5.0   耗电   

1. 耗电原因

Android 5.0 增加判断网络状态的特性, 判断原理是测试链接google的一个网址. 但是google被墙了, 所以就会造成移动网络频繁的测试链接, 并且网络图标上面的那个感叹号.

详细请参考:http://blog.csdn.net/matrix_laboratory/article/details/43271473


2. 解决方法

修改测试链接网址:

<code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="pln" style="word-wrap: break-word;">adb shell </span><span class="str" style="word-wrap: break-word;">"settings put global captive_portal_server xxxxxxx"</span></code>
比如:

<code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="pln" style="word-wrap: break-word;"></span></code><pre class="prettyprint prettyprinted" name="code" style="font-size: 13.63636302948px; line-height: 26px; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);"><code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="pln" style="word-wrap: break-word;">adb shell </span><span class="str" style="word-wrap: break-word;">"settings put global captive_portal_server <span style="box-sizing: border-box; word-wrap: break-word; font-family: 'Merriweather Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16.3636360168457px; line-height: 22.6909084320068px;"><span style="box-sizing: border-box; word-wrap: break-word; font-size: 16.3636360168457px; line-height: 22.6909084320068px;">www.265.com</span></span>"</span></code>
<span class="pln" style="font-family: monospace, serif; font-size: 1em; word-wrap: break-word;">adb shell </span><span class="str" style="font-family: monospace, serif; font-size: 1em; word-wrap: break-word;">"settings put global captive_portal_server xn--yet824cpd.xn--fiqs8s"</span>


<code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="str" style="word-wrap: break-word;"></span></code><pre class="prettyprint prettyprinted" name="code" style="font-size: 13.63636302948px; line-height: 26px; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);"><code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="pln" style="word-wrap: break-word;">adb shell </span><span class="str" style="word-wrap: break-word;">"settings put global captive_portal_server <span style="box-sizing: border-box; word-wrap: break-word; font-family: 'Merriweather Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16.3636360168457px; line-height: 22.6909084320068px;">liukebin.sinaapp.com</span>"</span></code>
<code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="str" style="word-wrap: break-word;">
</span></code>

3. 参考文献

<code style="word-wrap: break-word; font-family: monospace, serif; font-size: 1em;"><span class="str" style="word-wrap: break-word;">https://xn--yet824cpd.xn--fiqs8s/45.html
</span></code>



解决Android 5.0 (移动网络待机)耗电问题

标签:android   5.0   耗电   

原文地址:http://blog.csdn.net/matrix_laboratory/article/details/43310799

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!