markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 2 | <!-- Copyright (C) 2020 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 16 | <resources> |
| 17 | <!-- |
| 18 | OEMs that wish to change the below settings must do so via a runtime resource overlay package |
| 19 | and *NOT* by changing this file. This file is part of the tethering mainline module. |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 20 | TODO: define two resources for each config item: a default_* resource and a config_* resource, |
| 21 | config_* is empty by default but may be overridden by RROs. |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 22 | --> |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 23 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| 24 | USB interfaces. If the device doesn't want to support tethering over USB this should |
| 25 | be empty. An example would be "usb.*" --> |
| 26 | <string-array translatable="false" name="config_tether_usb_regexs"> |
| 27 | <item>"usb\\d"</item> |
| 28 | <item>"rndis\\d"</item> |
| 29 | </string-array> |
| 30 | |
| 31 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
Milim Lee | 45a971b | 2019-10-17 05:02:33 +0900 | [diff] [blame] | 32 | NCM interfaces. If the device doesn't want to support tethering over NCM this should |
| 33 | be empty. --> |
| 34 | <string-array translatable="false" name="config_tether_ncm_regexs"> |
| 35 | </string-array> |
| 36 | |
| 37 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 38 | Wifi interfaces. If the device doesn't want to support tethering over Wifi this |
| 39 | should be empty. An example would be "softap.*" --> |
| 40 | <string-array translatable="false" name="config_tether_wifi_regexs"> |
| 41 | <item>"wlan\\d"</item> |
| 42 | <item>"softap\\d"</item> |
lesl | 6a953ef | 2021-01-08 15:36:47 +0800 | [diff] [blame] | 43 | <item>"ap_br_wlan\\d"</item> |
| 44 | <item>"ap_br_softap\\d"</item> |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 45 | </string-array> |
| 46 | |
| 47 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
Dedy Lansky | 6896f61 | 2019-11-21 00:36:14 +0200 | [diff] [blame] | 48 | WiGig interfaces. If the device doesn't want to support tethering over WiGig this |
| 49 | should be empty. An example would be "wigig\\d" --> |
| 50 | <string-array translatable="false" name="config_tether_wigig_regexs"> |
| 51 | <item>"wigig\\d"</item> |
| 52 | </string-array> |
| 53 | |
| 54 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 55 | Wifi P2P interfaces. If the device doesn't want to support tethering over Wifi P2p this |
markchien | 1a4b235 | 2020-01-15 14:25:32 +0800 | [diff] [blame] | 56 | should be empty. An example would be "p2p-p2p\\d-.*" --> |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 57 | <string-array translatable="false" name="config_tether_wifi_p2p_regexs"> |
markchien | 1a4b235 | 2020-01-15 14:25:32 +0800 | [diff] [blame] | 58 | <item>"p2p-p2p\\d-.*"</item> |
Jimmy Chen | d2ab0ee | 2020-02-04 14:25:42 +0800 | [diff] [blame] | 59 | <item>"p2p\\d"</item> |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 60 | </string-array> |
| 61 | |
| 62 | <!-- List of regexpressions describing the interface (if any) that represent tetherable |
| 63 | bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this |
| 64 | should be empty. --> |
| 65 | <string-array translatable="false" name="config_tether_bluetooth_regexs"> |
| 66 | <item>"bt-pan"</item> |
| 67 | </string-array> |
| 68 | |
Hungming Chen | 8bf2e7e | 2020-04-02 18:47:19 +0800 | [diff] [blame] | 69 | <!-- Use the BPF offload for tethering when the kernel has support. True by default. |
| 70 | If the device doesn't want to support tether BPF offload, this should be false. |
Hungming Chen | 5bc3af9 | 2020-05-12 19:15:24 +0800 | [diff] [blame] | 71 | Note that this setting could be overridden by device config. |
Hungming Chen | 8bf2e7e | 2020-04-02 18:47:19 +0800 | [diff] [blame] | 72 | --> |
| 73 | <bool translatable="false" name="config_tether_enable_bpf_offload">true</bool> |
| 74 | |
markchien | 9a0b95d | 2020-01-13 16:09:42 +0800 | [diff] [blame] | 75 | <!-- Use the old dnsmasq DHCP server for tethering instead of the framework implementation. --> |
| 76 | <bool translatable="false" name="config_tether_enable_legacy_dhcp_server">false</bool> |
| 77 | |
markchien | eb8fec2 | 2020-08-03 12:01:59 +0800 | [diff] [blame] | 78 | <!-- Use legacy wifi p2p dedicated address instead of randomize address. --> |
| 79 | <bool translatable="false" name="config_tether_enable_legacy_wifi_p2p_dedicated_ip">false</bool> |
| 80 | |
markchien | fb65dfe | 2022-02-25 23:14:58 +0800 | [diff] [blame] | 81 | <!-- Use lease subnet prefix length to reserve the range outside of subnet prefix length. |
| 82 | This configuration only valid if its value larger than dhcp server address prefix length |
| 83 | and config_tether_enable_legacy_wifi_p2p_dedicated_ip is true. |
| 84 | --> |
| 85 | <integer translatable="false" name="config_p2p_leases_subnet_prefix_length">0</integer> |
| 86 | |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 87 | <!-- Dhcp range (min, max) to use for tethering purposes --> |
| 88 | <string-array translatable="false" name="config_tether_dhcp_range"> |
| 89 | </string-array> |
| 90 | |
junyulai | 9606a22 | 2020-04-30 15:21:55 +0800 | [diff] [blame] | 91 | <!-- Used to config periodic polls tether offload stats from tethering offload HAL to make the |
| 92 | data warnings work. 5000(ms) by default. If the device doesn't want to poll tether |
| 93 | offload stats, this should be -1. Note that this setting could be override by |
| 94 | runtime resource overlays. |
| 95 | --> |
| 96 | <integer translatable="false" name="config_tether_offload_poll_interval">5000</integer> |
| 97 | |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 98 | <!-- Array of ConnectivityManager.TYPE_{BLUETOOTH, ETHERNET, MOBILE, MOBILE_DUN, MOBILE_HIPRI, |
| 99 | WIFI} values allowable for tethering. |
| 100 | |
| 101 | Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or |
| 102 | [1,7,0] for TYPE_WIFI, TYPE_BLUETOOTH, and TYPE_MOBILE. |
| 103 | |
| 104 | This list is also modified by code within the framework, including: |
| 105 | |
| 106 | - TYPE_ETHERNET (9) is prepended to this list, and |
| 107 | |
| 108 | - the return value of TelephonyManager.isTetheringApnRequired() |
| 109 | determines how the array is further modified: |
| 110 | |
| 111 | * TRUE (DUN REQUIRED). |
| 112 | TYPE_MOBILE is removed (if present). |
| 113 | TYPE_MOBILE_HIPRI is removed (if present). |
| 114 | TYPE_MOBILE_DUN is appended (if not already present). |
| 115 | |
| 116 | * FALSE (DUN NOT REQUIRED). |
| 117 | TYPE_MOBILE_DUN is removed (if present). |
| 118 | If both of TYPE_MOBILE{,_HIPRI} are not present: |
| 119 | TYPE_MOBILE is appended. |
| 120 | TYPE_MOBILE_HIPRI is appended. |
| 121 | |
| 122 | For other changes applied to this list, now and in the future, see |
markchien | d995566 | 2020-04-12 21:41:29 +0800 | [diff] [blame] | 123 | com.android.networkstack.tethering.TetheringConfiguration. |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 124 | |
| 125 | Note also: the order of this is important. The first upstream type |
| 126 | for which a satisfying network exists is used. |
| 127 | --> |
| 128 | <integer-array translatable="false" name="config_tether_upstream_types"> |
| 129 | </integer-array> |
| 130 | |
| 131 | <!-- When true, the tethering upstream network follows the current default |
| 132 | Internet network (except when the current default network is mobile, |
| 133 | in which case a DUN network will be used if required). |
| 134 | |
| 135 | When true, overrides the config_tether_upstream_types setting above. |
| 136 | --> |
| 137 | <bool translatable="false" name="config_tether_upstream_automatic">true</bool> |
| 138 | |
| 139 | |
| 140 | <!-- If the mobile hotspot feature requires provisioning, a package name and class name |
| 141 | can be provided to launch a supported application that provisions the devices. |
markchien | 873c64a | 2020-01-14 12:46:53 +0800 | [diff] [blame] | 142 | EntitlementManager will send an intent to Settings with the specified package name and |
markchien | 6fbbdff | 2020-01-12 17:13:58 +0800 | [diff] [blame] | 143 | class name in extras to launch provision app. |
| 144 | TODO: note what extras here. |
| 145 | |
| 146 | See EntitlementManager#runUiTetherProvisioning and |
| 147 | packages/apps/Settings/src/com/android/settings/network/TetherProvisioningActivity.java |
| 148 | for more details. |
| 149 | |
| 150 | For ui-less/periodic recheck support see config_mobile_hotspot_provision_app_no_ui |
| 151 | --> |
| 152 | <!-- The first element is the package name and the second element is the class name |
| 153 | of the provisioning app --> |
| 154 | <string-array translatable="false" name="config_mobile_hotspot_provision_app"> |
| 155 | <!-- |
| 156 | <item>com.example.provisioning</item> |
| 157 | <item>com.example.provisioning.Activity</item> |
| 158 | --> |
| 159 | </string-array> |
| 160 | |
| 161 | <!-- If the mobile hotspot feature requires provisioning, an action can be provided |
| 162 | that will be broadcast in non-ui cases for checking the provisioning status. |
| 163 | EntitlementManager will pass the specified name to Settings and Settings would |
| 164 | launch provisioning app by sending an intent with the package name. |
| 165 | |
| 166 | A second broadcast, action defined by config_mobile_hotspot_provision_response, |
| 167 | will be sent back to notify if provisioning succeeded or not. The response will |
| 168 | match that of the activity in config_mobile_hotspot_provision_app, but instead |
| 169 | contained within the int extra "EntitlementResult". |
| 170 | TODO: provide the system api for "EntitlementResult" extra and note it here. |
| 171 | |
| 172 | See EntitlementManager#runSilentTetherProvisioning and |
| 173 | packages/apps/Settings/src/com/android/settings/wifi/tether/TetherService.java for more |
| 174 | details. |
| 175 | --> |
| 176 | <string translatable="false" name="config_mobile_hotspot_provision_app_no_ui"></string> |
| 177 | |
| 178 | <!-- Sent in response to a provisioning check. The caller must hold the |
| 179 | permission android.permission.TETHER_PRIVILEGED for Settings to |
| 180 | receive this response. |
| 181 | |
| 182 | See config_mobile_hotspot_provision_response |
| 183 | --> |
| 184 | <string translatable="false" name="config_mobile_hotspot_provision_response"></string> |
| 185 | |
| 186 | <!-- Number of hours between each background provisioning call --> |
| 187 | <integer translatable="false" name="config_mobile_hotspot_provision_check_period">24</integer> |
| 188 | |
| 189 | <!-- ComponentName of the service used to run no ui tether provisioning. --> |
| 190 | <string translatable="false" name="config_wifi_tether_enable">com.android.settings/.wifi.tether.TetherService</string> |
paulhu | 08294f9 | 2020-01-16 19:35:46 +0800 | [diff] [blame] | 191 | |
paulhu | 648fc2c | 2020-03-24 21:09:51 +0800 | [diff] [blame] | 192 | <!-- No upstream notification is shown when there is a downstream but no upstream that is able |
| 193 | to do the tethering. --> |
| 194 | <!-- Delay(millisecond) to show no upstream notification after there's no Backhaul. Set delay to |
| 195 | "-1" for disable this feature. --> |
| 196 | <integer name="delay_to_show_no_upstream_after_no_backhaul">-1</integer> |
paulhu | 1f66261 | 2020-03-26 15:29:53 +0800 | [diff] [blame] | 197 | |
| 198 | <!-- Cellular roaming notification is shown when upstream is cellular network and in roaming |
| 199 | state. --> |
| 200 | <!-- Config for showing upstream roaming notification. --> |
| 201 | <bool name="config_upstream_roaming_notification">false</bool> |
markchien | cab01b7 | 2021-06-01 22:25:24 +0800 | [diff] [blame] | 202 | |
| 203 | <!-- Which USB function should be enabled when TETHERING_USB is requested. 0: RNDIS, 1: NCM. |
| 204 | --> |
| 205 | <integer translatable="false" name="config_tether_usb_functions">0</integer> |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 206 | </resources> |