Split UDFPS makefiles into common, factory, and shipping

Bug: 188193467
Test: build factory_oriole-userdebug
Test: build factory_raven-userdebug
Test: build oriole-userdebug
Test: build raven-userdebug
Change-Id: Ia2b725214189ff123239dbafad3bcb567f11f47b
diff --git a/fingerprint/udfps.mk b/fingerprint/udfps_common.mk
similarity index 87%
rename from fingerprint/udfps.mk
rename to fingerprint/udfps_common.mk
index dbd827a..0eec7d2 100644
--- a/fingerprint/udfps.mk
+++ b/fingerprint/udfps_common.mk
@@ -24,7 +24,3 @@
 SOONG_CONFIG_NAMESPACES += fp_hal_feature
 SOONG_CONFIG_fp_hal_feature += biometric_suez_support
 SOONG_CONFIG_fp_hal_feature_biometric_suez_support := true
-
-PRODUCT_PACKAGES += \
-    android.hardware.biometrics.fingerprint@2.1-service.goodix \
-    android.hardware.biometrics.fingerprint-service.goodix
diff --git a/fingerprint/udfps_factory.mk b/fingerprint/udfps_factory.mk
index 41aebe0..40993fb 100644
--- a/fingerprint/udfps_factory.mk
+++ b/fingerprint/udfps_factory.mk
@@ -15,6 +15,7 @@
 #
 
 PRODUCT_PACKAGES += \
+    android.hardware.biometrics.fingerprint@2.1-service.goodix \
     GF_delmar_factory \
     udfps_test
 
diff --git a/fingerprint/udfps_shipping.mk b/fingerprint/udfps_shipping.mk
new file mode 100644
index 0000000..2b1e2ea
--- /dev/null
+++ b/fingerprint/udfps_shipping.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2021 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+PRODUCT_PACKAGES += \
+    android.hardware.biometrics.fingerprint-service.goodix
+
+# Necessary to ignore the HIDL HAL configured in config_biometric_sensors.
+# Otherwise system_server would hang trying to load the missing HIDL HAL.
+PRODUCT_PROPERTY_OVERRIDES += \
+	biometrics.fingerprint.hidl.disabled=true