Merge "Surface IBiometricsFace#userActivity to FaceManager"
diff --git a/core/java/android/hardware/face/FaceManager.java b/core/java/android/hardware/face/FaceManager.java
index 536c4a5..322863a 100644
--- a/core/java/android/hardware/face/FaceManager.java
+++ b/core/java/android/hardware/face/FaceManager.java
@@ -311,6 +311,21 @@
     }
 
     /**
+     * Pokes the the driver to have it start looking for faces again.
+     * @hide
+     */
+    @RequiresPermission(MANAGE_BIOMETRIC)
+    public void userActivity() {
+        if (mService != null) {
+            try {
+                mService.userActivity();
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+    }
+
+    /**
      * Sets the active user. This is meant to be used to select the current profile for enrollment
      * to allow separate enrolled faces for a work profile
      *
diff --git a/core/java/android/hardware/face/IFaceService.aidl b/core/java/android/hardware/face/IFaceService.aidl
index 6681bd7..47df8e8 100644
--- a/core/java/android/hardware/face/IFaceService.aidl
+++ b/core/java/android/hardware/face/IFaceService.aidl
@@ -98,4 +98,6 @@
     int setRequireAttention(boolean requireAttention, in byte [] token);
 
     boolean getRequireAttention(in byte [] token);
+
+    void userActivity();
 }
diff --git a/services/core/java/com/android/server/biometrics/face/FaceService.java b/services/core/java/com/android/server/biometrics/face/FaceService.java
index f6af52a..5d4263b 100644
--- a/services/core/java/com/android/server/biometrics/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/face/FaceService.java
@@ -362,7 +362,7 @@
                 result = mDaemon != null ? mDaemon.setRequireAttention(requireAttention, byteToken)
                         : Status.INTERNAL_ERROR;
             } catch (RemoteException e) {
-                Slog.e(getTag(), "Unable to setRequireAttention to " + requireAttention);
+                Slog.e(getTag(), "Unable to setRequireAttention to " + requireAttention, e);
                 result = Status.INTERNAL_ERROR;
             }
 
@@ -382,10 +382,23 @@
             try {
                 result = mDaemon != null ? mDaemon.getRequireAttention(byteToken).value : true;
             } catch (RemoteException e) {
-                Slog.e(getTag(), "Unable to getRequireAttention");
+                Slog.e(getTag(), "Unable to getRequireAttention", e);
             }
             return result;
         }
+
+        @Override
+        public void userActivity() {
+            checkPermission(MANAGE_BIOMETRIC);
+
+            if (mDaemon != null) {
+                try {
+                    mDaemon.userActivity();
+                } catch (RemoteException e) {
+                    Slog.e(getTag(), "Unable to send userActivity", e);
+                }
+            }
+        }
     }
 
     /**