Add additional logging to help debug launcher stuck in QS bug

Bug: 362324209
Flag: EXEMPT logging
Test: Manual
Change-Id: I03be5a4dd7364653e59d710483cde528240b860b
This commit is contained in:
Uwais Ashraf
2025-06-03 14:36:37 +00:00
parent 8f9d26d3ee
commit 145a32bc8b
@@ -1511,6 +1511,10 @@ constructor(
isQuickSwitch: Boolean = false,
callback: (launched: Boolean) -> Unit,
) {
val callbackWithLogging = { launchSuccess: Boolean ->
Log.d(TAG, "launchWithoutAnimation - callback: launchSuccess: $launchSuccess")
callback(launchSuccess)
}
val firstTaskContainer = firstTaskContainer ?: return
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN,
@@ -1545,8 +1549,9 @@ constructor(
0,
0,
Executors.MAIN_EXECUTOR.handler,
{ callback(true) },
{ callbackWithLogging(true) },
) {
Log.d(TAG, "launchWithoutAnimation: launch animation finished")
failureListener.onTransitionFinished()
}
.apply {
@@ -1558,22 +1563,24 @@ constructor(
disableStartingWindow = firstTaskContainer.shouldShowSplashView
}
Executors.UI_HELPER_EXECUTOR.execute {
Log.d(
TAG,
"launchWithoutAnimation(isQuickSwitch: $isQuickSwitch) - " +
"startActivityFromRecents: ${taskIds.contentToString()}",
)
if (
!ActivityManagerWrapper.getInstance()
.startActivityFromRecents(firstTaskContainer.task.key, opts)
) {
Log.d(TAG, "launchWithoutAnimation - task launch failed")
// If the call to start activity failed, then post the result immediately,
// otherwise, wait for the animation start callback from the activity options
// above
Executors.MAIN_EXECUTOR.post {
notifyTaskLaunchFailed("launchTask")
callback(false)
callbackWithLogging(false)
}
}
Log.d(
TAG,
"launchWithoutAnimation - startActivityFromRecents: ${taskIds.contentToString()}",
)
}
}