Fix lock contention in Attention
Call checkAttention() sits in the critical path inside the PowerManager. To avoid the lock contention, don't call into the PackageManager. Specifically, checking the configuration with the PackageManager is redundant since it's already done by SystemServer - it won't start the AttentionManagerService if it's not configured. Bug: 169427927 Test: manually Change-Id: I46ca7a6ce01d2229521f1fe12a80440024465c67
This commit is contained in:
@@ -172,7 +172,7 @@ public class AttentionManagerService extends SystemService {
|
||||
*/
|
||||
@VisibleForTesting
|
||||
protected boolean isAttentionServiceSupported() {
|
||||
return isServiceEnabled() && isServiceConfigured(mContext);
|
||||
return isServiceEnabled();
|
||||
}
|
||||
|
||||
private boolean isServiceEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user