diff --git a/buildstubs-t/Android.bp b/buildstubs-t/Android.bp index 385abc6791..9ca3fd27c7 100644 --- a/buildstubs-t/Android.bp +++ b/buildstubs-t/Android.bp @@ -37,6 +37,11 @@ filegroup { srcs: [], } +filegroup { + name: "ethernet-service-updatable-sources", + srcs: [], +} + filegroup { name: "services.connectivity-netstats-jni-sources", srcs: [ 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 0000000000..4a06e1ef61 --- /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 0000000000..eb3bfa06b5 --- /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"); + } +} +