Add charging string V2 for settings
Apply charging string V2 for settings Bug: 328546483 Test: Manual test Change-Id: Ic68bf4231da81d865faa285bca97a929abe26a42
This commit is contained in:
@@ -86,6 +86,14 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
||||
return info.statusLabel;
|
||||
} else if (info.statusLabel != null && !info.discharging) {
|
||||
// Charging state
|
||||
if (com.android.settingslib.fuelgauge.BatteryUtils.isChargingStringV2Enabled()) {
|
||||
return info.isFastCharging
|
||||
? mContext.getString(
|
||||
R.string.battery_state_and_duration,
|
||||
info.statusLabel,
|
||||
info.remainingLabel)
|
||||
: info.remainingLabel;
|
||||
}
|
||||
return mContext.getString(
|
||||
R.string.battery_state_and_duration, info.statusLabel, info.remainingLabel);
|
||||
} else if (mPowerManager.isPowerSaveMode()) {
|
||||
|
Reference in New Issue
Block a user