Improve input consumer selection reason logging

Flag: EXEMPT debug logging
Fixes: 407050156
Test: checked TIS logs
Change-Id: I96cbbde1e3da32b75b7c0076719f6b1ee859fdba
This commit is contained in:
Schneider Victor-Tulias
2025-03-28 13:31:15 -04:00
parent 95dc69f7ce
commit 41c5083dd9
@@ -592,19 +592,18 @@ object InputConsumerUtils {
previousGestureState,
gestureState,
event,
reasonString.append(
if (previousGestureAnimatedToLauncher)
("%sprevious gesture animated to launcher, " +
"trying to use overview input consumer")
else
(if (launcherResumedThroughShellTransition)
("%slauncher resumed through a shell transition, " +
"trying to use overview input consumer")
else
("%sforceOverviewInputConsumer == true, " +
"trying to use overview input consumer")),
SUBSTRING_PREFIX,
),
reasonString
.append(
if (previousGestureAnimatedToLauncher)
(if (previousGestureState.isRunningAnimationToLauncher)
"%sprevious gesture is still animating to launcher"
else "%spredictive back animation is still in progress")
else if (launcherResumedThroughShellTransition)
"%slauncher resumed through a shell transition"
else "%sforceOverviewInputConsumer == true",
SUBSTRING_PREFIX,
)
.append(", trying to use overview input consumer"),
)
} else if (deviceState.isGestureBlockedTask(runningTask) || launcherChildActivityResumed) {
getDefaultInputConsumer(
@@ -715,11 +714,12 @@ object InputConsumerUtils {
reasonString.append(
if (hasWindowFocus) "%sactivity has window focus"
else
(if (isPreviousGestureAnimatingToLauncher)
else if (isPreviousGestureAnimatingToLauncher)
(if (previousGestureState.isRunningAnimationToLauncher)
"%sprevious gesture is still animating to launcher"
else if (isInLiveTileMode) "%sdevice is in live mode"
else "%sall overview focus conditions failed"),
else "%spredictive back animation is still in progress")
else if (isInLiveTileMode) "%sdevice is in live mode"
else "%sall overview focus conditions failed",
SUBSTRING_PREFIX,
)
return if (hasWindowFocus || isPreviousGestureAnimatingToLauncher || isInLiveTileMode) {