Add TetheringOverlay

BUG: 163800715
Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: Ia0834f5215ff8c3b13effa591bd2f84d93419a06
This commit is contained in:
Weilun Du 2021-07-10 20:35:33 +02:00 committed by Giammarco Senatore
parent b39d2c9bb4
commit 4ca2a59aae
No known key found for this signature in database
GPG key ID: 661348FC1E144F04
4 changed files with 60 additions and 32 deletions

View file

@ -331,7 +331,11 @@ PRODUCT_PACKAGES += \
qti-telephony-utils \ qti-telephony-utils \
qti_telephony_utils.xml qti_telephony_utils.xml
# Thermal # Tethering
PRODUCT_PACKAGES += \
TetheringConfigOverlay
# Thermal HAL
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.thermal@1.0-impl \ android.hardware.thermal@1.0-impl \
android.hardware.thermal@1.0-service android.hardware.thermal@1.0-service

View file

@ -0,0 +1,22 @@
//
// 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.
//
runtime_resource_overlay {
name: "TetheringConfigOverlay",
resource_dirs: ["res"],
sdk_version: "current",
proprietary: true
}

View file

@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.networkstack.tethering.oneplus_sdm845"
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>

View file

@ -1,21 +1,26 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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. ** Copyright 2020, The Android Open Source Project
You may obtain a copy of the License at **
http://www.apache.org/licenses/LICENSE-2.0 ** Licensed under the Apache License, Version 2.0 (the "License");
Unless required by applicable law or agreed to in writing, software ** you may not use this file except in compliance with the License.
distributed under the License is distributed on an "AS IS" BASIS, ** You may obtain a copy of the License at
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. **
See the License for the specific language governing permissions and ** http://www.apache.org/licenses/LICENSE-2.0
limitations under the License. **
** 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.
*/
--> -->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. Do not translate. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- List of regexpressions describing the interface (if any) that represent tetherable <!-- 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 USB interfaces. If the device doesn't want to support tethering over USB this should
be empty. An example would be "usb.*" --> 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">
<item>"usb\\d"</item> <item>"usb\\d"</item>
@ -25,7 +30,7 @@
<!-- List of regexpressions describing the interface (if any) that represent tetherable <!-- 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 Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" --> should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs"> <string-array name="config_tether_wifi_regexs">
<item>"wlan\\d"</item> <item>"wlan\\d"</item>
</string-array> </string-array>
@ -33,27 +38,12 @@
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. --> should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs"> <string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>"bnep\\d"</item> <item>"bnep\\d"</item>
<item>"bt-pan"</item> <item>"bt-pan"</item>
</string-array> </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-p2p\\d-.*"</item>
</string-array>
<!-- Dhcp range (min, max) to use for tethering purposes --> <!-- Dhcp range (min, max) to use for tethering purposes -->
<!-- USB is 192.168.42.1 and 255.255.255.0 <string-array translatable="false" name="config_tether_dhcp_range">
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 name="config_tether_dhcp_range">
<item>192.168.42.2</item> <item>192.168.42.2</item>
<item>192.168.42.254</item> <item>192.168.42.254</item>
<item>192.168.43.2</item> <item>192.168.43.2</item>
@ -75,4 +65,5 @@
<item>192.168.51.2</item> <item>192.168.51.2</item>
<item>192.168.51.254</item> <item>192.168.51.254</item>
</string-array> </string-array>
</resources> </resources>