Only get trace name if tracing is enabled
String formatting creates new objects, so only do it if needed. Bug: 30549756 Change-Id: I8035357c2b9c3066ef7663b938654f698a2321bc
This commit is contained in:
@@ -147,7 +147,7 @@ public final class Looper {
|
||||
}
|
||||
|
||||
final long traceTag = me.mTraceTag;
|
||||
if (traceTag != 0) {
|
||||
if (traceTag != 0 && Trace.isTagEnabled(traceTag)) {
|
||||
Trace.traceBegin(traceTag, msg.target.getTraceName(msg));
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user