a71-common: Add WifiOverlay

Bug: 148617260
Test: Device boots up and connects to wifi networks.
Change-Id: Id8440726f9a523a2afbb796cced8e2bd2876d230
This commit is contained in:
Roshan Pius
2024-06-15 12:12:48 +02:00
committed by Haky86
parent 96e02821d9
commit b2ed1eb52a
7 changed files with 255 additions and 0 deletions

View File

@@ -335,6 +335,10 @@ PRODUCT_SOONG_NAMESPACES += \
$(COMMON_PATH) \
# WiFi
PRODUCT_PACKAGES += \
TetheringConfigOverlay \
WifiOverlay \
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/wifi/icm.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/icm.conf \
$(COMMON_PATH)/rootdir/vendor/etc/wifi/indoorchannel.info:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/indoorchannel.info \

View File

@@ -0,0 +1,12 @@
//
// Copyright (C) 2024 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "TetheringConfigOverlay",
resource_dirs: ["res"],
product_specific: true,
sdk_version: "current",
}

View File

@@ -0,0 +1,18 @@
<!--
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.networkstack.tethering.samsung_sm7150"
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

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- 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>softap0</item>
<item>wlan0</item>
<item>wigig0</item>
</string-array>
<!-- This setting is deprecated, please use
com.android.networkstack.tethering.R.array.config_tether_bluetooth_regexs instead. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>bnep\\d</item>
<item>bt-pan</item>
</string-array>
<!-- 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">
<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 setting is deprecated, please use
com.android.networkstack.tethering.R.array.config_tether_upstream_types. -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>5</item>
<item>7</item>
</integer-array>
<!-- This setting is deprecated, please use
com.android.networkstack.tethering.R.array.config_tether_usb_regexs instead. -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>usb\\d</item>
<item>rndis\\d</item>
</string-array>
</resources>

View File

@@ -0,0 +1,13 @@
//
// Copyright (C) 2024 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "WifiOverlay",
theme: "WifiOverlay",
certificate: "platform",
sdk_version: "current",
product_specific: true
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
-->
<!-- Pixel specific wifi overlays -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifi.resources.samsung_sm7150"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.wifi.resources"
android:targetName="WifiCustomization"
android:isStatic="true"
android:priority="0"/>
</manifest>

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. Do not translate.
NOTE: The naming convention is "config_camelCaseValue". Some legacy
entries do not follow the convention, but all new entries should. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Set to true if the wifi display supports compositing content stored
in gralloc protected buffers. For this to be true, there must exist
a protected hardware path for surface flinger to composite and send
protected buffers to the wifi display video encoder.
If this flag is false, we advise applications not to use protected
buffers (if possible) when presenting content to a wifi display because
the content may be blanked.
This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS}
flag is set for wifi displays.
-->
<bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool>
<!-- boolean indicating whether the WiFi chipset has 5GHz band support.
Note: This config is replacing the config_wifi_dual_band_support
since more bands may now be supported (such as 6GHz), the naming dual_band
is no longer indicative, and a separate config now exists for each band -->
<bool translatable="false" name="config_wifi5ghzSupport">true</bool>
<!-- Boolean indicating whether the wifi chipset supports background scanning mechanism.
This mechanism allows the host to remain in suspend state and the dongle to actively
scan and wake the host when a configured SSID is detected by the dongle. This chipset
capability can provide power savings when wifi needs to be always kept on. -->
<bool translatable="false" name="config_wifi_background_scan_support">true</bool>
<!-- Wifi driver supports batched scan -->
<bool name="config_wifi_batched_scan_supported">true</bool>
<!-- Boolean indicating whether or not wifi should turn off when emergency call is made -->
<bool translatable="false" name="config_wifi_turn_off_during_emergency_call">true</bool>
<!-- Configure wifi tcp buffersizes in the form:
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
<string name="config_wifi_tcp_buffers">524288,1048576,4194304,524288,1048576,4194304</string>
<!-- Wifi driver supports IEEE80211AC for softap -->
<bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
<!-- Indicates that connected MAC randomization is supported on this device -->
<bool name="config_wifi_connected_mac_randomization_supported">true</bool>
<!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform -->
<bool name="config_wifi_fast_bss_transition_enabled">true</bool>
<!-- Boolean indicating associated network selection is allowed -->
<bool translatable="false" name="config_wifi_framework_enable_associated_network_selection">false</bool>
<!-- Indicates that p2p MAC randomization is supported on this device -->
<bool name="config_wifi_p2p_mac_randomization_supported">false</bool>
<!--
Controls the mapping between RSSI and RSSI levels.
RSSI RSSI Level
(-infinity, thresholds[0]) 0
[threshold[0], threshold[1]) 1
[threshold[1], threshold[2]) 2
... ...
[threshold[len-2], threshold[len-1]) len-1
[threshold[len-1], +infinity) len
where:
[a, b) is the range of integers `n` such that a <= n < b
`threshold[i]` represents the i'th element of the config_wifiRssiLevelThresholds array
and `len` is the length of the config_wifiRssiLevelThresholds array.
-->
<integer-array name="config_wifiRssiLevelThresholds">
<item>-88</item>
<item>-82</item>
<item>-74</item>
<item>-63</item>
</integer-array>
<!-- List of constants that indicate the number of consecutive failures per type needed to block a BSSID.
A blocked BSSID will not be considered in network selection and firmware roaming.-->
<integer name="config_wifiBssidBlocklistMonitorDhcpFailureThreshold">2</integer>
<!-- Integer specifying the percent bonus for current network. The percent is applied to
the sum of rssi base score and throughput score-->
<integer name="config_wifiFrameworkSecureNetworkBonus">540</integer>
<!-- Initial PNO scan interval, in milliseconds, when the device is moving (i.e.
WifiManager.DEVICE_MOBILITY_STATE_UNKNOWN, WifiManager.DEVICE_MOBILITY_STATE_HIGH_MVMT, or
WifiManager.DEVICE_MOBILITY_STATE_LOW_MVMT).
The scan interval backs off from this initial interval on subsequent scans.
This scan is performed when screen is off and disconnected. -->
<integer name="config_wifiMovingPnoScanIntervalMillis">160000</integer>
<!-- Initial PNO scan interval, in milliseconds, when the device is stationary (i.e.
WifiManager.DEVICE_MOBILITY_STATE_STATIONARY).
The scan interval backs off from this initial interval on subsequent scans.
This scan is performed when screen is off and disconnected. -->
<integer name="config_wifiStationaryPnoScanIntervalMillis">160000</integer>
<!-- Integer thresholds, do not connect to APs with RSSI lower than these values -->
<integer name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-78</integer>
<integer name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-75</integer>
<!-- Indicates that a full bugreport should be triggered when wifi diagnostics detects an error on non-user (i.e debug) builds -->
<bool translatable="false" name="config_wifi_diagnostics_bugreport_enabled">true</bool>
<!-- Boolean indicating whether framework needs to set the tx power limit for meeting SAR requirements -->
<bool translatable="false" name="config_wifi_framework_enable_sar_tx_power_limit">true</bool>
</resources>