Loading packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt +5 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ class PanelTaskViewController( private val hide: () -> Unit = {} ) { init { taskView.alpha = 0f } private var detailTaskId = INVALID_TASK_ID private val fillInIntent = Loading Loading @@ -96,6 +100,7 @@ class PanelTaskViewController( override fun onTaskCreated(taskId: Int, name: ComponentName?) { detailTaskId = taskId taskView.alpha = 1f } override fun onReleased() { Loading packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.controls.ui import android.app.ActivityOptions import android.app.PendingIntent import android.content.ComponentName import android.content.Context import android.content.Intent import android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK Loading Loading @@ -89,6 +90,11 @@ class PanelTaskViewControllerTest : SysuiTestCase() { ) } @Test fun testTaskViewStartsWithAlpha0() { verify(taskView).alpha = 0f } @Test fun testLaunchTaskViewAttachedListener() { underTest.launchTaskView() Loading Loading @@ -119,6 +125,16 @@ class PanelTaskViewControllerTest : SysuiTestCase() { assertThat(optionsCaptor.value.taskAlwaysOnTop).isTrue() } @Test fun testOnTaskCreated_taskViewAlpha1() { underTest.launchTaskView() verify(taskView).setListener(any(), capture(listenerCaptor)) listenerCaptor.value.onTaskCreated(1, ComponentName("Test", "TEST")) verify(taskView).alpha = 1f } @Test fun testHideRunnableCalledWhenBackOnRoot() { underTest.launchTaskView() Loading Loading
packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt +5 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ class PanelTaskViewController( private val hide: () -> Unit = {} ) { init { taskView.alpha = 0f } private var detailTaskId = INVALID_TASK_ID private val fillInIntent = Loading Loading @@ -96,6 +100,7 @@ class PanelTaskViewController( override fun onTaskCreated(taskId: Int, name: ComponentName?) { detailTaskId = taskId taskView.alpha = 1f } override fun onReleased() { Loading
packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.controls.ui import android.app.ActivityOptions import android.app.PendingIntent import android.content.ComponentName import android.content.Context import android.content.Intent import android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK Loading Loading @@ -89,6 +90,11 @@ class PanelTaskViewControllerTest : SysuiTestCase() { ) } @Test fun testTaskViewStartsWithAlpha0() { verify(taskView).alpha = 0f } @Test fun testLaunchTaskViewAttachedListener() { underTest.launchTaskView() Loading Loading @@ -119,6 +125,16 @@ class PanelTaskViewControllerTest : SysuiTestCase() { assertThat(optionsCaptor.value.taskAlwaysOnTop).isTrue() } @Test fun testOnTaskCreated_taskViewAlpha1() { underTest.launchTaskView() verify(taskView).setListener(any(), capture(listenerCaptor)) listenerCaptor.value.onTaskCreated(1, ComponentName("Test", "TEST")) verify(taskView).alpha = 1f } @Test fun testHideRunnableCalledWhenBackOnRoot() { underTest.launchTaskView() Loading