Use the correct object to guard |mConversationsListeners|

The variable is marked as @GuardedBy("mLock"), but actually guarded
by itself.

Bug: 276714246
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cae843c3878eff70ae223c3e22b19558cb594b04)
Merged-In: I383e6c42f16f747dd80d604671b369fa491376cb
Change-Id: I383e6c42f16f747dd80d604671b369fa491376cb
This commit is contained in:
Yuichiro Hanada
2023-04-03 23:29:34 +09:00
committed by Cherrypicker Worker
parent bd120ea8be
commit 2553f667bb

View File

@@ -1339,7 +1339,7 @@ public class DataManager {
/** Adds {@code listener} to be notified on conversation changes. */
public void addConversationsListener(
@NonNull PeopleService.ConversationsListener listener) {
synchronized (mConversationsListeners) {
synchronized (mLock) {
mConversationsListeners.add(Objects.requireNonNull(listener));
}
}