Allow nullable in LogBuffers in ClockEventController
Bug: 243942947 Test: atest KeyguardClockSwitchScreenshotTest Change-Id: I51d7dfbcd4b1c8a63f145b54fab59bae182a6ed4
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user