commit | 40981bf7eaec268768c8a7006394edb714b93f76 | [log] [tgz] |
---|---|---|
author | Caitlin Shkuratov <caitlinshk@google.com> | Wed Aug 30 17:07:55 2023 +0000 |
committer | Caitlin Shkuratov <caitlinshk@google.com> | Wed Aug 30 17:07:55 2023 +0000 |
tree | 6044c567f7fb1a3a94fe5912541c68457710db43 | |
parent | b5e861ee386013cbc57a4774f34c1126f46a356a [diff] |
Guard mLockscreen in NotificationLogger with correct lock. Bug: 296050180 Test: atest NotificationLoggerTest Change-Id: Iec1e5110e86b2225a70abc0d79b24dc3c0b30603
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java index d2034d7..8d2a63e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
@@ -276,14 +276,16 @@ } } - @GuardedBy("mDozingLock") public void startNotificationLogging() { if (!mLogging) { mLogging = true; if (DEBUG) { Log.i(TAG, "startNotificationLogging"); } - boolean lockscreen = mLockscreen != null && mLockscreen; + boolean lockscreen; + synchronized (mDozingLock) { + lockscreen = mLockscreen != null && mLockscreen; + } mNotificationPanelLogger.logPanelShown(lockscreen, getVisibleNotifications()); mListContainer.setChildLocationsChangedListener(this::onChildLocationsChanged); // Sometimes, the transition from lockscreenOrShadeVisible=false ->