Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec295771 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

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
parent ef3dfe2a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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) {