Merge "Fix Hotseat flashing during DW to home transition" into main
This commit is contained in:
@@ -28,6 +28,9 @@ class TaskbarDesktopModeController(
|
||||
private lateinit var taskbarControllers: TaskbarControllers
|
||||
private lateinit var taskbarSharedState: TaskbarSharedState
|
||||
|
||||
val isLauncherAnimationRunning: Boolean
|
||||
get() = desktopVisibilityController.launcherAnimationRunning
|
||||
|
||||
fun init(controllers: TaskbarControllers, sharedState: TaskbarSharedState) {
|
||||
taskbarControllers = controllers
|
||||
taskbarSharedState = sharedState
|
||||
|
||||
@@ -269,7 +269,11 @@ class TaskbarRecentAppsController(
|
||||
desktopTasks = allRecentTasks.filterIsInstance<DesktopTask>().flatMap { it.tasks }
|
||||
val runningTasksChanged = oldRunningTaskdIds != runningTaskIds
|
||||
val minimizedTasksChanged = oldMinimizedTaskIds != minimizedTaskIds
|
||||
if (onRecentsOrHotseatChanged() || runningTasksChanged || minimizedTasksChanged) {
|
||||
|
||||
if (
|
||||
(onRecentsOrHotseatChanged() || runningTasksChanged || minimizedTasksChanged) &&
|
||||
!controllers.taskbarDesktopModeController.isLauncherAnimationRunning
|
||||
) {
|
||||
controllers.taskbarViewController.commitRunningAppsToUI()
|
||||
}
|
||||
if (needsRecentsTasksReload) {
|
||||
|
||||
+1
@@ -119,6 +119,7 @@ class TaskbarRecentAppsControllerTest : TaskbarBaseTestCase() {
|
||||
recentTasksChangedListener = null
|
||||
it
|
||||
}
|
||||
whenever(taskbarDesktopModeController.isLauncherAnimationRunning).thenReturn(false)
|
||||
recentAppsController = TaskbarRecentAppsController(mockContext, mockRecentsModel)
|
||||
recentAppsController.canShowRunningApps = canShowRunningAndRecentAppsAtInit
|
||||
recentAppsController.canShowRecentApps = canShowRunningAndRecentAppsAtInit
|
||||
|
||||
Reference in New Issue
Block a user