Fix enhanced estimate discharge text showing while charging

In the PowerUsageAdvanced screen the text showing whether your time
remaining information is enhanced or not should not show when the
device is plugged in. This CL fixes a bug in that logic that would
show the text when it wasn't supposed to.

Test: robotests still pass, manual verification
Bug: 63176050
Change-Id: I33fb31671cd9c29aed20483301e51ae1ded1f1b6
This commit is contained in:
Salvador Martinez
2017-07-13 14:20:28 -07:00
parent a7f5953a02
commit 8ccb5a4698
7 changed files with 79 additions and 23 deletions

View File

@@ -35,8 +35,9 @@ public class BatteryHistoryPreference extends Preference {
private CharSequence mSummary;
private TextView mSummaryView;
private boolean hideSummary;
@VisibleForTesting
boolean hideSummary;
@VisibleForTesting
BatteryInfo mBatteryInfo;
@@ -56,8 +57,10 @@ public class BatteryHistoryPreference extends Preference {
public void setBottomSummary(CharSequence text) {
mSummary = text;
if (mSummaryView != null) {
mSummaryView.setVisibility(View.VISIBLE);
mSummaryView.setText(mSummary);
}
hideSummary = false;
}
public void hideBottomSummary() {