Merge "Allow nullable in LogBuffers in ClockEventController" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b0b34d3e4c
@@ -69,14 +69,17 @@ open class ClockEventController @Inject constructor(
|
|||||||
private val context: Context,
|
private val context: Context,
|
||||||
@Main private val mainExecutor: Executor,
|
@Main private val mainExecutor: Executor,
|
||||||
@Background private val bgExecutor: Executor,
|
@Background private val bgExecutor: Executor,
|
||||||
@KeyguardClockLog private val logBuffer: LogBuffer,
|
@KeyguardClockLog private val logBuffer: LogBuffer?,
|
||||||
private val featureFlags: FeatureFlags
|
private val featureFlags: FeatureFlags
|
||||||
) {
|
) {
|
||||||
var clock: ClockController? = null
|
var clock: ClockController? = null
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
field = value
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
value.setLogBuffer(logBuffer)
|
if (logBuffer != null) {
|
||||||
|
value.setLogBuffer(logBuffer)
|
||||||
|
}
|
||||||
|
|
||||||
value.initialize(resources, dozeAmount, 0f)
|
value.initialize(resources, dozeAmount, 0f)
|
||||||
updateRegionSamplers(value)
|
updateRegionSamplers(value)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ import org.mockito.junit.MockitoJUnit
|
|||||||
class ClockEventControllerTest : SysuiTestCase() {
|
class ClockEventControllerTest : SysuiTestCase() {
|
||||||
|
|
||||||
@JvmField @Rule val mockito = MockitoJUnit.rule()
|
@JvmField @Rule val mockito = MockitoJUnit.rule()
|
||||||
@Mock private lateinit var keyguardInteractor: KeyguardInteractor
|
|
||||||
@Mock private lateinit var broadcastDispatcher: BroadcastDispatcher
|
@Mock private lateinit var broadcastDispatcher: BroadcastDispatcher
|
||||||
@Mock private lateinit var batteryController: BatteryController
|
@Mock private lateinit var batteryController: BatteryController
|
||||||
@Mock private lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor
|
@Mock private lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor
|
||||||
|
|||||||
Reference in New Issue
Block a user