Home
last modified time | relevance | path

Searched refs:batteryController (Results 1 – 25 of 43) sorted by relevance

12

/frameworks/base/tests/Input/src/com/android/server/input/
DBatteryControllerTests.kt197 private lateinit var batteryController: BatteryController variable in com.android.server.input.BatteryControllerTests
217 batteryController = BatteryController(context, native, testLooper.looper, uEventManager, in setup()
219 batteryController.systemRunning() in setup()
268 batteryController.registerBatteryListener(DEVICE_ID, listener, PID) in testRegisterAndUnregisterBinderLifecycle()
270 batteryController.registerBatteryListener(SECOND_DEVICE_ID, listener, PID) in testRegisterAndUnregisterBinderLifecycle()
274 batteryController.unregisterBatteryListener(SECOND_DEVICE_ID, listener, PID) in testRegisterAndUnregisterBinderLifecycle()
276 batteryController.unregisterBatteryListener(DEVICE_ID, listener, PID) in testRegisterAndUnregisterBinderLifecycle()
283 batteryController.registerBatteryListener(DEVICE_ID, listener1, PID) in testOneListenerPerProcess()
289 batteryController.registerBatteryListener(DEVICE_ID, listener2, PID) in testOneListenerPerProcess()
299 batteryController.registerBatteryListener(DEVICE_ID, listener, PID) in testProcessDeathRemovesListener()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/flags/
DPluggedInConditionTest.kt42 @Mock private lateinit var batteryController: BatteryController variable in com.android.systemui.flags.PluggedInConditionTest
52 condition = PluggedInCondition({ batteryController }) in setup()
58 whenever(batteryController.isPluggedIn).thenReturn(false) in testCondition_unplugged()
68 whenever(batteryController.isPluggedIn).thenReturn(true) in testCondition_pluggedIn()
78 whenever(batteryController.isPluggedIn).thenReturn(false) in testCondition_invokesRetry()
84 verify(batteryController).addCallback(callbackCaptor.capture()) in testCondition_invokesRetry()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/battery/doman/interactor/
DBatterySaverTileDataInteractorTest.kt47 private val batteryController = FakeBatteryController(LeakCheck()) constant in com.android.systemui.qs.tiles.impl.battery.doman.interactor.BatterySaverTileDataInteractorTest
50 BatterySaverTileDataInteractor(testScope.testScheduler, batteryController)
72 batteryController.setPowerSaveMode(true) in tileData_matchesBatteryControllerPowerSaving()
76 batteryController.setPowerSaveMode(false) in tileData_matchesBatteryControllerPowerSaving()
92 batteryController.isPluggedIn = true in tileData_matchesBatteryControllerIsPluggedIn()
96 batteryController.isPluggedIn = false in tileData_matchesBatteryControllerIsPluggedIn()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/
DBatterySaverTileTest.kt69 @Mock private lateinit var batteryController: BatteryController variable in com.android.systemui.qs.tiles.BatterySaverTileTest
96 batteryController, in setUp()
132 verify(batteryController).setPowerSaveMode(true, expandable) in testClickingPowerSavePassesView()
133 verify(batteryController).setPowerSaveMode(false, expandable) in testClickingPowerSavePassesView()
138 clearInvocations(batteryController) in testStopListeningClearsViewInController()
140 verify(batteryController, never()).clearLastPowerSaverStartExpandable() in testStopListeningClearsViewInController()
143 verify(batteryController).clearLastPowerSaverStartExpandable() in testStopListeningClearsViewInController()
DUiModeNightTileTest.kt64 @Mock private lateinit var batteryController: BatteryController variable in com.android.systemui.qs.tiles.UiModeNightTileTest
97 batteryController, in setUp()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/
DKeyguardStatusBarViewModelTest.kt37 import com.android.systemui.statusbar.policy.batteryController
66 private val batteryController = kosmos.batteryController constant
90 batteryController, in setup()
158 verify(batteryController).addCallback(capture(captor)) in isBatteryCharging_matchesCallback()
185 verify(batteryController).addCallback(capture(captor)) in isBatteryCharging_unregistersWhenNotListening()
190 verify(batteryController).removeCallback(captor.value) in isBatteryCharging_unregistersWhenNotListening()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/battery/domain/interactor/
DBatterySaverTileDataInteractor.kt42 private val batteryController: BatteryController, in <lambda>() constant in com.android.systemui.qs.tiles.impl.battery.domain.interactor.BatterySaverTileDataInteractor
50 batteryController.isDevicePluggedIn().distinctUntilChanged().flowOn(bgCoroutineContext), in <lambda>()
51 batteryController in <lambda>()
55 batteryController.getBatteryLevel().distinctUntilChanged().flowOn(bgCoroutineContext), in <lambda>()
DBatterySaverTileUserActionInteractor.kt34 private val batteryController: BatteryController constant in com.android.systemui.qs.tiles.impl.battery.domain.interactor.BatterySaverTileUserActionInteractor
42 batteryController.setPowerSaveMode(!data.isPowerSaving, action.expandable) in handleInput()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/
DUiModeNightTileDataInteractorTest.kt59 private val batteryController = FakeBatteryController(LeakCheck()) constant in com.android.systemui.qs.tiles.impl.uimodenight.domain.UiModeNightTileDataInteractorTest
80 batteryController, in setup()
117 batteryController.setPowerSaveMode(true) in <lambda>()
143 batteryController.setPowerSaveMode(false) in <lambda>()
148 batteryController.setPowerSaveMode(true) in <lambda>()
150 batteryController.setPowerSaveMode(false) in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/
DUiModeNightTileDataInteractor.kt44 private val batteryController: BatteryController, constant in com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor.UiModeNightTileDataInteractor
71 batteryController.addCallback(batteryCallback) in tileData()
83 batteryController.removeCallback(batteryCallback) in tileData()
93 val powerSave = batteryController.isPowerSave in createModel()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ui/viewmodel/
DKeyguardStatusBarViewModel.kt53 batteryController: BatteryController, in <lambda>()
80 batteryController.addCallback(callback) in <lambda>()
81 awaitClose { batteryController.removeCallback(callback) } in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/charging/
DWiredChargingRippleController.kt55 private val batteryController: BatteryController, constant
89 pluggedIn = batteryController.isPluggedIn
103 if (batteryController.isPluggedInWireless || in registerCallbacks()
104 batteryController.isChargingSourceDock) { in registerCallbacks()
114 batteryController.addCallback(batteryStateChangeCallback) in registerCallbacks()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/charging/
DWiredChargingRippleControllerTest.kt56 @Mock private lateinit var batteryController: BatteryController variable in com.android.systemui.charging.WiredChargingRippleControllerTest
70 commandRegistry, batteryController, configurationController, in setUp()
84 verify(batteryController).addCallback(captor.capture()) in testTriggerRipple_UnlockedState()
161 `when`(batteryController.isChargingSourceDock).thenReturn(true) in testRipple_whenDocked_doesNotPlayRipple()
164 verify(batteryController).addCallback(captor.capture()) in testRipple_whenDocked_doesNotPlayRipple()
187 verify(batteryController).addCallback(captor.capture()) in testRipple_layoutsCorrectly()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/rotation/domain/interactor/
DRotationLockTileDataInteractorTest.kt55 private val batteryController = FakeBatteryController(LeakCheck()) constant
78 batteryController, in setup()
131 batteryController.setPowerSaveMode(true) in tileData_cameraRotationMatchesBatteryController()
135 batteryController.setPowerSaveMode(false) in tileData_cameraRotationMatchesBatteryController()
218 batteryController.setPowerSaveMode(false) in setupControllersToEnableCameraRotation()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/
DVisualInterruptionDecisionProviderTestUtil.kt41 batteryController: BatteryController, in createProviderByFlag()
65 batteryController, in createProviderByFlag()
89 batteryController, in createProviderByFlag()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBatteryControllerStartable.java50 BatteryController batteryController, in BatteryControllerStartable() argument
53 mBatteryController = batteryController; in BatteryControllerStartable()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/
DDozeServiceHostKosmos.kt30 import com.android.systemui.statusbar.policy.batteryController
46 batteryController, in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBatteryStateNotifierTest.kt47 @Mock private lateinit var batteryController: BatteryController variable in com.android.systemui.statusbar.policy.BatteryStateNotifierTest
58 notifier = BatteryStateNotifier(batteryController, noMan, executor, context) in setup()
/frameworks/base/packages/SystemUI/src/com/android/systemui/battery/
DBatteryMeterViewController.java144 BatteryController batteryController) { in BatteryMeterViewController() argument
153 mBatteryController = batteryController; in BatteryMeterViewController()
264 BatteryController batteryController in Factory() argument
272 mBatteryController = batteryController; in Factory()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/events/
DSystemEventCoordinator.kt48 private val batteryController: BatteryController, constant in com.android.systemui.statusbar.events.SystemEventCoordinator
61 batteryController.addCallback(batteryStateListener) in startObserving()
67 batteryController.removeCallback(batteryStateListener) in stopObserving()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DClockEventControllerTest.kt85 @Mock private lateinit var batteryController: BatteryController variable in com.android.keyguard.ClockEventControllerTest
144 batteryController, in setUp()
205 verify(batteryController).addCallback(capture(batteryCaptor)) in batteryCallback_keyguardShowingCharging_verifyChargeAnimation()
218 verify(batteryController).addCallback(capture(batteryCaptor)) in batteryCallback_keyguardShowingCharging_Duplicate_verifyChargeAnimation()
232 verify(batteryController).addCallback(capture(batteryCaptor)) in batteryCallback_keyguardHiddenCharging_verifyChargeAnimation()
245 verify(batteryController).addCallback(capture(batteryCaptor)) in batteryCallback_keyguardShowingNotCharging_verifyChargeAnimation()
463 verify(batteryController).removeCallback(any()) in unregisterListeners_validate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/rotation/domain/interactor/
DRotationLockTileDataInteractor.kt43 private val batteryController: BatteryController, in <lambda>() constant in com.android.systemui.qs.tiles.impl.rotation.domain.interactor.RotationLockTileDataInteractor
57 batteryController.isBatteryPowerSaveEnabled(), in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DUiModeNightTile.java82 BatteryController batteryController, in UiModeNightTile() argument
87 mBatteryController = batteryController; in UiModeNightTile()
91 batteryController.observe(getLifecycle(), this); in UiModeNightTile()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/events/
DSystemEventCoordinatorTest.kt53 @Mock lateinit var batteryController: BatteryController variable in com.android.systemui.statusbar.events.SystemEventCoordinatorTest
64 batteryController, in setup()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/
DBatteryControllerKosmos.kt23 val Kosmos.batteryController: BatteryController by Fixture { mock<BatteryController>() } in <lambda>() constant

12