fix runtime issues
diff --git a/app/src/main/Android.bp b/app/src/main/Android.bp
index 1010db2..8c40d57 100644
--- a/app/src/main/Android.bp
+++ b/app/src/main/Android.bp
@@ -16,6 +16,10 @@
"LMOFaceClient",
"android.hardware.biometrics.face-V1.0-java",
],
- required: ["LMOFaceUnlockSettingsOverlay"],
+ required: [
+ "LMOFaceUnlockSettingsOverlay",
+ // These shouldn't be here, but soong doesn't care about "required" of static? libraries
+ "detect-class1.tflite", "mobile_face_net.tflite",
+ ],
jni_libs: ["libtensorflowlite_jni"],
}
diff --git a/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java b/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java
index 9a1ac02..c5ab95e 100644
--- a/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java
+++ b/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java
@@ -22,7 +22,9 @@
import android.hardware.biometrics.face.V1_0.OptionalUint64;
import android.hardware.biometrics.face.V1_0.Status;
import android.hidl.base.V1_0.DebugInfo;
+import android.os.HwParcel;
import android.os.IHwBinder;
+import android.os.IHwInterface;
import android.os.NativeHandle;
import android.os.RemoteException;
import android.util.Log;
@@ -40,15 +42,26 @@
@Override
public IHwBinder asBinder() {
- // Stub
- Log.e(TAG, "unsupported call to asBinder()");
- return null;
+ return new IHwBinder() {
+ public void transact(
+ int code, HwParcel request, HwParcel reply, int flags)
+ throws RemoteException {}
+ public IHwInterface queryLocalInterface(String descriptor) {
+ return null;
+ }
+ public boolean linkToDeath(DeathRecipient recipient, long cookie) {
+ return false;
+ }
+ public boolean unlinkToDeath(DeathRecipient recipient) {
+ return false;
+ }
+ };
}
@Override
public OptionalUint64 setCallback(IBiometricsFaceClientCallback iBiometricsFaceClientCallback) throws RemoteException {
mFaceHalService.setCallback(new FaceCallbackAdapter(iBiometricsFaceClientCallback));
- return makeOkUint(0);
+ return makeOkUint(mFaceHalService.getDeviceId());
}
@Override