Gate & metrics log WakeReason for face auth run

Include the PowerManager#WakeReason in the
metrics log for FaceAuth being triggered by
the device waking up.

Add config that only allows some wakeups to
trigger face auth. For example. we don't need
to start running face authentication when
the device wakes-up when the user starts charging
their device.

Also, update KeyguardUpdateMonitor face auth
triggers to exclude dream stopping as a signal
to run face auth. Since Dozing and AoD are dreams,
this meant that any state changes that left the dream
would trigger face auth.

Test: atest KeyguardUpdateMonitorTest
Test: atest FaceWakeUpTriggersConfigTest
Test: check sysui logs
Bug: 232882273
Bug: 242628816
Change-Id: I3794b7eda7f5e4cf550d9e4a813a28e6c5322d68
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 9188ce0..93982cb 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -643,6 +643,18 @@
         <item>26</item> <!-- MOUTH_COVERING_DETECTED -->
     </integer-array>
 
+    <!-- Which device wake-ups will trigger face auth. These values correspond with
+         PowerManager#WakeReason. -->
+    <integer-array name="config_face_auth_wake_up_triggers">
+        <item>1</item> <!-- WAKE_REASON_POWER_BUTTON -->
+        <item>4</item> <!-- WAKE_REASON_GESTURE -->
+        <item>6</item> <!-- WAKE_REASON_WAKE_KEY -->
+        <item>7</item> <!-- WAKE_REASON_WAKE_MOTION -->
+        <item>9</item> <!-- WAKE_REASON_LID -->
+        <item>10</item> <!-- WAKE_REASON_DISPLAY_GROUP_ADDED -->
+        <item>12</item> <!-- WAKE_REASON_UNFOLD_DEVICE -->
+    </integer-array>
+
     <!-- Whether the communal service should be enabled -->
     <bool name="config_communalServiceEnabled">false</bool>