Merge "Enable ShadeViewDiffer systrace logs" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c7515ae352
@@ -271,11 +271,13 @@ constructor(
|
||||
}
|
||||
|
||||
private fun echoToSystrace(message: LogMessage, strMessage: String) {
|
||||
Trace.instantForTrack(
|
||||
Trace.TRACE_TAG_APP,
|
||||
"UI Events",
|
||||
"$name - ${message.level.shortString} ${message.tag}: $strMessage"
|
||||
)
|
||||
if (Trace.isTagEnabled(Trace.TRACE_TAG_APP)) {
|
||||
Trace.instantForTrack(
|
||||
Trace.TRACE_TAG_APP,
|
||||
"UI Events",
|
||||
"$name - ${message.level.shortString} ${message.tag}: $strMessage"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun echoToLogcat(message: LogMessage, strMessage: String) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class LogModule {
|
||||
if (Compile.IS_DEBUG && notifPipelineFlags.isDevLoggingEnabled()) {
|
||||
maxSize *= 10;
|
||||
}
|
||||
return factory.create("NotifLog", maxSize, false /* systrace */);
|
||||
return factory.create("NotifLog", maxSize, Compile.IS_DEBUG /* systrace */);
|
||||
}
|
||||
|
||||
/** Provides a logging buffer for all logs related to notifications on the lockscreen. */
|
||||
|
||||
@@ -67,7 +67,10 @@ class ShadeViewDiffer(
|
||||
fun getViewLabel(view: View): String =
|
||||
nodes.values.firstOrNull { node -> node.view === view }?.label ?: view.toString()
|
||||
|
||||
private fun detachChildren(parentNode: ShadeNode, specMap: Map<NodeController, NodeSpec>) {
|
||||
private fun detachChildren(
|
||||
parentNode: ShadeNode,
|
||||
specMap: Map<NodeController, NodeSpec>
|
||||
) = traceSection("detachChildren") {
|
||||
val views = nodes.values.associateBy { it.view }
|
||||
fun detachRecursively(parentNode: ShadeNode, specMap: Map<NodeController, NodeSpec>) {
|
||||
val parentSpec = specMap[parentNode.controller]
|
||||
@@ -124,7 +127,10 @@ class ShadeViewDiffer(
|
||||
}
|
||||
}
|
||||
|
||||
private fun attachChildren(parentNode: ShadeNode, specMap: Map<NodeController, NodeSpec>) {
|
||||
private fun attachChildren(
|
||||
parentNode: ShadeNode,
|
||||
specMap: Map<NodeController, NodeSpec>
|
||||
): Unit = traceSection("attachChildren") {
|
||||
val parentSpec = checkNotNull(specMap[parentNode.controller])
|
||||
|
||||
for ((index, childSpec) in parentSpec.children.withIndex()) {
|
||||
|
||||
Reference in New Issue
Block a user