Close the session if Fingerprint servers die
by registering the death notification of the associated binder.
Bug: 273807765
Test: adb shell stop;adb shell start
Change-Id: Ifc60e68fdbf986a355f828a7fc11f2aecee4cbea
diff --git a/biometrics/fingerprint/aidl/default/Android.bp b/biometrics/fingerprint/aidl/default/Android.bp
index fe224c9..16302eb 100644
--- a/biometrics/fingerprint/aidl/default/Android.bp
+++ b/biometrics/fingerprint/aidl/default/Android.bp
@@ -110,6 +110,32 @@
require_root: true,
}
+cc_test {
+ name: "android.hardware.biometrics.fingerprint.SessionTest",
+ local_include_dirs: ["include"],
+ srcs: [
+ "tests/SessionTest.cpp",
+ "Session.cpp",
+ "FakeFingerprintEngine.cpp",
+ "FakeLockoutTracker.cpp",
+ ],
+ shared_libs: [
+ "libbase",
+ "libbinder_ndk",
+ "android.hardware.biometrics.common.thread",
+ ],
+ static_libs: [
+ "libandroid.hardware.biometrics.fingerprint.VirtualProps",
+ "android.hardware.biometrics.fingerprint-V3-ndk",
+ "android.hardware.biometrics.common-V3-ndk",
+ "android.hardware.keymaster-V4-ndk",
+ "android.hardware.biometrics.common.util",
+ ],
+ vendor: true,
+ test_suites: ["general-tests"],
+ require_root: true,
+}
+
sysprop_library {
name: "android.hardware.biometrics.fingerprint.VirtualProps",
srcs: ["fingerprint.sysprop"],