Add BatteryMeterView in Settings

1. Show gauge icon at the top of battery main page instead of
battery usage graph.
2. Move the click action from battery usage graph to gauge icon.

Bug: 34387464
Test: RunSettingsRoboTest

Change-Id: Ib182619d6805b401cde03a50e2ae907cf4df7b94
This commit is contained in:
jackqdyulei
2017-02-02 11:25:15 -08:00
parent 3fca717d3b
commit 51967c0e6a
15 changed files with 366 additions and 38 deletions

View File

@@ -72,7 +72,7 @@ public abstract class PowerUsageBase extends DashboardFragment {
@Override
public void onResume() {
super.onResume();
BatteryStatsHelper.dropFile(getActivity(), BatteryHistoryPreference.BATTERY_HISTORY_FILE);
BatteryStatsHelper.dropFile(getActivity(), BatteryHistoryDetail.BATTERY_HISTORY_FILE);
updateBatteryStatus(getActivity().registerReceiver(mBatteryInfoReceiver,
new IntentFilter(Intent.ACTION_BATTERY_CHANGED)));
if (mHandler.hasMessages(MSG_REFRESH_STATS)) {