Fix DeviceFoldStateProviderTest

topActivityType is available directly from taskInfo. In the test, the windowConfiguration was not mocked correctly.

Fixes: 226967913
Test: atest DeviceFoldStateProviderTest
Change-Id: Ia0f2114ff675d943a7e2c2555aa0d11b854883a0
This commit is contained in:
Nicolo' Mazzucato
2022-03-26 00:19:12 +00:00
parent ef3dfe2a8f
commit ec295771f7

View File

@@ -126,12 +126,7 @@ constructor(
*/
private fun getClosingThreshold(): Int? {
val activityType =
activityManager
.getRunningTasks(/* maxNum= */ 1)
?.getOrNull(0)
?.configuration
?.windowConfiguration
?.activityType
activityManager.getRunningTasks(/* maxNum= */ 1)?.getOrNull(0)?.topActivityType
?: return null
if (DEBUG) {