Merge "Log the attachment index" into tm-qpr-dev am: a57772aff1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800529

Change-Id: Ia6c6ebd75823d9e135179e896dce91dfacea5174
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeff DeCew
2022-06-09 16:43:06 +00:00
committed by Automerger Merge Worker
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"
})
}