Merge "Allow nullable in LogBuffers in ClockEventController" into tm-qpr-dev

This commit is contained in:
Hawkwood Glazier
2022-10-31 15:17:02 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 3 deletions

View File

@@ -69,14 +69,17 @@ open class ClockEventController @Inject constructor(
private val context: Context,
@Main private val mainExecutor: Executor,
@Background private val bgExecutor: Executor,
@KeyguardClockLog private val logBuffer: LogBuffer,
@KeyguardClockLog private val logBuffer: LogBuffer?,
private val featureFlags: FeatureFlags
) {
var clock: ClockController? = null
set(value) {
field = value
if (value != null) {
value.setLogBuffer(logBuffer)
if (logBuffer != null) {
value.setLogBuffer(logBuffer)
}
value.initialize(resources, dozeAmount, 0f)
updateRegionSamplers(value)
}

View File

@@ -65,7 +65,6 @@ import org.mockito.junit.MockitoJUnit
class ClockEventControllerTest : SysuiTestCase() {
@JvmField @Rule val mockito = MockitoJUnit.rule()
@Mock private lateinit var keyguardInteractor: KeyguardInteractor
@Mock private lateinit var broadcastDispatcher: BroadcastDispatcher
@Mock private lateinit var batteryController: BatteryController
@Mock private lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor