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)) {
|
||||
return info.remainingLabel;
|
||||
}
|
||||
if (info.remainingLabel == null
|
||||
|| info.batteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
|
||||
if (info.batteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
|
||||
return info.statusLabel;
|
||||
}
|
||||
if (info.pluggedStatus == BatteryManager.BATTERY_PLUGGED_WIRELESS) {
|
||||
@@ -106,6 +105,9 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
||||
return wirelessChargingLabel;
|
||||
}
|
||||
}
|
||||
if (info.remainingLabel == null) {
|
||||
return info.statusLabel;
|
||||
}
|
||||
if (info.statusLabel != null && !info.discharging) {
|
||||
// Charging state
|
||||
if (com.android.settingslib.fuelgauge.BatteryUtils.isChargingStringV2Enabled()) {
|
||||
|
||||
Reference in New Issue
Block a user