zoukankan      html  css  js  c++  java
  • Android 6.0 默认关闭定位和GPS,开启后默认选省电

    默认关闭定位和GPS 修改位置

    frameworks/base/packages/SettingsProvider/res/values/defaults.xml

    <string name="def_location_providers_allowed" translatable="false">network,gps</string>
    修改为
    <string name="def_location_providers_allowed" translatable="false"></string>
    

    默认省电 修改位置

    com/android/settings/location/LocationSettings.java

    public class LocationSettings extends LocationSettingsBase
     @Override
     public void onSwitchChanged(Switch switchView, boolean isChecked) {
         if (isChecked) {
         //setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);	
             setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
         } else {
             setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_OFF);
         }
  • 相关阅读:
    pip安装报错 解决办法
    django admin 支持时间更改
    fiddler抓包工具
    session token两种登陆方式
    面向对象内置方法
    linux 命令
    flask
    celery
    mac添加redis 环境变量
    Django请求流程图
  • 原文地址:https://www.cnblogs.com/cczheng-666/p/10749608.html
Copyright © 2011-2022 走看看