From e76fb5010d886d840113e8cf8414b5af28481f50 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 25 Jan 2021 12:42:07 +0100 Subject: [PATCH] sm6150-common: Rename fingerprint service Change-Id: I09992ec66ba4b65bb60a23faa74929d385f199fa --- fingerprint/Android.bp | 6 +++--- fingerprint/BiometricsFingerprint.cpp | 4 ++-- ...are.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc} | 2 +- ...re.biometrics.fingerprint@2.1-service.xiaomi_sm6150.xml} | 0 fingerprint/service.cpp | 2 +- sepolicy/vendor/file_contexts | 1 + sm6150.mk | 3 +++ 7 files changed, 11 insertions(+), 7 deletions(-) rename fingerprint/{android.hardware.biometrics.fingerprint@2.1-service.rc => android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc} (88%) rename fingerprint/{android.hardware.biometrics.fingerprint@2.1-service.xml => android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.xml} (100%) 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