gps默认打开,需要关闭的话,修改以下文件:
/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
将
<string name="def_location_providers_allowed" tanslatable="false">gps</string>
改为
<string name="def_location_providers_allowed" tanslatable="false"></string>
备注:此方法在Android9以上的版本就不适用了
frameworks\base\packages\SettingsProvider\res\values\default.xml
默认打开位置服务
<string name="def_location_providers_allowed" translatable="false">gps</string>修改为
<string name="def_location_providers_allowed" translatable="false">network,gps</string>
默认关闭GPS设置
<string name="def_location_providers_allowed" translatable="false">gps</string>修改为
<string name="def_location_providers_allowed" translatable="false"></string>
46334