marlin: switch to using fingerprint HIDL interface

Test: enroll, unlock, navigation. Boot with no errors related to fingerprint

Bug: 33199080
Change-Id: I901bd83d172151ca82d5acab69370571adba8464
diff --git a/device-common.mk b/device-common.mk
index 03ce295..6f4df4c 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -326,10 +326,10 @@
     persist.camera.eis.enable=1 \
     persist.camera.is_type=4
 
-# Fingerprint
+# Fingerprint HIDL implementation
 PRODUCT_PACKAGES += \
-    fingerprintd \
-    android.hardware.biometrics.fingerprint@2.1-impl
+    fingerprint.fpc \
+    android.hardware.biometrics.fingerprint@2.1-service
 
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml
diff --git a/init.common.rc b/init.common.rc
index 25f9434..8a4208a 100755
--- a/init.common.rc
+++ b/init.common.rc
@@ -424,11 +424,6 @@
     group bluetooth diag system
     disabled
 
-service fingerprintd /system/bin/fingerprintd
-    class late_start
-    user system
-    group system
-
 service per_mgr /system/bin/pm-service
     class core
     user system
diff --git a/sepolicy/hal_fingerprint.te b/sepolicy/hal_fingerprint.te
new file mode 100644
index 0000000..6994917
--- /dev/null
+++ b/sepolicy/hal_fingerprint.te
@@ -0,0 +1,7 @@
+allow hal_fingerprint sysfs_fingerprint:dir r_dir_perms;
+allow hal_fingerprint sysfs_fingerprint:file rw_file_perms;
+allow hal_fingerprint tee_device:chr_file rw_file_perms;
+allow hal_fingerprint uhid_device:chr_file rw_file_perms;
+allow hal_fingerprint sysfs:dir { open read };
+
+