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

Commit 5df17a48 authored by Sherry Zhou's avatar Sherry Zhou Committed by Selim Cinek
Browse files

Make getClocks OpenForTesting to test ClockCustomDemoFragment

Test: atest ClockRegistryTest ClockCustomDemoFragmentTest
Bug: 242332371
Change-Id: I1c300abf5b0b062c1657523475283a81bb6eed03
parent d35150f9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.net.Uri
import android.os.Handler
import android.provider.Settings
import android.util.Log
import androidx.annotation.OpenForTesting
import com.android.internal.annotations.Keep
import com.android.systemui.plugins.ClockController
import com.android.systemui.plugins.ClockId
@@ -154,7 +155,8 @@ open class ClockRegistry(
        }
    }

    fun getClocks(): List<ClockMetadata> {
    @OpenForTesting
    open fun getClocks(): List<ClockMetadata> {
        if (!isEnabled) {
            return listOf(availableClocks[DEFAULT_CLOCK_ID]!!.metadata)
        }