Correct log format while comparing an existing task for new component

Bug: 265244780
Test: check the log format after enabled WM_DEBUG_TASKS
Change-Id: I042aa7a62303745979a3e5022fb605a6b3aebc0f
This commit is contained in:
Jerry Chang
2023-01-18 04:13:41 +00:00
parent 7cc40702af
commit 2ec1fe8d6f

View File

@@ -380,9 +380,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
ProtoLog.d(WM_DEBUG_TASKS, "Comparing existing cls=%s /aff=%s to new cls=%s /aff=%s",
r.getTask().rootAffinity, mIntent.getComponent().flattenToShortString(),
mInfo.taskAffinity, (task.realActivity != null
? task.realActivity.flattenToShortString() : ""));
(task.realActivity != null ? task.realActivity.flattenToShortString() : ""),
task.rootAffinity, mIntent.getComponent().flattenToShortString(),
mTaskAffinity);
// TODO Refactor to remove duplications. Check if logic can be simplified.
if (task.realActivity != null && task.realActivity.compareTo(cls) == 0
&& Objects.equals(documentData, taskDocumentData)) {