Bad lock object.

Locking on an interned string can cause unexpected locking collisions, and we should lock the mLock object here.

Change-Id: I8b6557371b0cb79e1bcbc732982cf66b9de663a5
This commit is contained in:
Kai Peng
2022-04-11 12:41:37 +00:00
parent f743f382c9
commit 546fbc8bf7

View File

@@ -582,7 +582,7 @@ public class ClipboardService extends SystemService {
void setPrimaryClipInternal(PerUserClipboard clipboard, @Nullable ClipData clip,
int uid) {
synchronized ("mLock") {
synchronized (mLock) {
setPrimaryClipInternalLocked(clipboard, clip, uid, null);
}
}