summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Chyn <kchyn@google.com> 2020-06-26 15:26:49 -0700
committer Kevin Chyn <kchyn@google.com> 2020-06-26 15:26:49 -0700
commitee88f23c613bd22e06f958d3ec864ab33ea962aa (patch)
tree04deaa481c42971013b6be56717cb418498b3f20
parent5731877f1e5d488eaeda1684c7a80e6999099b8b (diff)
[DO NOT MERGE] Move AuthSession usage to after null check
The system already schedules anything that reads/modifies/writes AuthSession on the handler, so there shouldn't be any race condition that can cause this. Simply move the session reading to after the null check. Fixes: 159897806 Test: Builds Change-Id: Ia4c3ce32e9af3e8b73c02f5eab969f7314afc4c8
-rw-r--r--services/core/java/com/android/server/biometrics/BiometricService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/biometrics/BiometricService.java b/services/core/java/com/android/server/biometrics/BiometricService.java
index 540c6ff09c9d..1217a507a8dc 100644
--- a/services/core/java/com/android/server/biometrics/BiometricService.java
+++ b/services/core/java/com/android/server/biometrics/BiometricService.java
@@ -1630,15 +1630,15 @@ public class BiometricService extends SystemService {
}
private void handleOnSystemEvent(int event) {
- final boolean shouldReceive = mCurrentAuthSession.mBundle
- .getBoolean(BiometricPrompt.KEY_RECEIVE_SYSTEM_EVENTS, false);
- Slog.d(TAG, "onSystemEvent: " + event + ", shouldReceive: " + shouldReceive);
-
if (mCurrentAuthSession == null) {
Slog.e(TAG, "Auth session null");
return;
}
+ final boolean shouldReceive = mCurrentAuthSession.mBundle
+ .getBoolean(BiometricPrompt.KEY_RECEIVE_SYSTEM_EVENTS, false);
+ Slog.d(TAG, "onSystemEvent: " + event + ", shouldReceive: " + shouldReceive);
+
if (!shouldReceive) {
return;
}