aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-02 15:05:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-02 15:05:46 +0000
commita2ead23312831b9d2317d1ee6d918d7a8c4426d9 (patch)
treec4460b1ab5cb7fb8d381cb0dd0dd6c2fc82e91de
parenteef39c9120de362f2fabb4fa6bd099a0719e2c30 (diff)
parentda55314a0a4c93aff5bd24964ef1aa3a823f9df8 (diff)
downloadqemu-snap-temp-L80000030003431364.tar.gz
Merge "Merge cherrypicks of ['android-review.googlesource.com/3022863'] into emu-34-release." into emu-34-releasesnap-temp-L80000030003431364snap-temp-L26200030003390308
-rw-r--r--android-qemu2-glue/main.cpp8
-rw-r--r--android/emu/cmdline/include/android/cmdline-options.h5
-rw-r--r--android/emu/cmdline/src/android/help.c6
3 files changed, 12 insertions, 7 deletions
diff --git a/android-qemu2-glue/main.cpp b/android-qemu2-glue/main.cpp
index e96647da2c..8e4d41485e 100644
--- a/android-qemu2-glue/main.cpp
+++ b/android-qemu2-glue/main.cpp
@@ -2739,9 +2739,11 @@ extern "C" int main(int argc, char** argv) {
}
// Network
-
- if (feature_is_enabled(kFeature_VirtioWifi) && opts->no_ethernet) {
- dinfo("Do not initialize netdev virtio-net because option no-ethernet is provided.");
+ bool isATV = avdInfo_getAvdFlavor(
+ getConsoleAgents()->settings->avdInfo()) == AVD_TV;
+ if (isATV && feature_is_enabled(kFeature_VirtioWifi) && opts->no_ethernet) {
+ dinfo("Do not initialize netdev virtio-net for Android TV virtual device"
+ " because option no-ethernet is provided.");
} else {
args.add("-netdev");
if (opts->net_tap) {
diff --git a/android/emu/cmdline/include/android/cmdline-options.h b/android/emu/cmdline/include/android/cmdline-options.h
index 10651c762a..74874b5217 100644
--- a/android/emu/cmdline/include/android/cmdline-options.h
+++ b/android/emu/cmdline/include/android/cmdline-options.h
@@ -354,7 +354,10 @@ OPT_PARAM(wifi_mac_address,
"only applies to situation where AVD is loaded from snapshot using "
"read-only mode. Example: -wifi-mac-address 00:11:22:33:44:55.")
-OPT_FLAG(no_ethernet, "Disable virtual Ethernet interface en0. This option is only effective when feature VirtioWifi is used.")
+OPT_FLAG(
+ no_ethernet,
+ "Disable virtual Ethernet interface en0. This option is only effective "
+ "for Android TV virtual device and when feature VirtioWifi is enabled.")
OPT_PARAM(android_serialno,
"<android serialno>",
diff --git a/android/emu/cmdline/src/android/help.c b/android/emu/cmdline/src/android/help.c
index 60db8f1da5..6f64c109a0 100644
--- a/android/emu/cmdline/src/android/help.c
+++ b/android/emu/cmdline/src/android/help.c
@@ -2274,9 +2274,9 @@ static void help_wifi_mac_address(stralloc_t* out) {
}
static void help_no_ethernet(stralloc_t* out) {
- PRINTF(" Disable the virtual Ethernet interface en0 in AVD. "
- " This option is only effective when feature VirtioWifi is "
- " used. Otherwise, this option is a no-op. \n\n");
+ PRINTF(" Disable the virtual Ethernet interface en0 in Android TV virtual "
+ " device. This option is only effective when feature VirtioWifi is "
+ " used for Android TV. Otherwise, this option is a no-op. \n\n");
}
static void help_android_serialno(stralloc_t* out) {