/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | CachedBluetoothDeviceTest.java | 74 private int mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; field in CachedBluetoothDeviceTest 87 doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel(); in setUp() 113 mBatteryLevel = 10; in getConnectionSummary_testSingleProfileConnectDisconnect() 123 mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; in getConnectionSummary_testSingleProfileConnectDisconnect() 136 mBatteryLevel = 10; in getConnectionSummary_testMultipleProfileConnectDisconnect() 177 mBatteryLevel = 10; in getConnectionSummary_testSingleProfileActiveDeviceA2dp() 186 mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; in getConnectionSummary_testSingleProfileActiveDeviceA2dp() 209 mBatteryLevel = 10; in getConnectionSummary_shortSummary_returnShortSummary() 224 mBatteryLevel = 10; in getConnectionSummary_testA2dpBatteryInactive_returnBattery() 253 mBatteryLevel = 10; in getConnectionSummary_testA2dpBatteryInCall_returnBattery() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/ |
D | BatterySavingStatsTest.java | 52 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/ |
D | PowerUITest.java | 352 state.mBatteryLevel = 15; in testMaybeShowHybridWarning() 361 state.mBatteryLevel = 1; in testMaybeShowHybridWarning() 371 state.mBatteryLevel = 100; in testMaybeShowHybridWarning() 388 state.mBatteryLevel = 10; in testShouldShowHybridWarning_lowLevelWarning() 418 state.mBatteryLevel = 100; in testShouldShowHybridWarning_lowLevelWarning() 423 state.mBatteryLevel = 10; in testShouldShowHybridWarning_lowLevelWarning() 453 state.mBatteryLevel = 1; in testShouldShowHybridWarning_severeLevelWarning() 483 state.mBatteryLevel = 100; in testShouldShowHybridWarning_severeLevelWarning() 488 state.mBatteryLevel = 1; in testShouldShowHybridWarning_severeLevelWarning() 535 mPowerUI.mBatteryLevel = 10; in testRefreshEstimateIfNeeded_onlyQueriesEstimateOnBatteryLevelChangeOrNull() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/ |
D | PowerUI.java | 104 @VisibleForTesting int mBatteryLevel = 100; field in PowerUI 263 final int oldBatteryLevel = mBatteryLevel; in onReceive() 264 mBatteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 100); in onReceive() 278 int bucket = findBatteryLevelBucket(mBatteryLevel); in onReceive() 284 Slog.d(TAG, "level " + oldBatteryLevel + " --> " + mBatteryLevel); in onReceive() 292 mWarnings.update(mBatteryLevel, bucket, mScreenOffTime); in onReceive() 345 mCurrentBatteryStateSnapshot = new BatteryStateSnapshot(mBatteryLevel, isPowerSaverMode, in maybeShowBatteryWarningV2() 356 mCurrentBatteryStateSnapshot = new BatteryStateSnapshot(mBatteryLevel, isPowerSaverMode, in maybeShowBatteryWarningV2() 374 || mBatteryLevel != mLastBatteryStateSnapshot.getBatteryLevel()) { in refreshEstimateIfNeeded() 630 pw.println(Integer.toString(mBatteryLevel)); in dump() [all …]
|
D | PowerNotificationWarnings.java | 140 private int mBatteryLevel; field in PowerNotificationWarnings 194 mBatteryLevel = batteryLevel; in update() 502 if (DEBUG) Slog.d(TAG, "dismissing low battery warning: level=" + mBatteryLevel); in dismissLowBatteryWarning() 519 "show low battery warning: level=" + mBatteryLevel in showLowBatteryWarning()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessChangeEvent.java | 208 private float mBatteryLevel; field in BrightnessChangeEvent.Builder 256 mBatteryLevel = batteryLevel; in setBatteryLevel() 308 mPackageName, mUserId, mLuxValues, mLuxTimestamps, mBatteryLevel, in build()
|
/frameworks/base/services/core/java/com/android/server/power/batterysaver/ |
D | BatterySaverStateMachine.java | 148 private int mBatteryLevel; field in BatterySaverStateMachine 281 return mBatteryLevel <= mDynamicPowerSavingsDisableThreshold; in isInDynamicLowZoneLocked() 488 final boolean levelChanged = mBatteryLevel != newLevel; in setBatteryStatus() 496 mBatteryLevel = newLevel; in setBatteryStatus() 563 } else if (mIsPowered && mBatteryLevel >= ADAPTIVE_AUTO_DISABLE_BATTERY_LEVEL) { in doAutoBatterySaverLocked() 691 && mBatteryLevel >= mSettingBatterySaverStickyAutoDisableThreshold; in updateStateLocked() 926 pw.println(mBatteryLevel); in dump() 977 proto.write(BatterySaverStateMachineProto.BATTERY_LEVEL, mBatteryLevel); in dumpProto()
|
/frameworks/base/tests/SystemUIDemoModeController/src/com/example/android/demomodecontroller/ |
D | DemoModeController.java | 153 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/ |
D | WirelessChargingLayout.java | 62 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/ |
D | KeyguardIndicationController.java | 123 private int mBatteryLevel; field in KeyguardIndicationController 413 .format(mBatteryLevel / 100f); in updateIndication() 559 .format(mBatteryLevel / 100f); in computePowerIndication() 650 pw.println(" mBatteryLevel: " + mBatteryLevel); in dump() 688 mBatteryLevel = status.level; in onRefreshBatteryInfo()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
D | BluetoothTile.java | 278 private int mBatteryLevel; field in BluetoothTile.BluetoothBatteryTileIcon 282 mBatteryLevel = batteryLevel; in BluetoothBatteryTileIcon() 292 mBatteryLevel, in getDrawable()
|
/frameworks/base/media/java/android/mtp/ |
D | MtpDatabase.java | 98 private int mBatteryLevel; field in MtpDatabase 271 if (newLevel != mBatteryLevel) { 272 mBatteryLevel = newLevel; 746 outIntValue[0] = mBatteryLevel; in getDeviceProperty()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | PowerManagerService.java | 382 private int mBatteryLevel; field in PowerManagerService 1996 mBatteryLevel = mBatteryManagerInternal.getBatteryLevel(); 2004 + ", mBatteryLevel=" + mBatteryLevel); 2036 mNotifier.onWirelessChargingStarted(mBatteryLevel, mUserId); 2041 mBatterySaverStateMachine.setBatteryStatus(mIsPowered, mBatteryLevel, mBatteryLevelLow); 2706 mBatteryLevelWhenDreamStarted = mBatteryLevel; 2725 && mBatteryLevel < mBatteryLevelWhenDreamStarted 2735 + "Battery level now: " + mBatteryLevel + "%."); 2794 && mBatteryLevel < mDreamsBatteryLevelMinimumWhenNotPoweredConfig) { 2799 && mBatteryLevel < mDreamsBatteryLevelMinimumWhenPoweredConfig) { [all …]
|