菜单开关只有在切换的时候生效,如果默认打开,需底层驱动直接将节点打开。
vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/location_services.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"xmlns:settings="http://schemas.android.com/apk/res-auto"android:title="@string/location_services_preference_title"><PreferenceCategoryandroid:key="location_services"android:layout="@layout/preference_category_no_label"settings:controller="com.android.settings.location.LocationInjectedServicesPreferenceController"/><com.android.settingslib.RestrictedPreferenceandroid:fragment="com.android.settings.location.WifiScanningFragment"android:key="location_services_wifi_scanning"android:title="@string/location_scanning_wifi_always_scanning_title"settings:controller="com.android.settings.location.LocationServicesWifiScanningPreferenceController"/><com.android.settingslib.RestrictedPreferenceandroid:fragment="com.android.settings.location.BluetoothScanningFragment"android:key="location_services_bluetooth_scanning"android:title="@string/location_scanning_bluetooth_always_scann