diff options
author | Weilun Du <wdu@google.com> | 2020-08-21 14:45:14 -0700 |
---|---|---|
committer | Calvin Huang <calhuang@google.com> | 2020-09-23 23:03:48 +0000 |
commit | 4ee9b03f3c435bad95dd3500e1b4e8ac6169a60d (patch) | |
tree | 69998f0f4e3eaf4b4503536d8d176b6dc963f02a | |
parent | d28f4ee9d59e8a1327fbec41e61c81206c3b6229 (diff) | |
download | device_generic_goldfish-4ee9b03f3c435bad95dd3500e1b4e8ac6169a60d.tar.gz device_generic_goldfish-4ee9b03f3c435bad95dd3500e1b4e8ac6169a60d.tar.bz2 device_generic_goldfish-4ee9b03f3c435bad95dd3500e1b4e8ac6169a60d.zip |
[VirtioWifi] Add p2p-wlan\d-.* Pattern in Tethering Config
Emulator Wi-Fi driver only supports wlan0 interface which operates in
both sta and p2p mode. Becausse default config_tether_wifi_p2p_regexs
doesn't include the p2p-wlan\d-.* pattern, tethering would not work on
Emulator under this rule.
Also, Tethering package is APEX and we need to create a RRO to overwrite
the values for config_tether_wifi_regexs and config_tether_wifi_p2p_regexs.
BUG: 158503396
Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: Ia0834f5215ff8c3b13effa591bd2f84d93419a06
(cherry picked from commit 4cd971a725e9aed3962e592652ea96bb033c7070)
-rw-r--r-- | rro_overlays/TetheringOverlay/Android.bp | 22 | ||||
-rw-r--r-- | rro_overlays/TetheringOverlay/AndroidManifest.xml | 11 | ||||
-rw-r--r-- | rro_overlays/TetheringOverlay/res/values/config.xml | 28 | ||||
-rw-r--r-- | vendor.mk | 1 |
4 files changed, 62 insertions, 0 deletions
diff --git a/rro_overlays/TetheringOverlay/Android.bp b/rro_overlays/TetheringOverlay/Android.bp new file mode 100644 index 00000000..31b0c570 --- /dev/null +++ b/rro_overlays/TetheringOverlay/Android.bp @@ -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: "EmulatorTetheringConfigOverlay", + resource_dirs: ["res"], + product_specific: true, + sdk_version: "current", +} diff --git a/rro_overlays/TetheringOverlay/AndroidManifest.xml b/rro_overlays/TetheringOverlay/AndroidManifest.xml new file mode 100644 index 00000000..fc8c8bd0 --- /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.emulator" + 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 00000000..8cb8b405 --- /dev/null +++ b/rro_overlays/TetheringOverlay/res/values/config.xml @@ -0,0 +1,28 @@ +<?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"> + <!-- Allow testing SoftAP using the simulated interfaces on the emulator. --> + <string-array name="config_tether_wifi_regexs"> + <item>"wlan\\d"</item> + </string-array> + <string-array name="config_tether_wifi_p2p_regexs"> + <item>"p2p-wlan\\d-.*"</item> + </string-array> +</resources> @@ -59,6 +59,7 @@ PRODUCT_PACKAGES += \ local_time.default \ SdkSetup \ EmulatorRadioConfig \ + EmulatorTetheringConfigOverlay \ libstagefrighthw \ libstagefright_goldfish_vpxdec \ libstagefright_goldfish_avcdec \ |