Log split metrics through individual sessions

* Now we log the original source of the first selected app
as soon as the user selects it (previously we only did when user
selected second app)
* We log the item info for the second app to determine second
surface.
* Added new metrics to log after user has started a split session
and ended a split session
* We log different cancellation reasons (cancel button,
home gesture, general other app interruptions, etc).
* One KI/Bug: When the second app is selected via taskbar in
overview, the container will say hotseat because we are using
Launcher's logger and not Taskbar's. Taskbar's logger manually
overwrites the container in TaskbarActivityContext, we may be
able to make something hacky that can allow us to overwrite, but
that'll have to be a separate change

Bug: 322551862
Test: Logged metrics manually with event and itemInfo
Change-Id: I177623fd00ce62acf2d4ee983b58561d8c946d59
This commit is contained in:
Vinit Nayak committed 2024-02-13 17:55:08 -08:00
1 parent 9ac91ffa63
commit 5a9d4af170
17 files changed
+182 -62

No files matched your search

@@ -46,6 +46,7 @@ import com.android.launcher3.Utilities
import com.android.launcher3.anim.PendingAnimation
import com.android.launcher3.apppairs.AppPairIcon
import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.logging.StatsLogManager.EventEnum
import com.android.launcher3.statehandlers.DepthController
import com.android.launcher3.statemanager.StateManager
import com.android.launcher3.statemanager.StatefulActivity
@@ -213,17 +214,21 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC
}
/** Does not play any animation if user is not currently in split selection state. */
fun playPlaceholderDismissAnim(launcher: StatefulActivity<*>) {
fun playPlaceholderDismissAnim(launcher: StatefulActivity<*>, splitDismissEvent: EventEnum) {
if (!splitSelectStateController.isSplitSelectActive) {
return
}
val anim = createPlaceholderDismissAnim(launcher)
val anim = createPlaceholderDismissAnim(launcher, splitDismissEvent)
anim.start()
}
/** Returns [AnimatorSet] which slides initial split placeholder view offscreen. */
fun createPlaceholderDismissAnim(launcher: StatefulActivity<*>) : AnimatorSet {
/**
* Returns [AnimatorSet] which slides initial split placeholder view offscreen and logs an event
* for why split is being dismissed
*/
fun createPlaceholderDismissAnim(launcher: StatefulActivity<*>,
splitDismissEvent: EventEnum) : AnimatorSet {
val animatorSet = AnimatorSet()
val recentsView : RecentsView<*, *> = launcher.getOverviewPanel()
val floatingTask: FloatingTaskView = splitSelectStateController.firstFloatingTaskView
@@ -260,6 +265,7 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC
splitSelectStateController.splitInstructionsView)
}
})
splitSelectStateController.logExitReason(splitDismissEvent)
return animatorSet
}