Merge "Log the attachment index" into tm-qpr-dev

This commit is contained in:
Jeff DeCew
2022-06-09 16:34:34 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ class ShadeViewDiffer(
when (childNode.parent) {
null -> {
// A new child (either newly created or coming from some other parent)
logger.logAttachingChild(childNode.label, parentNode.label)
logger.logAttachingChild(childNode.label, parentNode.label, index)
parentNode.addChildAt(childNode, index)
childNode.parent = parentNode
}

View File

@@ -43,12 +43,13 @@ class ShadeViewDifferLogger @Inject constructor(
})
}
fun logAttachingChild(key: String, parent: String) {
fun logAttachingChild(key: String, parent: String, atIndex: Int) {
buffer.log(TAG, LogLevel.DEBUG, {
str1 = key
str2 = parent
int1 = atIndex
}, {
"Attaching view $str1 to $str2"
"Attaching view $str1 to $str2 at index $int1"
})
}