summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml61
-rw-r--r--rro_overlays/TetheringOverlay/Android.bp7
-rw-r--r--rro_overlays/TetheringOverlay/AndroidManifest.xml11
-rw-r--r--rro_overlays/TetheringOverlay/res/values/config.xml46
-rw-r--r--sdm660.mk4
5 files changed, 68 insertions, 61 deletions
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 0acc747..6c69eee 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -21,46 +21,6 @@
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
<bool name="config_cellBroadcastAppLinks">true</bool>
- <!-- List of regexpressions describing the interface (if any) that represent tetherable
- USB interfaces. If the device doesn't want to support tething 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>
-
- <!-- Dhcp range (min, max) to use for tethering purposes -->
- <!-- USB is 192.168.42.1 and 255.255.255.0
- Wifi is 192.168.43.1 and 255.255.255.0
- BT is limited to max default of 5 connections. 192.168.44.1 to 192.168.48.1
- with 255.255.255.0
- P2P is 192.168.49.1 and 255.255.255.0
- Wigig is 192.168.50.1 and 255.255.255.0
- Wigig P2P is 192.168.51.1 and 255.255.255.0
- -->
- <string-array translatable="false" name="config_tether_dhcp_range">
- <item>192.168.42.2</item>
- <item>192.168.42.254</item>
- <item>192.168.43.2</item>
- <item>192.168.43.254</item>
- <item>192.168.44.2</item>
- <item>192.168.44.254</item>
- <item>192.168.45.2</item>
- <item>192.168.45.254</item>
- <item>192.168.46.2</item>
- <item>192.168.46.254</item>
- <item>192.168.47.2</item>
- <item>192.168.47.254</item>
- <item>192.168.48.2</item>
- <item>192.168.48.254</item>
- <item>192.168.49.2</item>
- <item>192.168.49.254</item>
- <item>192.168.50.2</item>
- <item>192.168.50.254</item>
- <item>192.168.51.2</item>
- <item>192.168.51.254</item>
- </string-array>
-
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
@@ -96,13 +56,6 @@
<item>"7,1"</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>
-
<!-- Boolean indicating if current platform supports BLE peripheral mode -->
<bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
@@ -339,20 +292,6 @@
<!-- Enable SMS authorization support -->
<bool name="config_sms_authorization_enabled">true</bool>
- <!-- 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>
- </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.*" -->
- <string-array translatable="false" name="config_tether_wifi_p2p_regexs">
- <item>"p2p\\d"</item>
- </string-array>
-
<!-- When true use the linux /dev/input/event subsystem to detect the switch changes
on the headphone/microphone jack. When false use the older uevent framework -->
<bool name="config_useDevInputEventForAudioJack">true</bool>
diff --git a/rro_overlays/TetheringOverlay/Android.bp b/rro_overlays/TetheringOverlay/Android.bp
new file mode 100644
index 0000000..feaaf46
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/Android.bp
@@ -0,0 +1,7 @@
+runtime_resource_overlay {
+ name: "TetheringConfigOverlay",
+ theme: "TetheringConfigOverlay",
+ certificate: "platform",
+ sdk_version: "current",
+ product_specific: true
+}
diff --git a/rro_overlays/TetheringOverlay/AndroidManifest.xml b/rro_overlays/TetheringOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..93d2f3f
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.networkstack.tethering.xiaomi_sdm660"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <application android:hasCode="false" />
+ <overlay
+ android:targetPackage="com.android.networkstack.tethering"
+ android:targetName="TetheringConfig"
+ android:isStatic="true"
+ android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/TetheringOverlay/res/values/config.xml b/rro_overlays/TetheringOverlay/res/values/config.xml
new file mode 100644
index 0000000..ff885c6
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/res/values/config.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Dhcp range (min, max) to use for tethering purposes -->
+ <string-array translatable="false" name="config_tether_dhcp_range">
+ <item>192.168.42.2</item>
+ <item>192.168.42.254</item>
+ <item>192.168.43.2</item>
+ <item>192.168.43.254</item>
+ <item>192.168.44.2</item>
+ <item>192.168.44.254</item>
+ <item>192.168.45.2</item>
+ <item>192.168.45.254</item>
+ <item>192.168.46.2</item>
+ <item>192.168.46.254</item>
+ <item>192.168.47.2</item>
+ <item>192.168.47.254</item>
+ <item>192.168.48.2</item>
+ <item>192.168.48.254</item>
+ <item>192.168.49.2</item>
+ <item>192.168.49.254</item>
+ <item>192.168.50.2</item>
+ <item>192.168.50.254</item>
+ <item>192.168.51.2</item>
+ <item>192.168.51.254</item>
+ </string-array>
+
+</resources>
diff --git a/sdm660.mk b/sdm660.mk
index e831f81..ef9fa02 100644
--- a/sdm660.mk
+++ b/sdm660.mk
@@ -438,6 +438,10 @@ PRODUCT_PACKAGES += \
android.hardware.sensors@1.0-impl \
android.hardware.sensors@1.0-service
+# Tethering
+PRODUCT_PACKAGES += \
+ TetheringConfigOverlay
+
# Tetheroffload
PRODUCT_PACKAGES += \
ipacm \