Update StringUtil#formatElapsedTime method (2/3)
- Update the usage and the test case - Update discharging string to follow new string doc Bug: 183689347 Test: make RunSettingsRoboTests Change-Id: I1e14e7da8cb02755d8cf6e12626a0d94fad87121
This commit is contained in:
committed by
Wesley Wang
parent
acacad4cdf
commit
50f314e45d
@@ -229,10 +229,18 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
||||
final long backgroundTimeMs = bundle.getLong(EXTRA_BACKGROUND_TIME);
|
||||
mForegroundPreference.setSummary(
|
||||
TextUtils.expandTemplate(getText(R.string.battery_used_for),
|
||||
StringUtil.formatElapsedTime(context, foregroundTimeMs, false)));
|
||||
StringUtil.formatElapsedTime(
|
||||
context,
|
||||
foregroundTimeMs,
|
||||
/* withSeconds */ false,
|
||||
/* collapseTimeUnit */ false)));
|
||||
mBackgroundPreference.setSummary(
|
||||
TextUtils.expandTemplate(getText(R.string.battery_active_for),
|
||||
StringUtil.formatElapsedTime(context, backgroundTimeMs, false)));
|
||||
StringUtil.formatElapsedTime(
|
||||
context,
|
||||
backgroundTimeMs,
|
||||
/* withSeconds */ false,
|
||||
/* collapseTimeUnit */ false)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user