Merge "Add logs for DesktopAppLaunchTransition when animation starts/no launch change" into main
This commit is contained in:
commit
e97f4932fd
2 files changed
+22
-2
No files matched your search
@@ -21,6 +21,7 @@ import android.animation.AnimatorSet
|
||||
import android.animation.ValueAnimator
|
||||
import android.content.Context
|
||||
import android.graphics.Rect
|
||||
import android.util.Log
|
||||
import android.view.Choreographer
|
||||
import android.view.SurfaceControl.Transaction
|
||||
import android.view.WindowManager.TRANSIT_CLOSE
|
||||
@@ -63,7 +64,19 @@ class DesktopAppLaunchAnimatorHelper(
|
||||
|
||||
fun createAnimators(info: TransitionInfo, finishCallback: (Animator) -> Unit): List<Animator> {
|
||||
val launchChange = getLaunchChange(info)
|
||||
requireNotNull(launchChange) { "expected an app launch Change" }
|
||||
requireNotNull(launchChange) {
|
||||
val changesString =
|
||||
info.changes.joinToString(", ") { change ->
|
||||
"Change: mode=${change.mode}, " +
|
||||
"taskId=${change.taskInfo?.id}, " +
|
||||
"isFreeform=${change.taskInfo?.isFreeform}"
|
||||
}
|
||||
Log.e(
|
||||
TAG,
|
||||
"No launch change found: Transition type=${info.type}, changes=$changesString",
|
||||
)
|
||||
"expected an app launch Change"
|
||||
}
|
||||
|
||||
val transaction = transactionSupplier.get()
|
||||
|
||||
@@ -189,4 +202,8 @@ class DesktopAppLaunchAnimatorHelper(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val TAG = "DesktopAppLaunchAnimatorHelper"
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ package com.android.launcher3.desktop
|
||||
import android.animation.Animator
|
||||
import android.content.Context
|
||||
import android.os.IBinder
|
||||
import android.util.Log
|
||||
import android.view.SurfaceControl.Transaction
|
||||
import android.view.WindowManager.TRANSIT_OPEN
|
||||
import android.view.WindowManager.TRANSIT_TO_FRONT
|
||||
@@ -43,7 +44,7 @@ class DesktopAppLaunchTransition
|
||||
@JvmOverloads
|
||||
constructor(
|
||||
context: Context,
|
||||
launchType: AppLaunchType,
|
||||
private val launchType: AppLaunchType,
|
||||
@Cuj.CujType private val cujType: Int,
|
||||
private val mainExecutor: Executor,
|
||||
transactionSupplier: Supplier<Transaction> = Supplier { Transaction() },
|
||||
@@ -66,6 +67,7 @@ constructor(
|
||||
transaction: Transaction,
|
||||
transitionFinishedCallback: IRemoteTransitionFinishedCallback,
|
||||
) {
|
||||
Log.v(TAG, "startAnimation: launchType=$launchType, cujType=$cujType")
|
||||
val safeTransitionFinishedCallback = RemoteRunnable {
|
||||
transitionFinishedCallback.onTransitionFinished(/* wct= */ null, /* sct= */ null)
|
||||
}
|
||||
@@ -86,6 +88,7 @@ constructor(
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "DesktopAppLaunchTransition"
|
||||
/** Change modes that represent a task becoming visible / launching in Desktop mode. */
|
||||
val LAUNCH_CHANGE_MODES = intArrayOf(TRANSIT_OPEN, TRANSIT_TO_FRONT)
|
||||
|
||||
|
||||
Reference in new issue
Block a user