Merge "Fix the charging string while charging wirelessly" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
87778221d3
@@ -92,8 +92,7 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
|||||||
&& mBatterySettingsFeatureProvider.isChargingOptimizationMode(mContext)) {
|
&& mBatterySettingsFeatureProvider.isChargingOptimizationMode(mContext)) {
|
||||||
return info.remainingLabel;
|
return info.remainingLabel;
|
||||||
}
|
}
|
||||||
if (info.remainingLabel == null
|
if (info.batteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
|
||||||
|| info.batteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
|
|
||||||
return info.statusLabel;
|
return info.statusLabel;
|
||||||
}
|
}
|
||||||
if (info.pluggedStatus == BatteryManager.BATTERY_PLUGGED_WIRELESS) {
|
if (info.pluggedStatus == BatteryManager.BATTERY_PLUGGED_WIRELESS) {
|
||||||
@@ -106,6 +105,9 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
|||||||
return wirelessChargingLabel;
|
return wirelessChargingLabel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (info.remainingLabel == null) {
|
||||||
|
return info.statusLabel;
|
||||||
|
}
|
||||||
if (info.statusLabel != null && !info.discharging) {
|
if (info.statusLabel != null && !info.discharging) {
|
||||||
// Charging state
|
// Charging state
|
||||||
if (com.android.settingslib.fuelgauge.BatteryUtils.isChargingStringV2Enabled()) {
|
if (com.android.settingslib.fuelgauge.BatteryUtils.isChargingStringV2Enabled()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user