Sync up to v202

This commit is contained in:
Andy CrossGate Yan
2019-11-02 01:02:42 +00:00
parent 017c525e4f
commit c621f4bcdc
2 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From 1573fc903e5c874b7a4fa78284801aa67a9f1ff7 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 27 Oct 2019 16:27:55 +0100
Subject: [PATCH 40/40] Fix crash on some devices by checking for null client
Some device get the following system_server crash:
*** FATAL EXCEPTION IN SYSTEM PROCESS: main
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.android.server.biometrics.ClientMonitor.onEnumerationResult(android.hardware.biometrics.BiometricAuthenticator$Identifier, int)' on a null object reference
at com.android.server.biometrics.BiometricServiceBase.handleEnumerate(BiometricServiceBase.java:777)
at com.android.server.biometrics.fingerprint.FingerprintService.access$6901(FingerprintService.java:93)
at com.android.server.biometrics.fingerprint.FingerprintService$1.lambda$onEnumerate$5$FingerprintService$1(FingerprintService.java:686)
at com.android.server.biometrics.fingerprint.-$$Lambda$FingerprintService$1$3I9ge5BoesXZUovbayCOCR754fc.run(Unknown Source:10)
Fix it by checking for `null` client before acting on it
Change-Id: If39d8c1b26c8c0a44b3d9292b646cb71ff258a95
---
.../java/com/android/server/biometrics/BiometricServiceBase.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
index d3c62bed7b5..b6710992a6e 100644
--- a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
+++ b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
@@ -774,6 +774,7 @@ public abstract class BiometricServiceBase extends SystemService
protected void handleEnumerate(BiometricAuthenticator.Identifier identifier, int remaining) {
ClientMonitor client = getCurrentClient();
+ if(client == null) return;
client.onEnumerationResult(identifier, remaining);
// All templates in the HAL for this user were enumerated
--
2.17.1