/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/ |
D | RemoteDevicesTest.java | 79 int batteryLevel = 10; in testUpdateBatteryLevel_normalSequence() local 85 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel); in testUpdateBatteryLevel_normalSequence() 87 verifyBatteryLevelChangedIntent(mDevice1, batteryLevel, mIntentArgument); in testUpdateBatteryLevel_normalSequence() 93 batteryLevel); in testUpdateBatteryLevel_normalSequence() local 96 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel); in testUpdateBatteryLevel_normalSequence() 100 batteryLevel = 15; in testUpdateBatteryLevel_normalSequence() 101 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel); in testUpdateBatteryLevel_normalSequence() 105 verifyBatteryLevelChangedIntent(mDevice1, batteryLevel, mIntentArgument); in testUpdateBatteryLevel_normalSequence() 109 batteryLevel); in testUpdateBatteryLevel_normalSequence() local 116 int batteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN; in testUpdateBatteryLevel_errorNegativeValue() local [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
D | RemoteDevices.java | 363 void setBatteryLevel(int batteryLevel) { in setBatteryLevel() argument 365 this.mBatteryLevel = batteryLevel; in setBatteryLevel() 405 void updateBatteryLevel(BluetoothDevice device, int batteryLevel) { in updateBatteryLevel() argument 406 if (device == null || batteryLevel < 0 || batteryLevel > 100) { in updateBatteryLevel() 408 + ", batteryLevel=" + String.valueOf(batteryLevel)); in updateBatteryLevel() 417 if (batteryLevel == currentBatteryLevel) { in updateBatteryLevel() 419 batteryLevel) + "%"); in updateBatteryLevel() 422 deviceProperties.setBatteryLevel(batteryLevel); in updateBatteryLevel() 424 sendBatteryLevelChangedBroadcast(device, batteryLevel); in updateBatteryLevel() 425 Log.d(TAG, "Updated device " + device + " battery level to " + batteryLevel + "%"); in updateBatteryLevel() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryHeaderPreferenceController.java | 112 mBatteryPercentText.setText(formatBatteryPercentageText(info.batteryLevel)); in updateHeaderPreference() 122 mBatteryMeterView.setBatteryLevel(info.batteryLevel); in updateHeaderPreference() 130 final int batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in quickUpdateHeaderPreference() local 135 mBatteryMeterView.setBatteryLevel(batteryLevel); in quickUpdateHeaderPreference() 138 mBatteryPercentText.setText(formatBatteryPercentageText(batteryLevel)); in quickUpdateHeaderPreference() 141 private CharSequence formatBatteryPercentageText(int batteryLevel) { in formatBatteryPercentageText() argument 143 NumberFormat.getIntegerInstance().format(batteryLevel)); in formatBatteryPercentageText()
|
D | BatteryBroadcastReceiver.java | 103 final String batteryLevel = Utils.getBatteryPercentage(intent); in updateBatteryStatus() local 108 } else if(!batteryLevel.equals(mBatteryLevel)) { in updateBatteryStatus() 113 mBatteryLevel = batteryLevel; in updateBatteryStatus()
|
D | BatteryInfo.java | 46 public int batteryLevel; field in BatteryInfo 82 lastLevel = record.batteryLevel; in bindHistory() 231 info.batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in getBatteryInfo() 232 info.batteryPercentString = Utils.formatPercentage(info.batteryLevel); in getBatteryInfo() 267 info.chargeLabel = info.batteryLevel == 100 ? info.batteryPercentString : in updateBatteryInfoCharging()
|
D | PowerUsageSummary.java | 168 percentRemaining.setText(Utils.formatPercentage(oldInfo.batteryLevel)); in updateViews() 182 batteryView.setBatteryLevel(oldInfo.batteryLevel); in updateViews()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | BatteryHeaderPreferenceController.java | 112 mBatteryPercentText.setText(formatBatteryPercentageText(info.batteryLevel)); in updateHeaderPreference() 122 mBatteryMeterView.setBatteryLevel(info.batteryLevel); in updateHeaderPreference() 130 final int batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in quickUpdateHeaderPreference() local 135 mBatteryMeterView.setBatteryLevel(batteryLevel); in quickUpdateHeaderPreference() 138 mBatteryPercentText.setText(formatBatteryPercentageText(batteryLevel)); in quickUpdateHeaderPreference() 141 private CharSequence formatBatteryPercentageText(int batteryLevel) { in formatBatteryPercentageText() argument 143 NumberFormat.getIntegerInstance().format(batteryLevel)); in formatBatteryPercentageText()
|
D | BatteryBroadcastReceiver.java | 103 final String batteryLevel = Utils.getBatteryPercentage(intent); in updateBatteryStatus() local 108 } else if(!batteryLevel.equals(mBatteryLevel)) { in updateBatteryStatus() 113 mBatteryLevel = batteryLevel; in updateBatteryStatus()
|
D | BatteryInfo.java | 44 public int batteryLevel; field in BatteryInfo 80 lastLevel = record.batteryLevel; in bindHistory() 228 info.batteryLevel = Utils.getBatteryLevel(batteryBroadcast); in getBatteryInfo() 229 info.batteryPercentString = Utils.formatPercentage(info.batteryLevel); in getBatteryInfo() 264 info.chargeLabel = info.batteryLevel == 100 ? info.batteryPercentString : in updateBatteryInfoCharging()
|
D | PowerUsageSummary.java | 153 percentRemaining.setText(Utils.formatPercentage(oldInfo.batteryLevel)); in updateViews() 167 batteryView.setBatteryLevel(oldInfo.batteryLevel); in updateViews()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | LowBatteryDetectorTest.java | 84 mBatteryInfo.batteryLevel = 3; in testDetect_lowBattery_tipNew() 88 mBatteryInfo.batteryLevel = 50; in testDetect_lowBattery_tipNew() 109 mBatteryInfo.batteryLevel = 50; in testDetect_timeEstimationZero_tipInvisible() 117 mBatteryInfo.batteryLevel = 100; in testDetect_noEarlyWarning_tipInvisible()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/ |
D | HighUsageDataParserTest.java | 49 mFirstItem.batteryLevel = 100; in setUp() 52 mSecondItem.batteryLevel = 95; in setUp() 55 mThirdItem.batteryLevel = 80; in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryBroadcastReceiverTest.java | 112 final String batteryLevel = Utils.getBatteryPercentage(mChargingIntent); in testOnReceive_batteryDataNotChanged_listenerNotInvoked() local 115 mBatteryBroadcastReceiver.mBatteryLevel = batteryLevel; in testOnReceive_batteryDataNotChanged_listenerNotInvoked() 120 assertThat(mBatteryBroadcastReceiver.mBatteryLevel).isEqualTo(batteryLevel); in testOnReceive_batteryDataNotChanged_listenerNotInvoked()
|
D | BatteryHeaderPreferenceControllerTest.java | 117 mBatteryInfo.batteryLevel = BATTERY_LEVEL; in setUp() 160 mBatteryInfo.batteryLevel = BATTERY_LEVEL; in updatePreference_updateBatteryInfo()
|
D | PowerUsageSummaryTest.java | 410 info1.batteryLevel = 10; in showBothEstimates() 415 info2.batteryLevel = 10; in showBothEstimates()
|
D | BatteryInfoTest.java | 266 record.batteryLevel = levels[count]; in mockBatteryStatsHistory()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | AdvancedBluetoothDetailsHeaderController.java | 206 final int batteryLevel = BluetoothUtils.getIntMetaData(bluetoothDevice, batteryMetaKey); in updateSubLayout() local 208 if (batteryLevel != BluetoothUtils.META_INT_ERROR) { in updateSubLayout() 211 imageView.setImageDrawable(createBtBatteryIcon(mContext, batteryLevel, charging)); in updateSubLayout() 214 textView.setText(com.android.settings.Utils.formatPercentage(batteryLevel)); in updateSubLayout()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | HighUsageDataParser.java | 57 mLastPeriodBatteryLevel = record.batteryLevel; in onDataPoint() 59 mEndBatteryLevel = record.batteryLevel; in onDataPoint()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/ |
D | HighUsageDataParser.java | 57 mLastPeriodBatteryLevel = record.batteryLevel; in onDataPoint() 59 mEndBatteryLevel = record.batteryLevel; in onDataPoint()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/ |
D | HeadsetPhoneState.java | 232 public void setCindBatteryCharge(int batteryLevel) { in setCindBatteryCharge() argument 233 if (mCindBatteryCharge != batteryLevel) { in setCindBatteryCharge() 234 mCindBatteryCharge = batteryLevel; in setCindBatteryCharge()
|
D | HeadsetService.java | 332 int batteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); 334 if (batteryLevel < 0 || scale <= 0) { 335 Log.e(TAG, "Bad Battery Changed intent: batteryLevel=" + batteryLevel 339 int cindBatteryLevel = Math.round(batteryLevel * 5 / ((float) scale));
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | AdvancedBluetoothDetailsHeaderControllerTest.java | 261 private void assertBatteryLevel(LinearLayout linearLayout, int batteryLevel) { in assertBatteryLevel() argument 264 com.android.settings.Utils.formatPercentage(batteryLevel)); in assertBatteryLevel()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | LowBatteryDetector.java | 49 final boolean lowBattery = mBatteryInfo.batteryLevel <= mWarningLevel in detect()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/ |
D | BluetoothAccessoryFragment.java | 300 final int batteryLevel = in onCharacteristicRead() local 307 batteryLevel)); in onCharacteristicRead()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/detectors/ |
D | LowBatteryDetector.java | 49 final boolean lowBattery = mBatteryInfo.batteryLevel <= mWarningLevel in detect()
|