summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMatt Pietal <mpietal@google.com>2021-10-01 11:03:16 -0400
committerMatt Pietal <mpietal@google.com>2022-03-10 15:15:13 +0000
commit256b5f08a89e441f7e01f87346945e9350fa7a3c (patch)
tree7bfa01ab348bce190479c556520a66e24e6f7638 /core
parent0716400df2dab6784f70c281e68dbe061f64a882 (diff)
Keyguard - Treat messsages to lock with priority
When switching users and attempting to lock the device, the sysui main thread becomes overwhelmed with events, creating a significant lag between the time a message is posted and processed on the main thread. This can be dangerous when these events are critical for security, such as calls coming from PhoneWindowManager#lockNow() that call KeyguardViewMediator#doKeyguardTimeout(). On older devices with slower CPUs and less memory, the delay in processing can be significant (15 - 30s). The result of not prioritizing these events leads to a window of time where a guest user can switch back to the owner, and gain access to the owner's homescreen without needing to unlock the device with the owner's credentials. As a mitigation, prioritize two events originating in two specific methods to make sure the device locks as soon as possible as well as have the system server preemptively update its local cache. Bug: 151095871 Test: Very manual race condition - follow steps listed in bug Change-Id: I7585a0a5eeb308e0e32a4f77f581556d883b5cda Merged-In: I7585a0a5eeb308e0e32a4f77f581556d883b5cda (cherry picked from commit 28c53ab8bca26af58b45625c1ebba8b9051c107d) (cherry picked from commit f8023c9829890ede1bdcbd04314d26c122b1f3f1)
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/policy/IKeyguardStateCallback.aidl2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl b/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
index 419b1f8feac7..d69a240b140b 100644
--- a/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
+++ b/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
@@ -16,7 +16,7 @@
package com.android.internal.policy;
interface IKeyguardStateCallback {
- void onShowingStateChanged(boolean showing);
+ void onShowingStateChanged(boolean showing, int userId);
void onSimSecureStateChanged(boolean simSecure);
void onInputRestrictedStateChanged(boolean inputRestricted);
void onTrustedChanged(boolean trusted);