diff --git a/fingerprint/Android.bp b/fingerprint/Android.bp index ec4838b..3147da0 100644 --- a/fingerprint/Android.bp +++ b/fingerprint/Android.bp @@ -1,8 +1,8 @@ cc_binary { - name: "android.hardware.biometrics.fingerprint@2.1-service", + name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150", defaults: ["hidl_defaults"], - init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.rc"], - vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xml"], + init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc"], + vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.xml"], vendor: true, relative_install_path: "hw", srcs: [ diff --git a/fingerprint/BiometricsFingerprint.cpp b/fingerprint/BiometricsFingerprint.cpp index f687959..947a2d4 100644 --- a/fingerprint/BiometricsFingerprint.cpp +++ b/fingerprint/BiometricsFingerprint.cpp @@ -13,8 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service" -#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service" +#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150" +#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150" #include diff --git a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc similarity index 88% rename from fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc rename to fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc index fb76fe4..c1a3c6e 100644 --- a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc +++ b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc @@ -1,4 +1,4 @@ -service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service +service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150 # "class hal" causes a race condition on some devices due to files created # in /data. As a workaround, postpone startup until later in boot once # /data is mounted. diff --git a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xml b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.xml similarity index 100% rename from fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xml rename to fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.xml diff --git a/fingerprint/service.cpp b/fingerprint/service.cpp index edfaac4..4e4fd65 100644 --- a/fingerprint/service.cpp +++ b/fingerprint/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service" +#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150" #include #include diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index cae6f46..6ddff69 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -10,6 +10,7 @@ /data/vendor/goodix(/.*)? u:object_r:fingerprint_data_file:s0 # HALs +/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sm6150 u:object_r:hal_fingerprint_default_exec:s0 /vendor/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sm6150 u:object_r:hal_light_default_exec:s0 /vendor/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0 diff --git a/sm6150.mk b/sm6150.mk index 3985f33..ec472aa 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -138,6 +138,9 @@ PRODUCT_PACKAGES += \ android.hardware.drm@1.3-service.clearkey # Fingerprint +PRODUCT_PACKAGES += \ + android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150 + PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml