Merge "Deprecated tethering framework resource" into rvc-dev am: 98e874e585
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11716094 Change-Id: Ib07f64ee34207cf94f34e414053b0a641b36ddc4
This commit is contained in:
@@ -403,33 +403,18 @@
|
|||||||
<!-- Allowed unprivileged keepalive slots per uid. -->
|
<!-- Allowed unprivileged keepalive slots per uid. -->
|
||||||
<integer translatable="false" name="config_allowedUnprivilegedKeepalivePerUid">2</integer>
|
<integer translatable="false" name="config_allowedUnprivilegedKeepalivePerUid">2</integer>
|
||||||
|
|
||||||
<!-- List of regexpressions describing the interface (if any) that represent tetherable
|
<!-- This setting is deprecated, please use
|
||||||
USB interfaces. If the device doesn't want to support tethering over USB this should
|
com.android.networkstack.tethering.R.array.config_tether_usb_regexs instead. -->
|
||||||
be empty. An example would be "usb.*" -->
|
|
||||||
<string-array translatable="false" name="config_tether_usb_regexs">
|
<string-array translatable="false" name="config_tether_usb_regexs">
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- List of regexpressions describing the interface (if any) that represent tetherable
|
<!-- This setting is deprecated, please use
|
||||||
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
|
com.android.networkstack.tethering.R.array.config_tether_wifi_regexs instead. -->
|
||||||
should be empty. An example would be "softap.*" -->
|
|
||||||
<string-array translatable="false" name="config_tether_wifi_regexs">
|
<string-array translatable="false" name="config_tether_wifi_regexs">
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- List of regexpressions describing the interface (if any) that represent tetherable
|
<!-- This setting is deprecated, please use
|
||||||
Wifi P2P interfaces. If the device doesn't want to support tethering over Wifi P2p this
|
com.android.networkstack.tethering.R.array.config_tether_bluetooth_regexs instead. -->
|
||||||
should be empty. An example would be "p2p-p2p.*" -->
|
|
||||||
<string-array translatable="false" name="config_tether_wifi_p2p_regexs">
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- List of regexpressions describing the interface (if any) that represent tetherable
|
|
||||||
WiMAX 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_wimax_regexs">
|
|
||||||
</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">
|
<string-array translatable="false" name="config_tether_bluetooth_regexs">
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
@@ -437,7 +422,8 @@
|
|||||||
updated config_tether_dhcp_range has to be updated appropriately. -->
|
updated config_tether_dhcp_range has to be updated appropriately. -->
|
||||||
<integer translatable="false" name="config_max_pan_devices">5</integer>
|
<integer translatable="false" name="config_max_pan_devices">5</integer>
|
||||||
|
|
||||||
<!-- Dhcp range (min, max) to use for tethering purposes -->
|
<!-- This setting is deprecated, please use
|
||||||
|
com.android.networkstack.tethering.R.array.config_dhcp_range instead. -->
|
||||||
<string-array translatable="false" name="config_tether_dhcp_range">
|
<string-array translatable="false" name="config_tether_dhcp_range">
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
@@ -477,31 +463,8 @@
|
|||||||
-->
|
-->
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- If the mobile hotspot feature requires provisioning, a package name and class name
|
<!-- This setting is deprecated, please use
|
||||||
can be provided to launch a supported application that provisions the devices.
|
com.android.networkstack.tethering.R.array.config_mobile_hotspot_provision_app instead. -->
|
||||||
|
|
||||||
Example Usage:
|
|
||||||
|
|
||||||
String[] appDetails = getStringArray(R.array.config_mobile_hotspot_provision_app);
|
|
||||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
|
||||||
intent.setClassName(appDetails[0], appDetails[1]);
|
|
||||||
startActivityForResult(intent, 0);
|
|
||||||
|
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
|
||||||
super.onActivityResult(requestCode, resultCode, intent);
|
|
||||||
if (requestCode == 0) {
|
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
|
||||||
//Mobile hotspot provisioning successful
|
|
||||||
} else {
|
|
||||||
//Mobile hotspot provisioning failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
See src/com/android/settings/TetherSettings.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">
|
<string-array translatable="false" name="config_mobile_hotspot_provision_app">
|
||||||
<!--
|
<!--
|
||||||
<item>com.example.provisioning</item>
|
<item>com.example.provisioning</item>
|
||||||
@@ -509,86 +472,33 @@
|
|||||||
-->
|
-->
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- If the mobile hotspot feature requires provisioning, an action can be provided
|
<!-- This setting is deprecated, please use
|
||||||
that will be broadcast in non-ui cases for checking the provisioning status.
|
com.android.networkstack.tethering.R.string.config_mobile_hotspot_provision_app_no_ui
|
||||||
|
instead. -->
|
||||||
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".
|
|
||||||
|
|
||||||
Example Usage:
|
|
||||||
String provisionAction = getString(R.string.config_mobile_hotspot_provision_check);
|
|
||||||
sendBroadcast(new Intent(provisionAction));
|
|
||||||
|
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
String provisionResponse =
|
|
||||||
getString(R.string.config_mobile_hotspot_provision_response);
|
|
||||||
if (provisionResponse.equals(intent.getAction())
|
|
||||||
&& intent.getIntExtra("EntitlementResult") == Activity.RESULT_OK) {
|
|
||||||
//Mobile hotspot provisioning successful
|
|
||||||
} else {
|
|
||||||
//Mobile hotspot provisioning failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
<string translatable="false" name="config_mobile_hotspot_provision_app_no_ui"></string>
|
<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
|
<!-- This setting is deprecated, please use
|
||||||
-->
|
com.android.networkstack.tethering.R.string.config_mobile_hotspot_provision_response
|
||||||
|
instead. -->
|
||||||
<string translatable="false" name="config_mobile_hotspot_provision_response"></string>
|
<string translatable="false" name="config_mobile_hotspot_provision_response"></string>
|
||||||
<!-- Number of hours between each background provisioning call -->
|
|
||||||
|
<!-- This setting is deprecated, please use
|
||||||
|
com.android.networkstack.tethering.R.integer.config_mobile_hotspot_provision_check_period
|
||||||
|
instead. -->
|
||||||
<integer translatable="false" name="config_mobile_hotspot_provision_check_period">24</integer>
|
<integer translatable="false" name="config_mobile_hotspot_provision_check_period">24</integer>
|
||||||
|
|
||||||
<!-- Activity name to enable wifi tethering after provisioning app succeeds -->
|
<!-- This setting is deprecated, please use
|
||||||
|
com.android.networkstack.tethering.R.string.config_wifi_tether_enable instead. -->
|
||||||
<string translatable="false" name="config_wifi_tether_enable">com.android.settings/.wifi.tether.TetherService</string>
|
<string translatable="false" name="config_wifi_tether_enable">com.android.settings/.wifi.tether.TetherService</string>
|
||||||
|
|
||||||
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering.
|
<!-- This setting is deprecated, please use
|
||||||
|
com.android.networkstack.tethering.R.array.config_tether_upstream_types. -->
|
||||||
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.server.connectivity.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 translatable="false" name="config_tether_upstream_types">
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
<item>7</item>
|
<item>7</item>
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
</integer-array>
|
</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 DUN connection for this CDMA device supports more than just DUN -->
|
<!-- If the DUN connection for this CDMA device supports more than just DUN -->
|
||||||
<!-- traffic you should list them here. -->
|
<!-- traffic you should list them here. -->
|
||||||
<!-- If this device is not CDMA this is ignored. If this list is empty on -->
|
<!-- If this device is not CDMA this is ignored. If this list is empty on -->
|
||||||
|
|||||||
@@ -1851,10 +1851,8 @@
|
|||||||
<java-symbol type="array" name="config_tether_bluetooth_regexs" />
|
<java-symbol type="array" name="config_tether_bluetooth_regexs" />
|
||||||
<java-symbol type="array" name="config_tether_dhcp_range" />
|
<java-symbol type="array" name="config_tether_dhcp_range" />
|
||||||
<java-symbol type="array" name="config_tether_upstream_types" />
|
<java-symbol type="array" name="config_tether_upstream_types" />
|
||||||
<java-symbol type="bool" name="config_tether_upstream_automatic" />
|
|
||||||
<java-symbol type="array" name="config_tether_usb_regexs" />
|
<java-symbol type="array" name="config_tether_usb_regexs" />
|
||||||
<java-symbol type="array" name="config_tether_wifi_regexs" />
|
<java-symbol type="array" name="config_tether_wifi_regexs" />
|
||||||
<java-symbol type="array" name="config_tether_wifi_p2p_regexs" />
|
|
||||||
<java-symbol type="array" name="config_usbHostBlacklist" />
|
<java-symbol type="array" name="config_usbHostBlacklist" />
|
||||||
<java-symbol type="array" name="config_serialPorts" />
|
<java-symbol type="array" name="config_serialPorts" />
|
||||||
<java-symbol type="array" name="radioAttributes" />
|
<java-symbol type="array" name="radioAttributes" />
|
||||||
|
|||||||
Reference in New Issue
Block a user