Merge "Implement meta interface for the biometric HAL" into sc-dev

This commit is contained in:
Jiyong Park
2021-05-25 22:43:57 +00:00
committed by Android (Google) Code Review
4 changed files with 108 additions and 0 deletions

View File

@@ -147,6 +147,16 @@ public class Sensor {
mCallback = callback; mCallback = callback;
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public void onChallengeGenerated(long challenge) { public void onChallengeGenerated(long challenge) {
mHandler.post(() -> { mHandler.post(() -> {

View File

@@ -34,6 +34,16 @@ import android.util.Slog;
public class TestHal extends IFace.Stub { public class TestHal extends IFace.Stub {
private static final String TAG = "face.aidl.TestHal"; private static final String TAG = "face.aidl.TestHal";
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public SensorProps[] getSensorProps() { public SensorProps[] getSensorProps() {
Slog.w(TAG, "getSensorProps"); Slog.w(TAG, "getSensorProps");
@@ -45,6 +55,16 @@ public class TestHal extends IFace.Stub {
Slog.w(TAG, "createSession, sensorId: " + sensorId + " userId: " + userId); Slog.w(TAG, "createSession, sensorId: " + sensorId + " userId: " + userId);
return new ISession.Stub() { return new ISession.Stub() {
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public void generateChallenge() throws RemoteException { public void generateChallenge() throws RemoteException {
Slog.w(TAG, "generateChallenge"); Slog.w(TAG, "generateChallenge");
@@ -71,6 +91,14 @@ public class TestHal extends IFace.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }
@@ -82,6 +110,14 @@ public class TestHal extends IFace.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }
@@ -93,6 +129,14 @@ public class TestHal extends IFace.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }

View File

@@ -150,6 +150,16 @@ class Sensor {
mCallback = callback; mCallback = callback;
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public void onChallengeGenerated(long challenge) { public void onChallengeGenerated(long challenge) {
mHandler.post(() -> { mHandler.post(() -> {

View File

@@ -32,6 +32,16 @@ import android.util.Slog;
public class TestHal extends IFingerprint.Stub { public class TestHal extends IFingerprint.Stub {
private static final String TAG = "fingerprint.aidl.TestHal"; private static final String TAG = "fingerprint.aidl.TestHal";
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public SensorProps[] getSensorProps() { public SensorProps[] getSensorProps() {
Slog.w(TAG, "getSensorProps"); Slog.w(TAG, "getSensorProps");
@@ -43,6 +53,16 @@ public class TestHal extends IFingerprint.Stub {
Slog.w(TAG, "createSession, sensorId: " + sensorId + " userId: " + userId); Slog.w(TAG, "createSession, sensorId: " + sensorId + " userId: " + userId);
return new ISession.Stub() { return new ISession.Stub() {
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
@Override @Override
public void generateChallenge() throws RemoteException { public void generateChallenge() throws RemoteException {
Slog.w(TAG, "generateChallenge"); Slog.w(TAG, "generateChallenge");
@@ -63,6 +83,14 @@ public class TestHal extends IFingerprint.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }
@@ -74,6 +102,14 @@ public class TestHal extends IFingerprint.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }
@@ -85,6 +121,14 @@ public class TestHal extends IFingerprint.Stub {
public void cancel() throws RemoteException { public void cancel() throws RemoteException {
cb.onError(Error.CANCELED, 0 /* vendorCode */); cb.onError(Error.CANCELED, 0 /* vendorCode */);
} }
@Override
public int getInterfaceVersion() {
return this.VERSION;
}
@Override
public String getInterfaceHash() {
return this.HASH;
}
}; };
} }