From 7ae91b41a64416a0370676b6cc6ce9a25a82f82b Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Thu, 8 Apr 2021 10:10:35 -0400 Subject: [PATCH] DejankUtils fix for wrong thread init If the very first call to DejankUtils happens to be on a binder thread, DejankUtils will fail to initialize b/c it needs a main thread looper to be available. Fixes: 184642387 Test: SystemAppCheck Change-Id: Ie8ed7cf3610902bbb41cf9640d506a404722c75b --- .../com/android/keyguard/KeyguardUpdateMonitor.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 2219cf4274983..bfe6477b712de 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -359,10 +359,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override public void onChanged(BiometricSourceType type, boolean enabled, int userId) throws RemoteException { - if (type == BiometricSourceType.FACE) { - mFaceSettingEnabledForUser.put(userId, enabled); - updateFaceListeningState(); - } + mHandler.post(() -> { + if (type == BiometricSourceType.FACE) { + mFaceSettingEnabledForUser.put(userId, enabled); + updateFaceListeningState(); + } + }); } };