Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5427251 authored by Nino Jagar's avatar Nino Jagar
Browse files

Fix init watchdog timeout due to a held lock

Bug: 296285231
Test: Manual
Change-Id: I38ddef4ce2bcf0a4b5c1534184e01cf914f5da2c
parent 5ebc66b0
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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<ComponentName> 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);