DO NOT MERGE: Add stub class and filegroup for Ethernet service.
Add stub classes EthernetService, EthernetServiceImpl and build stubs
for ethernet service updatable resource, which are required to ensure
ConnectivityServiceInitializer can build in the sc-mainline-prod.
Test: m service-connectivity
Test: cherry-pick the CL on p/m/Connectivity of ethernet-mainline topic
and m com.android.tethering
Ignore-AOSP-First: needed in sc-mainline-prod only
Change-Id: I8a9e82250df61f1d47a3e7f5b3609cf459aeffb3
diff --git a/buildstubs-t/Android.bp b/buildstubs-t/Android.bp
index 385abc6..9ca3fd2 100644
--- a/buildstubs-t/Android.bp
+++ b/buildstubs-t/Android.bp
@@ -38,6 +38,11 @@
}
filegroup {
+ name: "ethernet-service-updatable-sources",
+ srcs: [],
+}
+
+filegroup {
name: "services.connectivity-netstats-jni-sources",
srcs: [
"stubs-src-jni/mock_com_android_server_net_NetworkStatsFactory.cpp",
diff --git a/buildstubs-t/stubs-src/com/android/server/EthernetService.java b/buildstubs-t/stubs-src/com/android/server/EthernetService.java
new file mode 100644
index 0000000..4a06e1e
--- /dev/null
+++ b/buildstubs-t/stubs-src/com/android/server/EthernetService.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.android.server.ethernet;
+
+import android.content.Context;
+
+/**
+ * Fake EthernetService class for branches that do not have the updatable EthernetService yet,
+ * to allow building the T service-connectivity before sources are moved to the branch.
+ */
+public final class EthernetService {
+ /** Create instance */
+ public static EthernetServiceImpl create(Context ctx) {
+ throw new RuntimeException("This is a stub class");
+ }
+}
+
diff --git a/buildstubs-t/stubs-src/com/android/server/EthernetServiceImpl.java b/buildstubs-t/stubs-src/com/android/server/EthernetServiceImpl.java
new file mode 100644
index 0000000..eb3bfa0
--- /dev/null
+++ b/buildstubs-t/stubs-src/com/android/server/EthernetServiceImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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 com.android.server.ethernet;
+
+import android.os.Binder;
+
+/** Stub class for EthernetServiceImpl */
+public class EthernetServiceImpl extends Binder {
+ /** Start service */
+ public void start() {
+ throw new RuntimeException("This is a stub class");
+ }
+}
+