mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Use snapshotView references in TaskContainer when possible
- Moved majority of TaskContainer.thumbnailViewDeprecated usage to TaskContainer.snapshotView, so they'll cover the new TaskThumbnailView as well - There are afew location left that will be handled as a follow-up - Removed TaskThumbnailView's splitTranslation and use translation directly as it's the only translation we use Bug: 336612373 Test: Ensure all Task CUJs still work without refacorting Test: Ensure major Task CUJs work with refactoring Flag: EXEMPT refactor Flag: com.android.launcher3.enable_refactor_task_thumbnail Change-Id: Ieb52236bc503ce0d0a511249978c1821a82d406e
This commit is contained in:
@@ -33,7 +33,6 @@ import com.android.launcher3.taskbar.TaskbarActivityContext
|
||||
import com.android.launcher3.util.SplitConfigurationOptions
|
||||
import com.android.quickstep.views.GroupedTaskView
|
||||
import com.android.quickstep.views.IconView
|
||||
import com.android.quickstep.views.TaskThumbnailViewDeprecated
|
||||
import com.android.quickstep.views.TaskView
|
||||
import com.android.quickstep.views.TaskView.TaskContainer
|
||||
import com.android.systemui.shared.recents.model.Task
|
||||
@@ -59,7 +58,7 @@ class SplitAnimationControllerTest {
|
||||
private val mockSplitSelectStateController: SplitSelectStateController = mock()
|
||||
// TaskView
|
||||
private val mockTaskView: TaskView = mock()
|
||||
private val mockThumbnailView: TaskThumbnailViewDeprecated = mock()
|
||||
private val mockSnapshotView: View = mock()
|
||||
private val mockBitmap: Bitmap = mock()
|
||||
private val mockIconView: IconView = mock()
|
||||
private val mockTaskViewDrawable: Drawable = mock()
|
||||
@@ -87,8 +86,8 @@ class SplitAnimationControllerTest {
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
whenever(mockTaskContainer.thumbnailViewDeprecated).thenReturn(mockThumbnailView)
|
||||
whenever(mockThumbnailView.thumbnail).thenReturn(mockBitmap)
|
||||
whenever(mockTaskContainer.snapshotView).thenReturn(mockSnapshotView)
|
||||
whenever(mockTaskContainer.thumbnail).thenReturn(mockBitmap)
|
||||
whenever(mockTaskContainer.iconView).thenReturn(mockIconView)
|
||||
whenever(mockIconView.drawable).thenReturn(mockTaskViewDrawable)
|
||||
whenever(mockTaskView.taskContainers).thenReturn(List(1) { mockTaskContainer })
|
||||
@@ -180,7 +179,6 @@ class SplitAnimationControllerTest {
|
||||
|
||||
whenever(mockTaskContainer.task).thenReturn(mockTask)
|
||||
whenever(mockTaskContainer.iconView).thenReturn(mockIconView)
|
||||
whenever(mockTaskContainer.thumbnailViewDeprecated).thenReturn(mockThumbnailView)
|
||||
whenever(mockTask.getKey()).thenReturn(mockTaskKey)
|
||||
whenever(mockTaskKey.getId()).thenReturn(taskId)
|
||||
whenever(mockSplitSelectStateController.initialTaskId).thenReturn(taskId)
|
||||
|
||||
Reference in New Issue
Block a user