Add charging string V2 for settings
Apply charging string V2 for settings Bug: 328546483 Test: Manual test (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f3c97f60a966a8ec357ba4d15b19d9d7a04b34d) Merged-In: Ic68bf4231da81d865faa285bca97a929abe26a42 Change-Id: Ic68bf4231da81d865faa285bca97a929abe26a42
This commit is contained in:
@@ -88,6 +88,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