diff --git a/res/values/strings.xml b/res/values/strings.xml index 00748369ab5..6ae57ca80b1 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4924,9 +4924,7 @@ Mobile network scanning - App usage since full charge (^1) - - Device usage since full charge (^1) + Battery usage since full charge %1$s left (New ML est) @@ -5031,11 +5029,11 @@ Battery may run out soon - Your phone has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps since last full charge(%2$s): + Your phone has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps you used since full charge: - Your tablet has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps since last full charge(%2$s): + Your tablet has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps you used since full charge: - Your device has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps since last full charge(%2$s): + Your device has been used more than usual. Your battery may run out sooner than expected.\n\nTop %1$d apps you used since full charge: Restrict %1$d app diff --git a/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java b/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java index b5b98c3575c..01770a2644d 100644 --- a/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java +++ b/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java @@ -193,14 +193,7 @@ public class BatteryAppListPreferenceController extends AbstractPreferenceContro } mBatteryStatsHelper = statsHelper; - final long lastFullChargeTime = mBatteryUtils.calculateLastFullChargeTime( - mBatteryStatsHelper, System.currentTimeMillis()); - final CharSequence timeSequence = StringUtil.formatRelativeTime(mContext, - lastFullChargeTime, - false); - final int resId = showAllApps ? R.string.power_usage_list_summary_device - : R.string.power_usage_list_summary; - mAppListGroup.setTitle(TextUtils.expandTemplate(mContext.getText(resId), timeSequence)); + mAppListGroup.setTitle(R.string.power_usage_list_summary); final PowerProfile powerProfile = statsHelper.getPowerProfile(); final BatteryStats stats = statsHelper.getStats(); diff --git a/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragment.java b/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragment.java index ac6d6229e3b..3870e72d181 100644 --- a/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragment.java +++ b/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragment.java @@ -94,10 +94,7 @@ public class BatteryTipDialogFragment extends InstrumentedDialogFragment impleme return new AlertDialog.Builder(context) .setMessage(getString(R.string.battery_tip_dialog_message, - highUsageTip.getHighUsageAppList().size(), - StringUtil.formatRelativeTime(context, - highUsageTip.getLastFullChargeTimeMs(), - false /* withSeconds */))) + highUsageTip.getHighUsageAppList().size())) .setView(view) .setPositiveButton(android.R.string.ok, null) .create(); diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragmentTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragmentTest.java index 7a41921789d..a02bdc2aa52 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragmentTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipDialogFragmentTest.java @@ -113,7 +113,7 @@ public class BatteryTipDialogFragmentTest { ShadowAlertDialog shadowDialog = shadowOf(dialog); assertThat(shadowDialog.getMessage()).isEqualTo( - mContext.getString(R.string.battery_tip_dialog_message, 1, "60 minutes ago")); + mContext.getString(R.string.battery_tip_dialog_message, 1)); } @Test