raven: include factory/shipping UDFPS based on target

This CL transitions the regular build to the AIDL fingerprint HAL, while
keeping the factory build on HIDL.

AuthService reports "Registering HIDL ID: 0 Modality: 2 Strength: 15"
only for the factory build.

Bug: 188193467
Test: build raven-userdebug
Test: build factory_raven-userdebug
Test: adb logcat | grep AuthService
Change-Id: I3d02e560e5e624aa85f1c3d14d52d7bb5070ee4d
diff --git a/device-raven.mk b/device-raven.mk
index 1c93601..5ed16a8 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -26,10 +26,18 @@
 DEVICE_PACKAGE_OVERLAYS += device/google/raviole/raven/overlay
 
 include device/google/gs101/device-shipping-common.mk
-include device/google/gs101/fingerprint/udfps.mk
+include device/google/gs101/fingerprint/udfps_common.mk
+
+ifeq ($(filter factory_raven, $(TARGET_PRODUCT)),)
+include device/google/gs101/fingerprint/udfps_shipping.mk
+else
+include device/google/gs101/fingerprint/udfps_factory.mk
+endif
+
 ifeq ($(filter factory_raven, $(TARGET_PRODUCT)),)
 include device/google/gs101/uwb/uwb.mk
 endif
+
 include device/google/raviole/audio/raven/audio-tables.mk
 include hardware/google/pixel/vibrator/cs40l25/device.mk
 
diff --git a/factory_raven.mk b/factory_raven.mk
index e070ef3..48226c4 100644
--- a/factory_raven.mk
+++ b/factory_raven.mk
@@ -24,12 +24,11 @@
 PRODUCT_BRAND := Android
 PRODUCT_MANUFACTURER := Google
 
+DEVICE_PACKAGE_OVERLAYS += device/google/raviole/factory_raven/overlay
+
 # default BDADDR for EVB only
 PRODUCT_PROPERTY_OVERRIDES += \
 	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
 
-# Fingerprint
-include device/google/gs101/fingerprint/udfps_factory.mk
-
 # Factory binaries of camera
 PRODUCT_PACKAGES += fatp_gn1_hat_tool fatp_imx586_hat_tool
diff --git a/factory_raven/overlay/frameworks/base/core/res/res/values/config.xml b/factory_raven/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..b88e0ff
--- /dev/null
+++ b/factory_raven/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
+     when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
+     where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
+     and Strength as defined in Authenticators.java -->
+    <string-array name="config_biometric_sensors" translatable="false" >
+        <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
+    </string-array>
+
+    <!-- The properties of a UDFPS sensor in pixels -->
+    <integer-array name="config_udfps_sensor_props">
+      <item>720</item>  <!-- sensorLocationX -->
+      <item>2364</item> <!-- sensorLocationY -->
+      <item>142</item>  <!-- sensorRadius -->
+    </integer-array>
+
+</resources>
diff --git a/raven/overlay/frameworks/base/core/res/res/values/config.xml b/raven/overlay/frameworks/base/core/res/res/values/config.xml
index 836fb1c..8325bdb 100644
--- a/raven/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/raven/overlay/frameworks/base/core/res/res/values/config.xml
@@ -18,14 +18,6 @@
 -->
 
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
-     when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
-     where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
-     and Strength as defined in Authenticators.java -->
-    <string-array name="config_biometric_sensors" translatable="false" >
-        <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
-    </string-array>
-
     <!-- Whether the display cutout region of the main built-in display should be forced to
         black in software (to avoid aliasing or emulate a cutout that is not physically existent).
     -->
@@ -56,13 +48,6 @@
     <!-- Adjustment for software rounded corners since corners aren't perfectly round. -->
     <dimen name="rounded_corner_radius_adjustment">5px</dimen>
 
-    <!-- The properties of a UDFPS sensor in pixels -->
-    <integer-array name="config_udfps_sensor_props">
-      <item>720</item>  <!-- sensorLocationX -->
-      <item>2364</item> <!-- sensorLocationY -->
-      <item>142</item>  <!-- sensorRadius -->
-    </integer-array>
-
     <!-- Type of the udfps long press sensor. Empty if long press is not supported. -->
     <string name="config_dozeUdfpsLongPressSensorType" translatable="false">com.google.sensor.long_press</string>