/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/batterysaver/ |
D | BatterySaverStateMachineTest.java | 77 public int batteryLevel = 100; field in BatterySaverStateMachineTest.DevicePersistedState 100 mPersistedState.batteryLevel = level; in setBatteryLevel() 101 if (mPersistedState.batteryLevel <= Math.max(15, getLowPowerModeTriggerLevel())) { in setBatteryLevel() 104 && (mPersistedState.batteryLevel >= (getLowPowerModeTriggerLevel() + 5))) { in setBatteryLevel() 116 mTarget.setBatteryStatus(mPersistedState.powered, mPersistedState.batteryLevel, in pushBatteryStatus() 238 assertEquals(100, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 244 assertEquals(90, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 250 assertEquals(50, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 256 assertEquals(16, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 264 assertEquals(15, mPersistedState.batteryLevel); in testNoAutoBatterySaver() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
D | BluetoothDeviceLayerDrawable.java | 54 int batteryLevel) { in createLayerDrawable() argument 55 return createLayerDrawable(context, resId, batteryLevel, 1 /*iconScale*/); in createLayerDrawable() 68 int batteryLevel, float iconScale) { in createLayerDrawable() argument 72 context.getColor(R.color.meter_background_color), batteryLevel); in createLayerDrawable() 86 drawable.setConstantState(context, resId, batteryLevel, iconScale); in createLayerDrawable() 91 public void setConstantState(Context context, int resId, int batteryLevel, float iconScale) { in setConstantState() argument 92 mState = new BluetoothDeviceLayerDrawableState(context, resId, batteryLevel, iconScale); in setConstantState() 109 public BatteryMeterDrawable(Context context, int frameColor, int batteryLevel) { in BatteryMeterDrawable() argument 119 setBatteryLevel(batteryLevel); in BatteryMeterDrawable() 141 int batteryLevel; field in BluetoothDeviceLayerDrawable.BluetoothDeviceLayerDrawableState [all …]
|
D | ThemedBatteryDrawable.kt | 88 private var batteryLevel = 0 in <lambda>() variable 185 val fillFraction = batteryLevel / 100f in <lambda>() 187 if (batteryLevel >= 95) in <lambda>() 231 if (batteryLevel <= Companion.CRITICAL_LEVEL && !charging) { in <lambda>() 319 batteryLevel = l in <lambda>() 320 levelColor = batteryColorForLevel(batteryLevel) in <lambda>() 325 return batteryLevel in <lambda>() 352 levelColor = batteryColorForLevel(batteryLevel) in <lambda>()
|
/frameworks/base/packages/SettingsLib/tests/unit/src/com/android/settingslib/fuelgague/ |
D | BatteryStatusTest.kt | 66 val intent = createIntent(batteryLevel = level) in isLowBattery_20Percent_returnsTrue() 79 val intent = createIntent(batteryLevel = level) in isLowBattery_21Percent_returnsFalse() 91 val batteryChangedIntent = createIntent(batteryLevel = 10) in isSevereLowBattery_10Percent_returnsTrue() 98 val batteryChangedIntent = createIntent(batteryLevel = 11) in isSevereLowBattery_11Percent_returnFalse() 105 val batteryChangedIntent = createIntent(batteryLevel = 3) in isExtremeLowBattery_3Percent_returnsTrue() 112 val batteryChangedIntent = createIntent(batteryLevel = 4) in isExtremeLowBattery_4Percent_returnsFalse() 220 private val batteryLevel: Int, constant in com.android.settingslib.fuelgague.BatteryStatusTest.IsChargedTest 226 val batteryChangedIntent = createIntent(batteryLevel = batteryLevel, status = status) in isCharged_() 229 "failed by isCharged(Intent), status=$status, batteryLevel=$batteryLevel" in isCharged_() 233 assertWithMessage("failed by isCharged($status, $batteryLevel)") in isCharged_() [all …]
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessChangeEvent.java | 62 public final float batteryLevel; field in BrightnessChangeEvent 129 float batteryLevel, float powerBrightnessFactor, boolean nightMode, in BrightnessChangeEvent() argument 140 this.batteryLevel = batteryLevel; in BrightnessChangeEvent() 163 this.batteryLevel = other.batteryLevel; in BrightnessChangeEvent() 185 batteryLevel = source.readFloat(); in BrightnessChangeEvent() 223 dest.writeFloat(batteryLevel); in writeToParcel() 247 + ", batteryLevel: " + batteryLevel in toString() 327 public Builder setBatteryLevel(float batteryLevel) { in setBatteryLevel() argument 328 mBatteryLevel = batteryLevel; in setBatteryLevel()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/ |
D | BatteryStatus.java | 202 var batteryLevel = getBatteryLevel(level, scale); in isCharged() local 203 return isCharged(status, batteryLevel); in isCharged() 273 public static boolean isLowBattery(int batteryLevel) { in isLowBattery() argument 274 return batteryLevel <= LOW_BATTERY_THRESHOLD; in isLowBattery() 285 int batteryLevel = getBatteryLevel(batteryChangedIntent); in isSevereLowBattery() local 286 return isSevereLowBattery(batteryLevel); in isSevereLowBattery() 296 public static boolean isSevereLowBattery(int batteryLevel) { in isSevereLowBattery() argument 297 return batteryLevel <= SEVERE_LOW_BATTERY_THRESHOLD; in isSevereLowBattery() 318 public static boolean isExtremeLowBattery(int batteryLevel) { in isExtremeLowBattery() argument 319 return batteryLevel <= EXTREME_LOW_BATTERY_THRESHOLD; in isExtremeLowBattery()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/ |
D | BatteryStateSnapshot.kt | 10 val batteryLevel: Int, constant in com.android.systemui.power.BatteryStateSnapshot 35 batteryLevel: Int, 43 batteryLevel,
|
/frameworks/base/services/core/java/com/android/server/ |
D | BatteryService.java | 400 && mHealthInfo.batteryLevel <= mLowBatteryWarningLevel in shouldSendBatteryLowLocked() 402 || mHealthInfo.batteryLevel > mLastLowBatteryWarningLevel); in shouldSendBatteryLowLocked() 412 if (mHealthInfo.batteryLevel > 0) { in shouldShutdownLocked() 511 && mHealthInfo.batteryLevel <= mCriticalBatteryLevel; in processValuesLocked() 527 mHealthInfo.batteryLevel, in processValuesLocked() 549 || mHealthInfo.batteryLevel != mLastBatteryLevel in processValuesLocked() 563 mChargeStartLevel = mHealthInfo.batteryLevel; in processValuesLocked() 570 mHealthInfo.batteryLevel); in processValuesLocked() 575 … if (mDischargeStartTime != 0 && mDischargeStartLevel != mHealthInfo.batteryLevel) { in processValuesLocked() 579 mDischargeStartLevel, mHealthInfo.batteryLevel); in processValuesLocked() [all …]
|
/frameworks/base/services/core/java/com/android/server/health/ |
D | Utils.java | 44 dst.batteryLevel = src.batteryLevel; in copy() 72 dst.batteryLevel = src.batteryLevel; in copyV1Battery()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | BatteryStatsHistoryIteratorTest.java | 267 assertThat(item.batteryLevel).isEqualTo(90); in cpuSuspendHistoryEvents() 271 assertThat(item.batteryLevel).isEqualTo(90); in cpuSuspendHistoryEvents() 275 assertThat(item.batteryLevel).isEqualTo(90); in cpuSuspendHistoryEvents() 280 assertThat(item.batteryLevel).isEqualTo(80); in cpuSuspendHistoryEvents() 285 assertThat(item.batteryLevel).isEqualTo(80); in cpuSuspendHistoryEvents() 289 assertThat(item.batteryLevel).isEqualTo(80); in cpuSuspendHistoryEvents() 294 assertThat(item.batteryLevel).isEqualTo(79); in cpuSuspendHistoryEvents() 299 assertThat(item.batteryLevel).isEqualTo(79); in cpuSuspendHistoryEvents() 306 String tag, int uid, int voltageMv, int batteryChargeUah, int batteryLevel, in assertHistoryItem() argument 318 assertThat(item.batteryLevel).isEqualTo(batteryLevel); in assertHistoryItem()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/charging/ |
D | WirelessChargingAnimation.java | 61 int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing, in WirelessChargingAnimation() argument 64 transmittingBatteryLevel, batteryLevel, callback, isDozing, in WirelessChargingAnimation() 74 @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, in makeWirelessChargingAnimation() argument 78 batteryLevel, callback, isDozing, rippleShape, uiEventLogger); in makeWirelessChargingAnimation() 125 int transmittingBatteryLevel, int batteryLevel, Callback callback, in WirelessChargingView() argument 128 mNextView = new WirelessChargingLayout(context, transmittingBatteryLevel, batteryLevel, in WirelessChargingView()
|
D | WirelessChargingLayout.java | 55 WirelessChargingLayout(Context context, int transmittingBatteryLevel, int batteryLevel, in WirelessChargingLayout() argument 58 init(context, null, transmittingBatteryLevel, batteryLevel, isDozing, rippleShape); in WirelessChargingLayout() 76 int batteryLevel, boolean isDozing, RippleShape rippleShape) { in init() argument 91 if (batteryLevel != WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL) { in init() 92 percentage.setText(NumberFormat.getPercentInstance().format(batteryLevel / 100f)); in init()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/battery/unified/ |
D | BatteryFillDrawable.kt | 71 var batteryLevel = 0 in <lambda>() variable 142 if (batteryLevel == 0) { in <lambda>() 161 if (batteryLevel == 100) { in <lambda>() 164 val fillFraction = batteryLevel / 100f in <lambda>()
|
D | BatteryPercentTextOnlyDrawable.kt | 46 var batteryLevel: Int = 100 in <lambda>() variable 53 private var percentText = "$batteryLevel" in <lambda>()
|
D | BatterySpaceSharingPercentTextDrawable.kt | 42 var batteryLevel: Int = 88 in <lambda>() variable 49 private var percentText = "$batteryLevel" in <lambda>()
|
D | BatteryLayersDrawable.kt | 102 fill.batteryLevel = new.level in handleUpdateState() 103 textOnly.batteryLevel = new.level in handleUpdateState() 104 spaceSharingText.batteryLevel = new.level in handleUpdateState()
|
/frameworks/base/services/core/java/com/android/server/power/batterysaver/ |
D | BatterySavingStats.java | 298 final int batteryLevel = injectBatteryLevel(); in transitionStateLocked() local 331 endLastStateLocked(now, batteryLevel, batteryPercent); in transitionStateLocked() 332 startNewStateLocked(newState, now, batteryLevel, batteryPercent); in transitionStateLocked() 336 private void endLastStateLocked(long now, int batteryLevel, int batteryPercent) { 342 stat.endBatteryLevel = batteryLevel; 377 private void startNewStateLocked(int newState, long now, int batteryLevel, int batteryPercent) { 388 stat.startBatteryLevel = batteryLevel;
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/events/ |
D | SystemEventCoordinator.kt | 76 fun notifyPluggedIn(@IntRange(from = 0, to = 100) batteryLevel: Int) { in notifyPluggedIn() 77 scheduler.onStatusEvent(BatteryEvent(batteryLevel)) in notifyPluggedIn() 122 private fun notifyListeners(@IntRange(from = 0, to = 100) batteryLevel: Int) { in notifyListeners() 124 if (plugged) notifyPluggedIn(batteryLevel) in notifyListeners()
|
D | StatusEvent.kt | 79 class BatteryEvent(@IntRange(from = 0, to = 100) val batteryLevel: Int) : StatusEvent { constant in BatteryEvent 88 setBatteryLevel(batteryLevel) in context()
|
/frameworks/base/nfc/java/android/nfc/ |
D | WlcListenerDeviceInfo.java | 74 public WlcListenerDeviceInfo(int productId, double temperature, double batteryLevel, in WlcListenerDeviceInfo() argument 78 this.mBatteryLevel = batteryLevel; in WlcListenerDeviceInfo()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | BatteryStatusChip.kt | 62 fun setBatteryLevel(@IntRange(from = 0, to = 100) batteryLevel: Int) { in setBatteryLevel() 64 batteryMeterView.onBatteryLevelChanged(batteryLevel, true) in setBatteryLevel()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
D | BluetoothTile.java | 263 int batteryLevel = getMetadataBatteryLevel(device); in getSecondaryLabel() local 264 if (batteryLevel > BluetoothUtils.META_INT_ERROR) { in getSecondaryLabel() 268 batteryLevel = device.getMinBatteryLevelWithMemberDevices(); in getSecondaryLabel() 271 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in getSecondaryLabel() 274 Utils.formatPercentage(batteryLevel)); in getSecondaryLabel()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | CachedBluetoothDevice.java | 728 .filter(batteryLevel -> batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) in getMinBatteryLevelWithMemberDevices() 747 final int batteryLevel = getMinBatteryLevelWithMemberDevices(); in getValidMinBatteryLevelWithMemberDevices() local 748 return batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN in getValidMinBatteryLevelWithMemberDevices() 749 ? com.android.settingslib.Utils.formatPercentage(batteryLevel) in getValidMinBatteryLevelWithMemberDevices() 1602 private boolean isBatteryLow(int batteryLevel, int metadataKey) { in isBatteryLow() argument 1607 return batteryLevel <= lowBatteryThreshold; in isBatteryLow() 1638 .filter(batteryLevel -> batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) in getLeftBatteryLevel() 1657 .filter(batteryLevel -> batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) in getRightBatteryLevel() 1746 final int batteryLevel = getMinBatteryLevelWithMemberDevices(); in getCarConnectionSummary() local 1747 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in getCarConnectionSummary() [all …]
|
/frameworks/native/services/batteryservice/include/batteryservice/ |
D | BatteryService.h | 54 int batteryLevel; member
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/logging/ |
D | KeyguardLogger.kt | 185 batteryLevel: Int, in logRefreshBatteryInfo() 195 int1 = batteryLevel in logRefreshBatteryInfo()
|