Migrate config_ethernet_interfaces overlay in goldfish.

config_ethernet_interfaces resource has been moved to p/m/Connectivity
module from frameworks/base, migrate its overlay to
EmulatorConnectivityOverlay rro instead of the framework resources.

Bug: 214348333
Test: m -j
Change-Id: Ie4fc1a63430d96aca6a1eab0511e9872b91ab2f9
diff --git a/64bitonly/product/vendor.mk b/64bitonly/product/vendor.mk
index 8b27fd1..ba2074f 100644
--- a/64bitonly/product/vendor.mk
+++ b/64bitonly/product/vendor.mk
@@ -66,6 +66,7 @@
     local_time.default \
     SdkSetup \
     EmulatorRadioConfig \
+    EmulatorConnectivityOverlay \
     EmulatorTetheringConfigOverlay \
     MultiDisplayProvider \
     libGoldfishProfiler
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 39c3c7a..3c3059c 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -63,10 +63,6 @@
     <!-- This device is able to support the microphone and camera global toggles. -->
     <bool name="config_supportsMicToggle">true</bool>
     <bool name="config_supportsCamToggle">true</bool>
-    <!-- Restricting eth0 -->
-    <string-array translatable="false" name="config_ethernet_interfaces">
-        <item>eth0;11,12,14;;</item>
-    </string-array>
     <!-- Specifies priority of automatic time sources. Suggestions from higher entries in the list
          take precedence over lower ones.
          See com.android.server.timedetector.TimeDetectorStrategy for available sources. -->
diff --git a/rro_overlays/ConnectivityOverlay/Android.bp b/rro_overlays/ConnectivityOverlay/Android.bp
new file mode 100644
index 0000000..72f12e6
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2022 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.
+//
+
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "device_generic_goldfish_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    //   SPDX-license-identifier-BSD
+    default_applicable_licenses: ["device_generic_goldfish_license"],
+}
+
+runtime_resource_overlay {
+    name: "EmulatorConnectivityOverlay",
+    resource_dirs: ["res"],
+    product_specific: true,
+    sdk_version: "current",
+}
diff --git a/rro_overlays/ConnectivityOverlay/AndroidManifest.xml b/rro_overlays/ConnectivityOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..504ba04
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.connectivity.resources.emulator.overlay"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.connectivity.resources"
+      android:targetName="ServiceConnectivityResourcesConfig"
+      android:isStatic="true"
+      android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/ConnectivityOverlay/res/values/config.xml b/rro_overlays/ConnectivityOverlay/res/values/config.xml
new file mode 100644
index 0000000..8127071
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2022, 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">
+    <!-- Restricting eth0 -->
+    <string-array translatable="false" name="config_ethernet_interfaces">
+        <item>eth0;11,12,14;;</item>
+    </string-array>
+</resources>
diff --git a/vendor.mk b/vendor.mk
index bc29713..1392d10 100644
--- a/vendor.mk
+++ b/vendor.mk
@@ -61,6 +61,7 @@
     local_time.default \
     SdkSetup \
     EmulatorRadioConfig \
+    EmulatorConnectivityOverlay \
     EmulatorTetheringConfigOverlay \
     libstagefrighthw \
     libstagefright_goldfish_vpxdec \