summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pablo Gamito <pablogamito@google.com> 2024-10-14 15:30:20 +0000
committer Pablo Gamito <pablogamito@google.com> 2024-10-14 15:30:20 +0000
commit43103941a8840c503496e84531a1a96b7f50bb75 (patch)
tree07caacb84982b2c72694e89e93aa3ec26d0668be
parent62c8f5d7c603226232a7430857fc0bd89f661daa (diff)
Remove synchronization on getViewerString
This might have been causing lock contention in the main thread when called while waiting for protolog to be loaded or unloaded. It will be the callers responsibility to ensure the loading and unloading of configs has completed successfully before querying the viewer config if required. Flag: EXEMPT fixing regression Bug: 369833736 Test: atest TracingTests Change-Id: Ica8203138c697897f63df30f145b14125554aeb3
-rw-r--r--core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java b/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
index 0a80e006d5bc..dd6c879f1135 100644
--- a/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
+++ b/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
@@ -39,7 +39,7 @@ public class ProtoLogViewerConfigReader {
* or the viewer config is not loaded into memory.
*/
@Nullable
- public synchronized String getViewerString(long messageHash) {
+ public String getViewerString(long messageHash) {
return mLogMessageMap.get(messageHash);
}