Merge "Fix sidefps visibility." into tm-qpr-dev am: 804a8e1146
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21993030 Change-Id: Ibb975cf20f2c0368b353c4cfffd99bce5a562796 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -70,7 +70,7 @@ constructor(
|
|||||||
/** Observe whether we should update fps is showing. */
|
/** Observe whether we should update fps is showing. */
|
||||||
val shouldUpdateSideFps: Flow<Unit> =
|
val shouldUpdateSideFps: Flow<Unit> =
|
||||||
merge(
|
merge(
|
||||||
interactor.startingToHide,
|
interactor.hide,
|
||||||
interactor.show,
|
interactor.show,
|
||||||
interactor.startingDisappearAnimation.filterNotNull().map {}
|
interactor.startingDisappearAnimation.filterNotNull().map {}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class KeyguardBouncerViewModelTest : SysuiTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun shouldUpdateSideFps() = runTest {
|
fun shouldUpdateSideFps_show() = runTest {
|
||||||
var count = 0
|
var count = 0
|
||||||
val job = underTest.shouldUpdateSideFps.onEach { count++ }.launchIn(this)
|
val job = underTest.shouldUpdateSideFps.onEach { count++ }.launchIn(this)
|
||||||
repository.setPrimaryShow(true)
|
repository.setPrimaryShow(true)
|
||||||
@@ -103,6 +103,18 @@ class KeyguardBouncerViewModelTest : SysuiTestCase() {
|
|||||||
job.cancel()
|
job.cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun shouldUpdateSideFps_hide() = runTest {
|
||||||
|
repository.setPrimaryShow(true)
|
||||||
|
var count = 0
|
||||||
|
val job = underTest.shouldUpdateSideFps.onEach { count++ }.launchIn(this)
|
||||||
|
repository.setPrimaryShow(false)
|
||||||
|
// Run the tasks that are pending at this point of virtual time.
|
||||||
|
runCurrent()
|
||||||
|
assertThat(count).isEqualTo(1)
|
||||||
|
job.cancel()
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun sideFpsShowing() = runTest {
|
fun sideFpsShowing() = runTest {
|
||||||
var sideFpsIsShowing = false
|
var sideFpsIsShowing = false
|
||||||
|
|||||||
Reference in New Issue
Block a user