/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/batterysaver/ |
D | BatterySaverStateMachineTest.java | 70 public int batteryLevel = 100; field in BatterySaverStateMachineTest.DevicePersistedState 93 mPersistedState.batteryLevel = level; in setBatteryLevel() 94 if (mPersistedState.batteryLevel <= Math.max(15, getLowPowerModeTriggerLevel())) { in setBatteryLevel() 97 && (mPersistedState.batteryLevel >= (getLowPowerModeTriggerLevel() + 5))) { in setBatteryLevel() 109 mTarget.setBatteryStatus(mPersistedState.powered, mPersistedState.batteryLevel, in pushBatteryStatus() 223 assertEquals(100, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 229 assertEquals(90, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 235 assertEquals(50, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 241 assertEquals(16, mPersistedState.batteryLevel); in testNoAutoBatterySaver() 249 assertEquals(15, mPersistedState.batteryLevel); in testNoAutoBatterySaver() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
D | BluetoothDeviceLayerDrawable.java | 53 int batteryLevel) { in createLayerDrawable() argument 54 return createLayerDrawable(context, resId, batteryLevel, 1 /*iconScale*/); in createLayerDrawable() 67 int batteryLevel, float iconScale) { in createLayerDrawable() argument 71 context.getColor(R.color.meter_background_color), batteryLevel); in createLayerDrawable() 85 drawable.setConstantState(context, resId, batteryLevel, iconScale); in createLayerDrawable() 90 public void setConstantState(Context context, int resId, int batteryLevel, float iconScale) { in setConstantState() argument 91 mState = new BluetoothDeviceLayerDrawableState(context, resId, batteryLevel, iconScale); in setConstantState() 108 public BatteryMeterDrawable(Context context, int frameColor, int batteryLevel) { in BatteryMeterDrawable() argument 118 setBatteryLevel(batteryLevel); in BatteryMeterDrawable() 140 int batteryLevel; field in BluetoothDeviceLayerDrawable.BluetoothDeviceLayerDrawableState [all …]
|
D | ThemedBatteryDrawable.kt | 88 private var batteryLevel = 0 in <lambda>() variable 184 val fillFraction = batteryLevel / 100f in <lambda>() 186 if (batteryLevel >= 95) in <lambda>() 230 if (batteryLevel <= Companion.CRITICAL_LEVEL && !charging) { in <lambda>() 317 batteryLevel = l in <lambda>() 318 levelColor = batteryColorForLevel(batteryLevel) in <lambda>() 323 return batteryLevel in <lambda>() 350 levelColor = batteryColorForLevel(batteryLevel) in <lambda>()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessChangeEvent.java | 59 public final float batteryLevel; field in BrightnessChangeEvent 106 int userId, float[] luxValues, long[] luxTimestamps, float batteryLevel, in BrightnessChangeEvent() argument 116 this.batteryLevel = batteryLevel; in BrightnessChangeEvent() 135 this.batteryLevel = other.batteryLevel; in BrightnessChangeEvent() 153 batteryLevel = source.readFloat(); in BrightnessChangeEvent() 187 dest.writeFloat(batteryLevel); in writeToParcel() 253 public Builder setBatteryLevel(float batteryLevel) { in setBatteryLevel() argument 254 mBatteryLevel = batteryLevel; in setBatteryLevel()
|
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/statusbar/car/ |
D | CarBatteryController.java | 147 int batteryLevel = intent.getIntExtra(BluetoothHeadsetClient.EXTRA_BATTERY_LEVEL, in onReceive() local 150 updateBatteryLevel(batteryLevel); in onReceive() 152 if (batteryLevel != INVALID_BATTERY_LEVEL && mBatteryViewHandler != null) { in onReceive() 174 private void updateBatteryLevel(int batteryLevel) { in updateBatteryLevel() argument 175 if (batteryLevel == INVALID_BATTERY_LEVEL) { in updateBatteryLevel() 183 switch (batteryLevel) { in updateBatteryLevel() 205 Log.d(TAG, "Battery level: " + batteryLevel + "; setting mLevel as: " + mLevel); in updateBatteryLevel() 235 int batteryLevel = featuresBundle.getInt(BluetoothHeadsetClient.EXTRA_BATTERY_LEVEL, in updateBatteryIcon() local 237 updateBatteryLevel(batteryLevel); in updateBatteryIcon()
|
/frameworks/base/services/core/java/com/android/server/ |
D | BatteryService.java | 361 && mHealthInfo.batteryLevel <= mLowBatteryWarningLevel in shouldSendBatteryLowLocked() 363 || mHealthInfo.batteryLevel > mLastLowBatteryWarningLevel); in shouldSendBatteryLowLocked() 370 if (mHealthInfo.batteryLevel > 0) { in shouldShutdownLocked() 458 dst.batteryLevel = src.batteryLevel; in copy() 474 && mHealthInfo.batteryLevel <= mCriticalBatteryLevel; in processValuesLocked() 495 mPlugType, mHealthInfo.batteryLevel, mHealthInfo.batteryTemperature, in processValuesLocked() 509 mHealthInfo.batteryLevel != mLastBatteryLevel || in processValuesLocked() 521 mChargeStartLevel = mHealthInfo.batteryLevel; in processValuesLocked() 528 mHealthInfo.batteryLevel); in processValuesLocked() 533 … if (mDischargeStartTime != 0 && mDischargeStartLevel != mHealthInfo.batteryLevel) { in processValuesLocked() [all …]
|
D | EventLogTags.logtags | 265 51500 idle_maintenance_window_start (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batter… 266 51501 idle_maintenance_window_finish (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batte…
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/charging/ |
D | WirelessChargingAnimation.java | 58 batteryLevel, Callback callback, boolean isDozing) { in WirelessChargingAnimation() argument 60 batteryLevel, callback, isDozing); in WirelessChargingAnimation() 68 @Nullable Looper looper, int batteryLevel, Callback callback, boolean isDozing) { in makeWirelessChargingAnimation() argument 69 return new WirelessChargingAnimation(context, looper, batteryLevel, callback, isDozing); in makeWirelessChargingAnimation() 103 public WirelessChargingView(Context context, @Nullable Looper looper, int batteryLevel, in WirelessChargingView() argument 106 mNextView = new WirelessChargingLayout(context, batteryLevel, isDozing); in WirelessChargingView()
|
D | WirelessChargingLayout.java | 47 public WirelessChargingLayout(Context context, int batteryLevel, boolean isDozing) { in WirelessChargingLayout() argument 49 init(context, null, batteryLevel, isDozing); in WirelessChargingLayout() 61 private void init(Context context, AttributeSet attrs, int batteryLevel, boolean isDozing) { in init() argument 62 final int mBatteryLevel = batteryLevel; in init() 79 if (batteryLevel != UNKNOWN_BATTERY_LEVEL) { in init()
|
/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,
|
D | PowerNotificationWarnings.java | 193 public void update(int batteryLevel, int bucket, long screenOffTime) { in update() argument 194 mBatteryLevel = batteryLevel; in update()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
D | BluetoothTile.java | 200 final int batteryLevel = lastDevice.getBatteryLevel(); in getSecondaryLabel() local 202 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in getSecondaryLabel() 205 Utils.formatPercentage(batteryLevel)); in getSecondaryLabel() 283 BluetoothBatteryTileIcon(int batteryLevel, float iconScale) { in BluetoothBatteryTileIcon() argument 284 mBatteryLevel = batteryLevel; in BluetoothBatteryTileIcon() 394 int batteryLevel = device.getBatteryLevel(); in updateItems() local 395 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in updateItems() 396 … item.icon = new BluetoothBatteryTileIcon(batteryLevel,1 /* iconScale */); in updateItems() 399 Utils.formatPercentage(batteryLevel)); in updateItems()
|
/frameworks/base/services/core/java/com/android/server/power/batterysaver/ |
D | BatterySavingStats.java | 287 final int batteryLevel = injectBatteryLevel(); in transitionStateLocked() local 304 endLastStateLocked(now, batteryLevel, batteryPercent); in transitionStateLocked() 305 startNewStateLocked(newState, now, batteryLevel, batteryPercent); in transitionStateLocked() 309 private void endLastStateLocked(long now, int batteryLevel, int batteryPercent) { in endLastStateLocked() argument 315 stat.endBatteryLevel = batteryLevel; in endLastStateLocked() 350 private void startNewStateLocked(int newState, long now, int batteryLevel, int batteryPercent) { in startNewStateLocked() argument 361 stat.startBatteryLevel = batteryLevel; in startNewStateLocked()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessTrackerTest.java | 275 assertEquals(Float.NaN, event.batteryLevel, 0.0); in testBrightnessEvent() 306 assertEquals(0.5, event.batteryLevel, FLOAT_DELTA); in testBrightnessFullPopulatedEvent() 451 assertEquals(1.0f, event.batteryLevel, FLOAT_DELTA); in testReadEvents() 469 assertEquals(0.5f, event.batteryLevel, FLOAT_DELTA); in testReadEvents() 566 assertEquals(0.3, event.batteryLevel, FLOAT_DELTA); in testWriteThenRead() 617 assertEquals(0.3, event.batteryLevel, FLOAT_DELTA); in testWritePrunesOldEvents() 661 assertEquals(event.batteryLevel, event2.batteryLevel, FLOAT_DELTA); in testParcelUnParcel() 679 assertEquals(event.batteryLevel, event2.batteryLevel, FLOAT_DELTA); in testParcelUnParcel()
|
/frameworks/native/services/batteryservice/include/batteryservice/ |
D | BatteryService.h | 48 int batteryLevel; member
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | CachedBluetoothDevice.java | 870 final int batteryLevel = getBatteryLevel(); in getConnectionSummary() local 871 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in getConnectionSummary() 874 com.android.settingslib.Utils.formatPercentage(batteryLevel); in getConnectionSummary() 978 final int batteryLevel = getBatteryLevel(); in getCarConnectionSummary() local 979 if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { in getCarConnectionSummary() 982 com.android.settingslib.Utils.formatPercentage(batteryLevel); in getCarConnectionSummary()
|
/frameworks/base/tests/SystemUIDemoModeController/src/com/example/android/demomodecontroller/ |
D | DemoModeController.java | 152 final int batteryLevel = (int)y / (h / 101); in onTouch() local 153 if (batteryLevel != mBatteryLevel) { in onTouch() 154 mBatteryLevel = batteryLevel; in onTouch()
|
/frameworks/base/services/core/java/com/android/server/statusbar/ |
D | StatusBarManagerInternal.java | 40 void showChargingAnimation(int batteryLevel); in showChargingAnimation() argument
|
D | StatusBarManagerService.java | 362 public void showChargingAnimation(int batteryLevel) { 365 mBar.showWirelessChargingAnimation(batteryLevel);
|
/frameworks/base/core/java/com/android/internal/statusbar/ |
D | IStatusBar.aidl | 38 void showWirelessChargingAnimation(int batteryLevel); in showWirelessChargingAnimation() argument
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | Notifier.java | 634 public void onWirelessChargingStarted(int batteryLevel, @UserIdInt int userId) { in onWirelessChargingStarted() argument 642 msg.arg1 = batteryLevel; in onWirelessChargingStarted() 813 private void showWirelessChargingStarted(int batteryLevel, @UserIdInt int userId) { in showWirelessChargingStarted() argument 816 mStatusBarManagerInternal.showChargingAnimation(batteryLevel); in showWirelessChargingStarted()
|
/frameworks/base/cmds/statsd/src/external/ |
D | ResourceHealthManagerPuller.cpp | 97 ptr->write(v.legacy.batteryLevel); in PullInternal()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | CommandQueue.java | 270 default void showWirelessChargingAnimation(int batteryLevel) { } in showWirelessChargingAnimation() argument 727 public void showWirelessChargingAnimation(int batteryLevel) { in showWirelessChargingAnimation() argument 729 mHandler.obtainMessage(MSG_SHOW_CHARGING_ANIMATION, batteryLevel, 0) in showWirelessChargingAnimation()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | BrightnessTracker.java | 551 out.attribute(null, ATTR_BATTERY_LEVEL, Float.toString(toWrite[i].batteryLevel)); in writeEventsLocked() 633 String batteryLevel = parser.getAttributeValue(null, ATTR_BATTERY_LEVEL); in readEventsLocked() local 634 builder.setBatteryLevel(Float.parseFloat(batteryLevel)); in readEventsLocked()
|
/frameworks/base/core/java/android/os/ |
D | BatteryStats.java | 1624 public byte batteryLevel; field in BatteryStats.HistoryItem 1845 | ((((int)batteryLevel)<<8)&0xff00) in writeToParcel() 1880 batteryLevel = (byte)((bat>>8)&0xff); in readFromParcel() 1924 batteryLevel = 0; in clear() 1956 batteryLevel = o.batteryLevel; in setToCommon() 1990 return batteryLevel == o.batteryLevel in sameNonEvent() 6346 if (rec.batteryLevel < 10) item.append("00"); in printNextItem() 6347 else if (rec.batteryLevel < 100) item.append("0"); in printNextItem() 6348 item.append(rec.batteryLevel); in printNextItem() 6362 if (oldLevel != rec.batteryLevel) { in printNextItem() [all …]
|