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

Commit dee414b2 authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

Allow nullable in LogBuffers in ClockEventController

Bug: 243942947
Test: atest KeyguardClockSwitchScreenshotTest
Change-Id: I51d7dfbcd4b1c8a63f145b54fab59bae182a6ed4
parent 9b45e65e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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) {
                if (logBuffer != null) {
                    value.setLogBuffer(logBuffer)
                }

                value.initialize(resources, dozeAmount, 0f)
                updateRegionSamplers(value)
            }
+0 −1
Original line number Diff line number Diff line
@@ -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