Merge "Not relying on activity manager when choosing a touch consumer." into ub-launcher3-master
diff --git a/src/com/android/launcher3/util/TraceHelper.java b/src/com/android/launcher3/util/TraceHelper.java
index 4aa2f37..a321bcc 100644
--- a/src/com/android/launcher3/util/TraceHelper.java
+++ b/src/com/android/launcher3/util/TraceHelper.java
@@ -39,7 +39,7 @@
private static final boolean SYSTEM_TRACE = false;
private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null;
- public static void beginSection(String sectionName) {
+ public static synchronized void beginSection(String sectionName) {
if (ENABLED) {
MutableLong time = sUpTimes.get(sectionName);
if (time == null) {
@@ -55,7 +55,7 @@
}
}
- public static void partitionSection(String sectionName, String partition) {
+ public static synchronized void partitionSection(String sectionName, String partition) {
if (ENABLED) {
MutableLong time = sUpTimes.get(sectionName);
if (time != null && time.value >= 0) {
@@ -78,7 +78,7 @@
}
}
- public static void endSection(String sectionName, String msg) {
+ public static synchronized void endSection(String sectionName, String msg) {
if (ENABLED) {
MutableLong time = sUpTimes.get(sectionName);
if (time != null && time.value >= 0) {