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

Commit 40981bf7 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

Guard mLockscreen in NotificationLogger with correct lock.

Bug: 296050180
Test: atest NotificationLoggerTest
Change-Id: Iec1e5110e86b2225a70abc0d79b24dc3c0b30603
parent b5e861ee
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -276,14 +276,16 @@ public class NotificationLogger implements StateListener, CoreStartable {
        }
    }

    @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 ->