Make getClocks OpenForTesting to test ClockCustomDemoFragment

Test: atest ClockRegistryTest ClockCustomDemoFragmentTest
Bug: 242332371
Change-Id: I1c300abf5b0b062c1657523475283a81bb6eed03
This commit is contained in:
Sherry Zhou
2022-11-14 22:43:41 +00:00
committed by Selim Cinek
parent d35150f907
commit 5df17a48e8

View File

@@ -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)
}