From f54272515f2f7394d1f78558bc2193f238df1582 Mon Sep 17 00:00:00 2001 From: Nino Jagar Date: Wed, 16 Aug 2023 21:17:14 +0000 Subject: [PATCH] Fix init watchdog timeout due to a held lock Bug: 296285231 Test: Manual Change-Id: I38ddef4ce2bcf0a4b5c1534184e01cf914f5da2c --- .../server/contentcapture/ContentCaptureManagerService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java index 315972cde76b0..f59417046c85a 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java @@ -1225,15 +1225,13 @@ public class ContentCaptureManagerService extends public ContentCaptureOptions getOptions(@UserIdInt int userId, @NonNull String packageName) { boolean isContentCaptureReceiverEnabled; - boolean isContentProtectionReceiverEnabled; + boolean isContentProtectionReceiverEnabled = + isContentProtectionReceiverEnabled(userId, packageName); ArraySet whitelistedComponents = null; synchronized (mGlobalWhitelistStateLock) { isContentCaptureReceiverEnabled = isContentCaptureReceiverEnabled(userId, packageName); - isContentProtectionReceiverEnabled = - isContentProtectionReceiverEnabled(userId, packageName); - if (!isContentCaptureReceiverEnabled) { // Full package is not allowlisted: check individual components next whitelistedComponents = getWhitelistedComponents(userId, packageName);