Home
last modified time | relevance | path

Searched refs:mBatteryController (Results 1 – 25 of 26) sorted by relevance

12

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBatteryControllerTest.java67 private BatteryControllerImpl mBatteryController; field in BatteryControllerTest
79 mBatteryController = new BatteryControllerImpl(getContext(), in setUp()
88 mBatteryController.init(); in setUp()
98 Assert.assertTrue(mBatteryController.mHasReceivedBattery); in testBatteryInitialized()
110 mBatteryController.onReceive(getContext(), intent); in testIndependentAODBatterySaver_true()
112 Assert.assertTrue(mBatteryController.isPowerSave()); in testIndependentAODBatterySaver_true()
113 Assert.assertTrue(mBatteryController.isAodPowerSave()); in testIndependentAODBatterySaver_true()
125 mBatteryController.onReceive(getContext(), intent); in testIndependentAODBatterySaver_false()
127 Assert.assertTrue(mBatteryController.isPowerSave()); in testIndependentAODBatterySaver_false()
128 Assert.assertFalse(mBatteryController.isAodPowerSave()); in testIndependentAODBatterySaver_false()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DBatteryControllerTest.java64 private BatteryController mBatteryController; field in BatteryControllerTest
102 mBatteryController = new BatteryController(mJobSchedulerService); in setUp()
129 synchronized (mBatteryController.mLock) { in setBatteryNotLow()
130 mBatteryController.onBatteryStateChangedLocked(); in setBatteryNotLow()
137 synchronized (mBatteryController.mLock) { in setCharging()
138 mBatteryController.onBatteryStateChangedLocked(); in setCharging()
145 synchronized (mBatteryController.mLock) { in setDischarging()
146 mBatteryController.onBatteryStateChangedLocked(); in setDischarging()
160 synchronized (mBatteryController.mLock) { in setUidBias()
161 mBatteryController.onUidBiasChangedLocked(uid, prevBias, bias); in setUidBias()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DBatterySaverTile.java53 private final BatteryController mBatteryController; field in BatterySaverTile
77 mBatteryController = batteryController; in BatterySaverTile()
78 mBatteryController.observe(getLifecycle(), this); in BatterySaverTile()
122 mBatteryController.clearLastPowerSaverStartView(); in handleSetListening()
136 mBatteryController.setPowerSaveMode(!mPowerSave, view); in handleClick()
DRotationLockTile.java68 private final BatteryController mBatteryController; field in RotationLockTile
91 mBatteryController = batteryController; in RotationLockTile()
105 mBatteryController.observe(getLifecycle(), this); in RotationLockTile()
144 final boolean powerSave = mBatteryController.isPowerSave(); in handleUpdateState()
DUiModeNightTile.java67 private final BatteryController mBatteryController; field in UiModeNightTile
85 mBatteryController = batteryController; in UiModeNightTile()
120 boolean powerSave = mBatteryController.isPowerSave(); in handleUpdateState()
/frameworks/base/packages/SystemUI/src/com/android/systemui/battery/
DBatteryMeterViewController.java51 private final BatteryController mBatteryController; field in BatteryMeterViewController
129 mBatteryController = batteryController; in BatteryMeterViewController()
131 mView.setBatteryEstimateFetcher(mBatteryController::getEstimatedTimeRemainingString); in BatteryMeterViewController()
142 mBatteryController.addCallback(mBatteryStateChangeCallback); in onViewAttached()
155 mBatteryController.removeCallback(mBatteryStateChangeCallback); in onViewDetached()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/
DBatteryMeterViewControllerTest.java66 private BatteryController mBatteryController; field in BatteryMeterViewControllerTest
96 verify(mBatteryController).addCallback(any()); in onViewAttached_callbacksRegistered()
110 verify(mBatteryController).removeCallback(any()); in onViewDetached_callbacksUnregistered()
162 mBatteryController in initController()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DLightBarController.java57 private final BatteryController mBatteryController; field in LightBarController
102 mBatteryController = batteryController; in LightBarController()
103 mBatteryController.addCallback(this); in LightBarController()
318 private final BatteryController mBatteryController; field in LightBarController.Factory
332 mBatteryController = batteryController; in Factory()
340 return new LightBarController(context, mDarkIconDispatcher, mBatteryController, in create()
DKeyguardStatusBarViewController.java101 private final BatteryController mBatteryController; field in KeyguardStatusBarViewController
292 mBatteryController = batteryController; in KeyguardStatusBarViewController()
404 mBatteryController.addCallback(mBatteryStateChangeCallback); in setBatteryListening()
406 mBatteryController.removeCallback(mBatteryStateChangeCallback); in setBatteryListening()
DDozeParameters.java84 private final BatteryController mBatteryController; field in DozeParameters
138 mBatteryController = batteryController; in DozeParameters()
267 return mDozeAlwaysOn && !mBatteryController.isAodPowerSave(); in getAlwaysOn()
DDozeServiceHost.java80 private final BatteryController mBatteryController; field in DozeServiceHost
121 mBatteryController = batteryController; in DozeServiceHost()
311 return mBatteryController.isAodPowerSave(); in isPowerSaveActive()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DDozeParametersTest.java78 @Mock private BatteryController mBatteryController; field in DozeParametersTest
122 mBatteryController, in setup()
134 verify(mBatteryController).addCallback(mBatteryStateChangeCallback.capture()); in setup()
179 when(mBatteryController.isAodPowerSave()).thenReturn(true); in testGetAlwaysOn_whenBatterySaver()
193 when(mBatteryController.isAodPowerSave()).thenReturn(true); in testGetAlwaysOn_whenBatterySaverCallback()
205 when(mBatteryController.isAodPowerSave()).thenReturn(false); in testGetAlwaysOn_whenBatterySaverCallback()
DKeyguardStatusBarViewControllerTest.java88 private BatteryController mBatteryController; field in KeyguardStatusBarViewControllerTest
153 mBatteryController, in createController()
228 verify(mBatteryController).addCallback(any()); in setBatteryListening_true_callbackAdded()
238 verify(mBatteryController).removeCallback(any()); in setBatteryListening_false_callbackRemoved()
246 verify(mBatteryController).addCallback(any()); in setBatteryListening_trueThenTrue_callbackAddedOnce()
DDozeServiceHostTest.java76 @Mock private BatteryController mBatteryController; field in DozeServiceHostTest
101 mBatteryController, mScrimController, () -> mBiometricUnlockController, in setup()
DCentralSurfacesImplTest.java236 @Mock private BatteryController mBatteryController; field in CentralSurfacesImplTest
344 mBatteryController, in setup()
467 mBatteryController, in setup()
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DFalsingCollectorImpl.java65 private final BatteryController mBatteryController; field in FalsingCollectorImpl
122 if (event == DockManager.STATE_NONE && !mBatteryController.isWirelessCharging()) {
151 mBatteryController = batteryController; in FalsingCollectorImpl()
166 mBatteryController.addCallback(mBatteryListener); in FalsingCollectorImpl()
369 mBatteryController.removeCallback(mBatteryListener); in cleanup()
DFalsingDataProvider.java49 private BatteryController mBatteryController; field in FalsingDataProvider
83 mBatteryController = batteryController; in FalsingDataProvider()
422 return mBatteryController.isWirelessCharging() || mDockManager.isDocked();
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/
DPowerNotificationWarningsTest.java81 private BatteryController mBatteryController; field in PowerNotificationWarningsTest
114 broadcastSender, () -> mBatteryController, mDialogLaunchAnimator, mUiEventLogger, in setUp()
224 when(mBatteryController.getLastPowerSaverStartView()) in testDialogStartedFromLauncher_viewVisible()
240 when(mBatteryController.getLastPowerSaverStartView()) in testDialogStartedNotFromLauncher_viewNotVisible()
257 when(mBatteryController.getLastPowerSaverStartView()).thenReturn(null); in testDialogShownNotFromLauncher()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/
DRotationLockTileTest.java85 private BatteryController mBatteryController; field in RotationLockTileTest
117 mBatteryController, in setUp()
134 when(mBatteryController.isPowerSave()).thenReturn(false); in setUp()
177 when(mBatteryController.isPowerSave()).thenReturn(true); in testSecondaryString_powerSaveEnabled_isEmpty()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
DClassifierTest.java41 private BatteryController mBatteryController; field in ClassifierTest
53 displayMetrics, mBatteryController, mFoldStateListener, mDockManager, false); in setup()
DFalsingCollectorImplTest.java77 private BatteryController mBatteryController; field in FalsingCollectorImplTest
92 mBatteryController, in setUp()
106 verify(mBatteryController).addCallback(batteryCallbackCaptor.capture()); in testNoProximityWhenWirelessCharging()
115 verify(mBatteryController).addCallback(batteryCallbackCaptor.capture()); in testProximityWhenOffWirelessCharging()
DFalsingDataProviderTest.java53 private BatteryController mBatteryController; field in FalsingDataProviderTest
288 when(mBatteryController.isWirelessCharging()).thenReturn(true); in test_isWirelessCharging()
384 mDisplayMetrics, mBatteryController, mFoldStateListener, mDockManager, foldable); in createWithFoldCapability()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/
DNotificationInterruptStateProviderImpl.java69 private final BatteryController mBatteryController; field in NotificationInterruptStateProviderImpl
125 mBatteryController = batteryController; in NotificationInterruptStateProviderImpl()
497 if (mBatteryController.isAodPowerSave()) { in shouldHeadsUpWhenDozing()
/frameworks/base/services/core/java/com/android/server/input/
DInputManagerService.java325 private final BatteryController mBatteryController; field in InputManagerService
434 mBatteryController = new BatteryController(mContext, mNative); in InputManagerService()
2693 mBatteryController.registerBatteryListener(deviceId, listener, Binder.getCallingPid()); in registerBatteryListener()
2699 mBatteryController.unregisterBatteryListener(deviceId, listener, Binder.getCallingPid()); in unregisterBatteryListener()
2716 mBatteryController.dump(pw, " " /*prefix*/); in dump()
2827 mBatteryController.monitor(); in monitor()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/
DNotificationInterruptStateProviderImplTest.java99 BatteryController mBatteryController; field in NotificationInterruptStateProviderImplTest
127 mBatteryController, in setup()

12