| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2020 The Android Open Source Project |
| |
| Licensed 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 at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed 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 and |
| limitations under the License. |
| --> |
| <resources> |
| <!-- |
| OEMs that wish to change the below settings must do so via a runtime resource overlay package |
| and *NOT* by changing this file. This file is part of the tethering mainline module. |
| TODO: define two resources for each config item: a default_* resource and a config_* resource, |
| config_* is empty by default but may be overridden by RROs. |
| --> |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| USB interfaces. If the device doesn't want to support tethering over USB this should |
| be empty. An example would be "usb.*" --> |
| <string-array translatable="false" name="config_tether_usb_regexs"> |
| <item>"usb\\d"</item> |
| <item>"rndis\\d"</item> |
| </string-array> |
| |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| NCM interfaces. If the device doesn't want to support tethering over NCM this should |
| be empty. --> |
| <string-array translatable="false" name="config_tether_ncm_regexs"> |
| </string-array> |
| |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| Wifi interfaces. If the device doesn't want to support tethering over Wifi this |
| should be empty. An example would be "softap.*" --> |
| <string-array translatable="false" name="config_tether_wifi_regexs"> |
| <item>"wlan\\d"</item> |
| <item>"softap\\d"</item> |
| <item>"ap_br_wlan\\d"</item> |
| <item>"ap_br_softap\\d"</item> |
| </string-array> |
| |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| WiGig interfaces. If the device doesn't want to support tethering over WiGig this |
| should be empty. An example would be "wigig\\d" --> |
| <string-array translatable="false" name="config_tether_wigig_regexs"> |
| <item>"wigig\\d"</item> |
| </string-array> |
| |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| Wifi P2P interfaces. If the device doesn't want to support tethering over Wifi P2p this |
| should be empty. An example would be "p2p-p2p\\d-.*" --> |
| <string-array translatable="false" name="config_tether_wifi_p2p_regexs"> |
| <item>"p2p-p2p\\d-.*"</item> |
| <item>"p2p\\d"</item> |
| </string-array> |
| |
| <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this |
| should be empty. --> |
| <string-array translatable="false" name="config_tether_bluetooth_regexs"> |
| <item>"bt-pan"</item> |
| </string-array> |
| |
| <!-- Use the BPF offload for tethering when the kernel has support. True by default. |
| If the device doesn't want to support tether BPF offload, this should be false. |
| Note that this setting could be overridden by device config. |
| --> |
| <bool translatable="false" name="config_tether_enable_bpf_offload">true</bool> |
| |
| <!-- Use the old dnsmasq DHCP server for tethering instead of the framework implementation. --> |
| <bool translatable="false" name="config_tether_enable_legacy_dhcp_server">false</bool> |
| |
| <!-- Use legacy wifi p2p dedicated address instead of randomize address. --> |
| <bool translatable="false" name="config_tether_enable_legacy_wifi_p2p_dedicated_ip">false</bool> |
| |
| <!-- Use lease subnet prefix length to reserve the range outside of subnet prefix length. |
| This configuration only valid if its value larger than dhcp server address prefix length |
| and config_tether_enable_legacy_wifi_p2p_dedicated_ip is true. |
| --> |
| <integer translatable="false" name="config_p2p_leases_subnet_prefix_length">0</integer> |
| |
| <!-- Dhcp range (min, max) to use for tethering purposes --> |
| <string-array translatable="false" name="config_tether_dhcp_range"> |
| </string-array> |
| |
| <!-- Used to config periodic polls tether offload stats from tethering offload HAL to make the |
| data warnings work. 5000(ms) by default. If the device doesn't want to poll tether |
| offload stats, this should be -1. Note that this setting could be override by |
| runtime resource overlays. |
| --> |
| <integer translatable="false" name="config_tether_offload_poll_interval">5000</integer> |
| |
| <!-- Array of ConnectivityManager.TYPE_{BLUETOOTH, ETHERNET, MOBILE, MOBILE_DUN, MOBILE_HIPRI, |
| WIFI} values allowable for tethering. |
| |
| Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or |
| [1,7,0] for TYPE_WIFI, TYPE_BLUETOOTH, and TYPE_MOBILE. |
| |
| This list is also modified by code within the framework, including: |
| |
| - TYPE_ETHERNET (9) is prepended to this list, and |
| |
| - the return value of TelephonyManager.isTetheringApnRequired() |
| determines how the array is further modified: |
| |
| * TRUE (DUN REQUIRED). |
| TYPE_MOBILE is removed (if present). |
| TYPE_MOBILE_HIPRI is removed (if present). |
| TYPE_MOBILE_DUN is appended (if not already present). |
| |
| * FALSE (DUN NOT REQUIRED). |
| TYPE_MOBILE_DUN is removed (if present). |
| If both of TYPE_MOBILE{,_HIPRI} are not present: |
| TYPE_MOBILE is appended. |
| TYPE_MOBILE_HIPRI is appended. |
| |
| For other changes applied to this list, now and in the future, see |
| com.android.networkstack.tethering.TetheringConfiguration. |
| |
| Note also: the order of this is important. The first upstream type |
| for which a satisfying network exists is used. |
| --> |
| <integer-array translatable="false" name="config_tether_upstream_types"> |
| </integer-array> |
| |
| <!-- When true, the tethering upstream network follows the current default |
| Internet network (except when the current default network is mobile, |
| in which case a DUN network will be used if required). |
| |
| When true, overrides the config_tether_upstream_types setting above. |
| --> |
| <bool translatable="false" name="config_tether_upstream_automatic">true</bool> |
| |
| |
| <!-- If the mobile hotspot feature requires provisioning, a package name and class name |
| can be provided to launch a supported application that provisions the devices. |
| EntitlementManager will send an intent to Settings with the specified package name and |
| class name in extras to launch provision app. |
| TODO: note what extras here. |
| |
| See EntitlementManager#runUiTetherProvisioning and |
| packages/apps/Settings/src/com/android/settings/network/TetherProvisioningActivity.java |
| for more details. |
| |
| For ui-less/periodic recheck support see config_mobile_hotspot_provision_app_no_ui |
| --> |
| <!-- The first element is the package name and the second element is the class name |
| of the provisioning app --> |
| <string-array translatable="false" name="config_mobile_hotspot_provision_app"> |
| <!-- |
| <item>com.example.provisioning</item> |
| <item>com.example.provisioning.Activity</item> |
| --> |
| </string-array> |
| |
| <!-- If the mobile hotspot feature requires provisioning, an action can be provided |
| that will be broadcast in non-ui cases for checking the provisioning status. |
| EntitlementManager will pass the specified name to Settings and Settings would |
| launch provisioning app by sending an intent with the package name. |
| |
| A second broadcast, action defined by config_mobile_hotspot_provision_response, |
| will be sent back to notify if provisioning succeeded or not. The response will |
| match that of the activity in config_mobile_hotspot_provision_app, but instead |
| contained within the int extra "EntitlementResult". |
| TODO: provide the system api for "EntitlementResult" extra and note it here. |
| |
| See EntitlementManager#runSilentTetherProvisioning and |
| packages/apps/Settings/src/com/android/settings/wifi/tether/TetherService.java for more |
| details. |
| --> |
| <string translatable="false" name="config_mobile_hotspot_provision_app_no_ui"></string> |
| |
| <!-- Sent in response to a provisioning check. The caller must hold the |
| permission android.permission.TETHER_PRIVILEGED for Settings to |
| receive this response. |
| |
| See config_mobile_hotspot_provision_response |
| --> |
| <string translatable="false" name="config_mobile_hotspot_provision_response"></string> |
| |
| <!-- Number of hours between each background provisioning call --> |
| <integer translatable="false" name="config_mobile_hotspot_provision_check_period">24</integer> |
| |
| <!-- ComponentName of the service used to run no ui tether provisioning. --> |
| <string translatable="false" name="config_wifi_tether_enable">com.android.settings/.wifi.tether.TetherService</string> |
| |
| <!-- No upstream notification is shown when there is a downstream but no upstream that is able |
| to do the tethering. --> |
| <!-- Delay(millisecond) to show no upstream notification after there's no Backhaul. Set delay to |
| "-1" for disable this feature. --> |
| <integer name="delay_to_show_no_upstream_after_no_backhaul">-1</integer> |
| |
| <!-- Cellular roaming notification is shown when upstream is cellular network and in roaming |
| state. --> |
| <!-- Config for showing upstream roaming notification. --> |
| <bool name="config_upstream_roaming_notification">false</bool> |
| |
| <!-- Which USB function should be enabled when TETHERING_USB is requested. 0: RNDIS, 1: NCM. |
| --> |
| <integer translatable="false" name="config_tether_usb_functions">0</integer> |
| </resources> |