Home
last modified time | relevance | path

Searched refs:mBatteryLevel (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DCachedBluetoothDeviceTest.java71 private int mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; field in CachedBluetoothDeviceTest
84 doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel(); in setUp()
110 mBatteryLevel = 10; in getConnectionSummary_testSingleProfileConnectDisconnect()
120 mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; in getConnectionSummary_testSingleProfileConnectDisconnect()
133 mBatteryLevel = 10; in getConnectionSummary_testMultipleProfileConnectDisconnect()
174 mBatteryLevel = 10; in getConnectionSummary_testSingleProfileActiveDeviceA2dp()
183 mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; in getConnectionSummary_testSingleProfileActiveDeviceA2dp()
206 mBatteryLevel = 10; in getConnectionSummary_shortSummary_returnShortSummary()
221 mBatteryLevel = 10; in getConnectionSummary_testA2dpBatteryInactive_returnBattery()
250 mBatteryLevel = 10; in getConnectionSummary_testA2dpBatteryInCall_returnBattery()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/
DBatterySavingStatsTest.java52 private int mBatteryLevel = 1_000_000_000; field in BatterySavingStatsTest.BatterySavingStatsTestable
65 return mBatteryLevel; in injectBatteryLevel()
70 return mBatteryLevel / 10; in injectBatteryPercent()
83 mBatteryLevel -= value; in drainBattery()
84 if (mBatteryLevel < 0) { in drainBattery()
85 mBatteryLevel = 0; in drainBattery()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/
DPowerUITest.java331 state.mBatteryLevel = 15; in testMaybeShowHybridWarning()
340 state.mBatteryLevel = 1; in testMaybeShowHybridWarning()
350 state.mBatteryLevel = 100; in testMaybeShowHybridWarning()
367 state.mBatteryLevel = 10; in testShouldShowHybridWarning_lowLevelWarning()
397 state.mBatteryLevel = 100; in testShouldShowHybridWarning_lowLevelWarning()
402 state.mBatteryLevel = 10; in testShouldShowHybridWarning_lowLevelWarning()
432 state.mBatteryLevel = 1; in testShouldShowHybridWarning_severeLevelWarning()
462 state.mBatteryLevel = 100; in testShouldShowHybridWarning_severeLevelWarning()
467 state.mBatteryLevel = 1; in testShouldShowHybridWarning_severeLevelWarning()
514 mPowerUI.mBatteryLevel = 10; in testRefreshEstimateIfNeeded_onlyQueriesEstimateOnBatteryLevelChangeOrNull()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
DPowerUI.java93 @VisibleForTesting int mBatteryLevel = 100; field in PowerUI
225 final int oldBatteryLevel = mBatteryLevel; in onReceive()
226 mBatteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 100); in onReceive()
240 int bucket = findBatteryLevelBucket(mBatteryLevel); in onReceive()
246 Slog.d(TAG, "level " + oldBatteryLevel + " --> " + mBatteryLevel); in onReceive()
254 mWarnings.update(mBatteryLevel, bucket, mScreenOffTime); in onReceive()
307 mCurrentBatteryStateSnapshot = new BatteryStateSnapshot(mBatteryLevel, isPowerSaverMode, in maybeShowBatteryWarningV2()
318 mCurrentBatteryStateSnapshot = new BatteryStateSnapshot(mBatteryLevel, isPowerSaverMode, in maybeShowBatteryWarningV2()
336 || mBatteryLevel != mLastBatteryStateSnapshot.getBatteryLevel()) { in refreshEstimateIfNeeded()
558 pw.println(Integer.toString(mBatteryLevel)); in dump()
[all …]
DPowerNotificationWarnings.java140 private int mBatteryLevel; field in PowerNotificationWarnings
194 mBatteryLevel = batteryLevel; in update()
500 if (DEBUG) Slog.d(TAG, "dismissing low battery warning: level=" + mBatteryLevel); in dismissLowBatteryWarning()
517 "show low battery warning: level=" + mBatteryLevel in showLowBatteryWarning()
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySaverStateMachine.java149 private int mBatteryLevel; field in BatterySaverStateMachine
279 return mBatteryLevel <= mDynamicPowerSavingsDisableThreshold; in isInDynamicLowZoneLocked()
486 final boolean levelChanged = mBatteryLevel != newLevel; in setBatteryStatus()
494 mBatteryLevel = newLevel; in setBatteryStatus()
561 } else if (mIsPowered && mBatteryLevel >= ADAPTIVE_AUTO_DISABLE_BATTERY_LEVEL) { in doAutoBatterySaverLocked()
689 && mBatteryLevel >= mSettingBatterySaverStickyAutoDisableThreshold; in updateStateLocked()
809 .format((double) mBatteryLevel / 100.0); in triggerStickyDisabledNotification()
913 pw.println(mBatteryLevel); in dump()
955 proto.write(BatterySaverStateMachineProto.BATTERY_LEVEL, mBatteryLevel); in dumpProto()
/frameworks/base/core/java/android/hardware/display/
DBrightnessChangeEvent.java206 private float mBatteryLevel; field in BrightnessChangeEvent.Builder
254 mBatteryLevel = batteryLevel; in setBatteryLevel()
306 mPackageName, mUserId, mLuxValues, mLuxTimestamps, mBatteryLevel, in build()
/frameworks/base/tests/SystemUIDemoModeController/src/com/example/android/demomodecontroller/
DDemoModeController.java153 if (batteryLevel != mBatteryLevel) { in onTouch()
154 mBatteryLevel = batteryLevel; in onTouch()
305 private int mBatteryLevel; // 0 - 100 field in DemoModeController
311 intent.putExtra("level", Integer.toString(mBatteryLevel));
/frameworks/base/packages/SystemUI/src/com/android/systemui/charging/
DWirelessChargingLayout.java62 final int mBatteryLevel = batteryLevel; in init() local
80 mPercentage.setText(NumberFormat.getPercentInstance().format(mBatteryLevel / 100f)); in init()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DKeyguardIndicationController.java115 private int mBatteryLevel; field in KeyguardIndicationController
372 .format(mBatteryLevel / 100f); in updateIndication()
511 .format(mBatteryLevel / 100f); in computePowerIndication()
580 pw.println(" mBatteryLevel: " + mBatteryLevel); in dump()
613 mBatteryLevel = status.level; in onRefreshBatteryInfo()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DBluetoothTile.java280 private int mBatteryLevel; field in BluetoothTile.BluetoothBatteryTileIcon
284 mBatteryLevel = batteryLevel; in BluetoothBatteryTileIcon()
294 mBatteryLevel, in getDrawable()
/frameworks/base/media/java/android/mtp/
DMtpDatabase.java89 private int mBatteryLevel; field in MtpDatabase
261 if (newLevel != mBatteryLevel) {
262 mBatteryLevel = newLevel;
733 outIntValue[0] = mBatteryLevel; in getDeviceProperty()
/frameworks/base/services/core/java/com/android/server/power/
DPowerManagerService.java359 private int mBatteryLevel; field in PowerManagerService
1745 mBatteryLevel = mBatteryManagerInternal.getBatteryLevel(); in updateIsPoweredLocked()
1753 + ", mBatteryLevel=" + mBatteryLevel); in updateIsPoweredLocked()
1785 mNotifier.onWirelessChargingStarted(mBatteryLevel, mForegroundProfile); in updateIsPoweredLocked()
1790 mBatterySaverStateMachine.setBatteryStatus(mIsPowered, mBatteryLevel, mBatteryLevelLow); in updateIsPoweredLocked()
2316 mBatteryLevelWhenDreamStarted = mBatteryLevel; in handleSandman()
2334 && mBatteryLevel < mBatteryLevelWhenDreamStarted in handleSandman()
2344 + "Battery level now: " + mBatteryLevel + "%."); in handleSandman()
2399 && mBatteryLevel < mDreamsBatteryLevelMinimumWhenNotPoweredConfig) { in canDreamLocked()
2404 && mBatteryLevel < mDreamsBatteryLevelMinimumWhenPoweredConfig) { in canDreamLocked()
[all …]