Home
last modified time | relevance | path

Searched refs:getBatteryLevel (Results 1 – 25 of 28) sorted by relevance

12

/aosp12/packages/apps/Settings/src/com/android/settings/fuelgauge/
H A DBatteryMeterView.java78 public int getBatteryLevel() { in getBatteryLevel() method in BatteryMeterView
79 return mDrawable.getBatteryLevel(); in getBatteryLevel()
93 final int level = mDrawable.getBatteryLevel(); in updateColorFilter()
H A DBatteryHeaderPreferenceController.java160 final int batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in quickUpdateHeaderPreference()
H A DBatteryInfo.java242 info.batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in getBatteryInfo()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
H A DRemoteDevicesTest.java95 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testUpdateBatteryLevel_normalSequence()
111 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testUpdateBatteryLevel_normalSequence()
179 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testResetBatteryLevel_testResetAfterUpdate()
193 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testResetBatteryLevel_testResetAfterUpdate()
227 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testResetBatteryLevelOnHeadsetStateChange()
243 Assert.assertEquals(mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), in testResetBatteryLevelOnHeadsetStateChange()
273 mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel()); in testResetBatteryLevel_testAclStateChangeCallback()
294 mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel()); in testResetBatteryLevel_testAclStateChangeCallback()
/aosp12/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
H A DPowerMetricsCollector.java117 mInitialBatteryLevel = mCurrentBatteryLevel = getBatteryLevel(intent);
153 mCurrentBatteryLevel = getBatteryLevel(intent);
170 private float getBatteryLevel(Intent intent) {
/aosp12/frameworks/base/core/java/android/os/
H A DBatteryManagerInternal.java47 public abstract int getBatteryLevel(); in getBatteryLevel() method in BatteryManagerInternal
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
H A DPowerUI.java375 || mBatteryLevel != mLastBatteryStateSnapshot.getBatteryLevel()) { in refreshEstimateIfNeeded()
393 if (currentSnapshot.getBatteryLevel() >= CHARGE_CYCLE_PERCENT_RESET in maybeShowHybridWarning()
412 || currentSnapshot.getBatteryLevel() in maybeShowHybridWarning()
452 || snapshot.getBatteryLevel() <= snapshot.getLowLevelThreshold()); in shouldShowHybridWarning()
458 || snapshot.getBatteryLevel() <= snapshot.getSevereLevelThreshold()); in shouldShowHybridWarning()
H A DPowerNotificationWarnings.java258 .format((double) mCurrentBatterySnapshot.getBatteryLevel() / 100.0); in showWarningNotification()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
H A DBatteryMeterViewTest.java72 assertThat(mDrawable.getBatteryLevel()).isEqualTo(BATTERY_LEVEL); in testSetBatteryInfo_setCorrectly()
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
H A DCachedBluetoothDevice.java524 public int getBatteryLevel() { in getBatteryLevel() method in CachedBluetoothDevice
525 return mDevice.getBatteryLevel(); in getBatteryLevel()
984 final int batteryLevel = getBatteryLevel(); in getConnectionSummary()
1097 final int batteryLevel = getBatteryLevel(); in getCarConnectionSummary()
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/graph/
H A DBluetoothDeviceLayerDrawableTest.java81 assertThat(batteryDrawable.getBatteryLevel()).isEqualTo(BATTERY_LEVEL); in testBatteryMeterDrawable_configCorrect()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
H A DBluetoothTile.java210 final int batteryLevel = lastDevice.getBatteryLevel(); in getSecondaryLabel()
404 int batteryLevel = device.getBatteryLevel(); in updateItems()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
H A DRemoteDevices.java395 int getBatteryLevel() { in getBatteryLevel() method in RemoteDevices.DeviceProperties
458 int currentBatteryLevel = deviceProperties.getBatteryLevel(); in updateBatteryLevel()
485 if (deviceProperties.getBatteryLevel() == BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in resetBatteryLevel()
H A DAdapterService.java2175 public int getBatteryLevel(BluetoothDevice device, AttributionSource attributionSource) { in getBatteryLevel() method in AdapterService.AdapterServiceBinder
2188 return deviceProp.getBatteryLevel(); in getBatteryLevel()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
H A DAdvancedBluetoothDetailsHeaderControllerTest.java112 assertThat(iconDrawable.getBatteryLevel()).isEqualTo(BATTERY_LEVEL_MAIN); in createBatteryIcon_hasCorrectInfo()
148 when(mBluetoothDevice.getBatteryLevel()).thenReturn(BluetoothDevice.BATTERY_LEVEL_UNKNOWN); in refresh_connectedWatch_unknownBatteryLevel_shouldNotShowBatteryLevel()
/aosp12/frameworks/base/services/core/java/com/android/server/power/batterysaver/
H A DBatterySavingStats.java277 return bmi.getBatteryLevel(); in injectBatteryPercent()
/aosp12/system/bt/binder/android/bluetooth/
H A DIBluetooth.aidl142 int getBatteryLevel(in BluetoothDevice device, in AttributionSource attributionSource); in getBatteryLevel() method
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/
H A DThemedBatteryDrawable.kt323 public fun getBatteryLevel(): Int {
H A DBatteryMeterDrawableBase.java204 public int getBatteryLevel() { in getBatteryLevel() method in BatteryMeterDrawableBase
/aosp12/frameworks/base/core/java/android/bluetooth/
H A DBluetoothDevice.java1403 public int getBatteryLevel() { in getBatteryLevel() method in BluetoothDevice
1410 return service.getBatteryLevel(this, mAttributionSource); in getBatteryLevel()
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
H A DUtils.java181 public static int getBatteryLevel(Intent batteryChangedIntent) { in getBatteryLevel() method in Utils
/aosp12/packages/apps/Settings/src/com/android/settings/bluetooth/
H A DAdvancedBluetoothDetailsHeaderController.java299 int level = bluetoothDevice.getBatteryLevel(); in updateSubLayout()
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
H A DCachedBluetoothDeviceTest.java98 doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel(); in setUp()
/aosp12/packages/apps/Settings/src/com/android/settings/
H A DUtils.java302 return formatPercentage(getBatteryLevel(batteryChangedIntent)); in getBatteryPercentage()
/aosp12/frameworks/base/services/core/java/com/android/server/
H A DBatteryService.java1354 public int getBatteryLevel() { in getBatteryLevel() method in BatteryService.LocalService

12