Add ability to see both battery estimates on long press

If the enhanced estimate is being used in battery settings
it is now possible to long press on the text to have it display
both instead of the string that is normally used.

Adds another loader to enable this since it needs both the old
and the new estimates simultaneously.

Feature is hidden behind a feature flag that only googlers will
have enabled.

Test: robotests
Bug: 38399275
Change-Id: I5caf26513baada27efd50ddb0e72d3868da47150
This commit is contained in:
Salvador Martinez
2017-05-22 17:26:39 -07:00
parent fe23da579d
commit f4727ea07f
10 changed files with 229 additions and 24 deletions

View File

@@ -83,6 +83,7 @@ public class BatteryHeaderPreferenceControllerTest {
private BatteryMeterView mBatteryMeterView;
private TextView mTimeText;
private TextView mSummary;
private TextView mSummary2;
private LayoutPreference mBatteryLayoutPref;
private Intent mBatteryIntent;
private Lifecycle mLifecycle;
@@ -97,6 +98,7 @@ public class BatteryHeaderPreferenceControllerTest {
mTimeText = new TextView(mContext);
mSummary = new TextView(mContext);
ShadowEntityHeaderController.setUseMock(mEntityHeaderController);
mSummary2 = new TextView(mContext);
mBatteryIntent = new Intent();
mBatteryIntent.putExtra(BatteryManager.EXTRA_LEVEL, BATTERY_LEVEL);
@@ -113,7 +115,8 @@ public class BatteryHeaderPreferenceControllerTest {
mContext, mActivity, mPreferenceFragment, mLifecycle);
mController.mBatteryMeterView = mBatteryMeterView;
mController.mTimeText = mTimeText;
mController.mSummary = mSummary;
mController.mSummary1 = mSummary;
mController.mSummary2 = mSummary2;
}
@After