Refresh battery stats when the battery state or charge level changes.

This will keep them in sync. We still don't automatically update
the stats periodically, in case the user is investigating some
behavior. That's why we have a refresh button.

Bug: 7737824
Change-Id: I8a59cad6c72f540533b3526fc476260465c73492
This commit is contained in:
Amith Yamasani
2012-12-18 09:32:22 -08:00
parent c611de2dca
commit 8f716f66cf

View File

@@ -129,6 +129,8 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
String batterySummary = context.getResources().getString(
R.string.power_usage_level_and_status, batteryLevel, batteryStatus);
mBatteryStatusPref.setTitle(batterySummary);
mStats = null;
refreshStats();
}
}
};