summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Bolinger <jbolinger@google.com> 2021-04-27 18:15:34 -0700
committer Joe Bolinger <jbolinger@google.com> 2021-04-27 18:15:34 -0700
commit7ca96381addaacdf3aab6607924a66d13461fa64 (patch)
treebc52d42a1346bae62b7abdb5232791356db697cb
parent2e7c07e699ca1d7e41f0fb4dc69e43fd4aa2184d (diff)
Fix oneway complaints for face auth.
Bug: 186047141 Test: adb logcat -s Binder:E -e "IFace.*getSensorProps" (is blank) Change-Id: I95006e0c2c0048bbaac2a114ab85ae4702a43662
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/FaceService.java2
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
index 94d47aa029a2..779558e8893e 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
@@ -632,7 +632,7 @@ public class FaceService extends SystemService {
for (String instance : instances) {
final String fqName = IFace.DESCRIPTOR + "/" + instance;
final IFace face = IFace.Stub.asInterface(
- ServiceManager.waitForDeclaredService(fqName));
+ Binder.allowBlocking(ServiceManager.waitForDeclaredService(fqName)));
if (face == null) {
Slog.e(TAG, "Unable to get declared service: " + fqName);
continue;
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
index 23be50e5925a..84d239ef2b50 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
@@ -33,6 +33,7 @@ import android.hardware.biometrics.face.SensorProps;
import android.hardware.face.Face;
import android.hardware.face.FaceSensorPropertiesInternal;
import android.hardware.face.IFaceServiceReceiver;
+import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -173,7 +174,9 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider {
Slog.d(getTag(), "Daemon was null, reconnecting");
mDaemon = IFace.Stub.asInterface(
- ServiceManager.waitForDeclaredService(IFace.DESCRIPTOR + "/" + mHalInstanceName));
+ Binder.allowBlocking(
+ ServiceManager.waitForDeclaredService(
+ IFace.DESCRIPTOR + "/" + mHalInstanceName)));
if (mDaemon == null) {
Slog.e(getTag(), "Unable to get daemon");
return null;