DO NOT MERGE: Add a stub class for IpSecService.
This is similar to the existing NsdService stub, and it is
required to ensure ConnectivityServiceInitializer builds in
sc-mainline-prod when IpSecService moves to the module.
Also, simplify the existing stub by doing "extends Binder"
instead of "implements IBinder" and adding empty methods that
implement the IBinder interface.
Test: m service-connectivity
Test: cherry-pick aosp/1961307 and m com.android.tethering
Ignore-AOSP-First: needed in sc-mainline-prod only
Change-Id: I151155d4d70dd0c2190aa40c32c97b8c1b8cd691
diff --git a/buildstubs-t/stubs-src/com/android/server/IpSecService.java b/buildstubs-t/stubs-src/com/android/server/IpSecService.java
new file mode 100644
index 0000000..bb48c14
--- /dev/null
+++ b/buildstubs-t/stubs-src/com/android/server/IpSecService.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;
+
+import android.content.Context;
+import android.os.Binder;
+
+/**
+ * Fake IpSecManager class for sc-mainline-prod,
+ * to allow building the T service-connectivity before sources
+ * are moved to the branch
+ */
+public final class IpSecService extends Binder {
+ public IpSecService(Context ctx) {
+ throw new RuntimeException("This is a stub class");
+ }
+}
diff --git a/buildstubs-t/stubs-src/com/android/server/NsdService.java b/buildstubs-t/stubs-src/com/android/server/NsdService.java
index 8e32ffd..4a3ba90 100644
--- a/buildstubs-t/stubs-src/com/android/server/NsdService.java
+++ b/buildstubs-t/stubs-src/com/android/server/NsdService.java
@@ -17,60 +17,16 @@
package com.android.server;
import android.content.Context;
-import android.os.IBinder;
-import android.os.IInterface;
-import android.os.Parcel;
-import android.os.RemoteException;
-
-import java.io.FileDescriptor;
+import android.os.Binder;
/**
* Fake NsdService class for sc-mainline-prod,
* to allow building the T service-connectivity before sources
* are moved to the branch
*/
-public final class NsdService implements IBinder {
+public final class NsdService extends Binder {
/** Create instance */
public static NsdService create(Context ctx) throws InterruptedException {
throw new RuntimeException("This is a stub class");
}
-
- @Override
- public String getInterfaceDescriptor() throws RemoteException {
- return null;
- }
-
- @Override
- public boolean pingBinder() {
- return false;
- }
-
- @Override
- public boolean isBinderAlive() {
- return false;
- }
-
- @Override
- public IInterface queryLocalInterface(String descriptor) {
- return null;
- }
-
- @Override
- public void dump(FileDescriptor fd, String[] args) throws RemoteException {}
-
- @Override
- public void dumpAsync(FileDescriptor fd, String[] args) throws RemoteException {}
-
- @Override
- public boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
- return false;
- }
-
- @Override
- public void linkToDeath(DeathRecipient recipient, int flags) throws RemoteException {}
-
- @Override
- public boolean unlinkToDeath(DeathRecipient recipient, int flags) {
- return false;
- }
}