Loading src/com/android/launcher3/util/TraceHelper.java +32 −26 Original line number Diff line number Diff line Loading @@ -39,8 +39,9 @@ public class TraceHelper { private static final boolean SYSTEM_TRACE = false; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null; public static synchronized void beginSection(String sectionName) { public static void beginSection(String sectionName) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time == null) { time = new MutableLong(isLoggable(sectionName, VERBOSE) ? 0 : -1); Loading @@ -54,9 +55,11 @@ public class TraceHelper { } } } } public static synchronized void partitionSection(String sectionName, String partition) { public static void partitionSection(String sectionName, String partition) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time != null && time.value >= 0) { Loading @@ -71,6 +74,7 @@ public class TraceHelper { } } } } public static void endSection(String sectionName) { if (ENABLED) { Loading @@ -78,8 +82,9 @@ public class TraceHelper { } } public static synchronized void endSection(String sectionName, String msg) { public static void endSection(String sectionName, String msg) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time != null && time.value >= 0) { if (SYSTEM_TRACE) { Loading @@ -90,3 +95,4 @@ public class TraceHelper { } } } } Loading
src/com/android/launcher3/util/TraceHelper.java +32 −26 Original line number Diff line number Diff line Loading @@ -39,8 +39,9 @@ public class TraceHelper { private static final boolean SYSTEM_TRACE = false; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null; public static synchronized void beginSection(String sectionName) { public static void beginSection(String sectionName) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time == null) { time = new MutableLong(isLoggable(sectionName, VERBOSE) ? 0 : -1); Loading @@ -54,9 +55,11 @@ public class TraceHelper { } } } } public static synchronized void partitionSection(String sectionName, String partition) { public static void partitionSection(String sectionName, String partition) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time != null && time.value >= 0) { Loading @@ -71,6 +74,7 @@ public class TraceHelper { } } } } public static void endSection(String sectionName) { if (ENABLED) { Loading @@ -78,8 +82,9 @@ public class TraceHelper { } } public static synchronized void endSection(String sectionName, String msg) { public static void endSection(String sectionName, String msg) { if (ENABLED) { synchronized (sUpTimes) { MutableLong time = sUpTimes.get(sectionName); if (time != null && time.value >= 0) { if (SYSTEM_TRACE) { Loading @@ -90,3 +95,4 @@ public class TraceHelper { } } } }