diff --git a/common.mk b/common.mk index 414e172..573ca71 100644 --- a/common.mk +++ b/common.mk @@ -188,6 +188,9 @@ PRODUCT_PACKAGES += \ fastbootd # Fingerprint +PRODUCT_PACKAGES += \ + android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350 + PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml diff --git a/fingerprint/Android.bp b/fingerprint/Android.bp index ec4838b..3cb39f1 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_sm8350", 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_sm8350.rc"], + vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350.xml"], vendor: true, relative_install_path: "hw", srcs: [ diff --git a/fingerprint/BiometricsFingerprint.cpp b/fingerprint/BiometricsFingerprint.cpp index f687959..1f85eae 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_sm8350" +#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350" #include diff --git a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350.rc similarity index 89% rename from fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc rename to fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350.rc index 1667677..8130d6b 100644 --- a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.rc +++ b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm8350.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_sm8350 # "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_sm8350.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_sm8350.xml diff --git a/fingerprint/service.cpp b/fingerprint/service.cpp index edfaac4..77d1d87 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_sm8350" #include #include diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 3e2875f..5f1c11c 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -38,6 +38,7 @@ /data/vendor/fpc(/.*)? u:object_r:vendor_fingerprint_data_file:s0 /data/vendor/fpdump(/.*)? u:object_r:vendor_fingerprint_data_file:s0 /data/vendor/goodix(/.*)? u:object_r:vendor_fingerprint_data_file:s0 +/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sm8350 u:object_r:hal_fingerprint_default_exec:s0 # FOD /vendor/bin/hw/vendor\.lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.xiaomi_sm8350 u:object_r:hal_lineage_fod_default_exec:s0