Home
last modified time | relevance | path

Searched refs:mBatteryListener (Results 1 – 2 of 2) sorted by relevance

/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryBroadcastReceiver.java82 private OnBatteryChangedListener mBatteryListener; field in BatteryBroadcastReceiver
95 mBatteryListener = lsn; in setBatteryChangedListener()
112 if (intent != null && mBatteryListener != null) { in updateBatteryStatus()
120 mBatteryListener.onBatteryChanged(BatteryUpdateType.BATTERY_NOT_PRESENT); in updateBatteryStatus()
122 mBatteryListener.onBatteryChanged(BatteryUpdateType.MANUAL); in updateBatteryStatus()
124 mBatteryListener.onBatteryChanged(BatteryUpdateType.BATTERY_HEALTH); in updateBatteryStatus()
126 mBatteryListener.onBatteryChanged(BatteryUpdateType.BATTERY_LEVEL); in updateBatteryStatus()
128 mBatteryListener.onBatteryChanged(BatteryUpdateType.BATTERY_STATUS); in updateBatteryStatus()
134 mBatteryListener.onBatteryChanged(BatteryUpdateType.BATTERY_SAVER); in updateBatteryStatus()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryBroadcastReceiverTest.java56 private BatteryBroadcastReceiver.OnBatteryChangedListener mBatteryListener; field in BatteryBroadcastReceiverTest
70 mBatteryBroadcastReceiver.setBatteryChangedListener(mBatteryListener); in setUp()
90 verify(mBatteryListener).onBatteryChanged(BatteryUpdateType.BATTERY_LEVEL); in testOnReceive_batteryLevelChanged_dataUpdated()
104 verify(mBatteryListener).onBatteryChanged(BatteryUpdateType.BATTERY_HEALTH); in testOnReceive_batteryHealthChanged_dataUpdated()
116 verify(mBatteryListener).onBatteryChanged(BatteryUpdateType.BATTERY_NOT_PRESENT); in onReceive_batteryNotPresent_shouldShowHelpMessage()
127 verify(mBatteryListener).onBatteryChanged(BatteryUpdateType.BATTERY_SAVER); in testOnReceive_powerSaveModeChanged_listenerInvoked()
147 verify(mBatteryListener, never()).onBatteryChanged(anyInt()); in testOnReceive_batteryDataNotChanged_listenerNotInvoked()
167 verify(mBatteryListener, times(2)).onBatteryChanged(BatteryUpdateType.MANUAL); in testRegister_updateBatteryStatus()