From 54ea922d1a8663c82e342a8351b7293420c44dc2 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Mon, 13 Aug 2018 10:59:30 -0700 Subject: Simplify IWeaver mocking code. Implementations of HIDL interfaces are intended to extend from the Stub class, not the core interface class. Test: m FrameworksServicesTests Test: frameworks/base/services/tests/runtests.py -e package "com.android.server.locksettings" OK (454 tests) Bug: 112334405 Change-Id: Ib060560fd74f0092544096210f52e1f7fcba6c06 --- .../server/locksettings/MockWeaverService.java | 52 +--------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java index 34831cd53dbe..7fb127831090 100644 --- a/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java +++ b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java @@ -15,7 +15,7 @@ import android.util.Log; import java.util.ArrayList; import java.util.Arrays; -public class MockWeaverService implements IWeaver { +public class MockWeaverService extends IWeaver.Stub { private static final int MAX_SLOTS = 8; private static final int KEY_LENGTH = 256 / 8; @@ -55,54 +55,4 @@ public class MockWeaverService implements IWeaver { cb.onValues(WeaverStatus.FAILED, response); } } - - @Override - public IHwBinder asBinder() { - throw new UnsupportedOperationException(); - } - - @Override - public ArrayList interfaceChain() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public String interfaceDescriptor() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public void setHALInstrumentation() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean linkToDeath(DeathRecipient recipient, long cookie) throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public void ping() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public DebugInfo getDebugInfo() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public void notifySyspropsChanged() throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean unlinkToDeath(DeathRecipient recipient) throws RemoteException { - throw new UnsupportedOperationException(); - } - - @Override - public ArrayList getHashChain() throws RemoteException { - throw new UnsupportedOperationException(); - } } -- cgit v1.2.3-59-g8ed1b