Update strings for summary tip.

1. Strings for the tip preference
2. Strings for the tip dialog

Change-Id: I59c371328ec735a0b22f707d440f3be85cf59c77
Fixes: 79171948
Test: Manual & RunSettingsRoboTests
This commit is contained in:
Lei Yu
2018-05-08 13:06:42 -07:00
parent 99902e1faf
commit adddc30c64
4 changed files with 20 additions and 31 deletions

View File

@@ -79,16 +79,8 @@ public class BatteryTipDialogFragment extends InstrumentedDialogFragment impleme
switch (mBatteryTip.getType()) {
case BatteryTip.TipType.SUMMARY:
final long averageTimeMs = ((SummaryTip) mBatteryTip).getAverageTimeMs();
final String message = context.getString(
averageTimeMs == Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN
? R.string.battery_tip_dialog_summary_message_no_estimation
: R.string.battery_tip_dialog_summary_message,
StringUtil.formatElapsedTime(context, averageTimeMs,
false /* withSeconds */));
return new AlertDialog.Builder(context)
.setMessage(message)
.setMessage(R.string.battery_tip_dialog_summary_message)
.setPositiveButton(android.R.string.ok, null)
.create();
case BatteryTip.TipType.HIGH_DEVICE_USAGE: