Make utility methods static.

BatteryUtils.convertUsToMs and .convertMsToUs should be static, and now
they are.

Bug: 63347148
Test: make RunSettingsRoboTests
Change-Id: If652e2d3e1260df9a933805d7da670fbb26b2c25
This commit is contained in:
Alex Kulesza
2017-07-05 17:43:11 -04:00
parent 6d50576496
commit 43d4fefb36
6 changed files with 16 additions and 21 deletions

View File

@@ -46,8 +46,7 @@ public class DebugEstimatesLoader extends AsyncLoader<List<BatteryInfo>> {
FeatureFactory.getFactory(context).getPowerUsageFeatureProvider(context);
// get stuff we'll need for both BatteryInfo
BatteryUtils batteryUtils = BatteryUtils.getInstance(context);
final long elapsedRealtimeUs = batteryUtils.convertMsToUs(SystemClock.elapsedRealtime());
final long elapsedRealtimeUs = BatteryUtils.convertMsToUs(SystemClock.elapsedRealtime());
Intent batteryBroadcast = getContext().registerReceiver(null,
new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
BatteryStats stats = mStatsHelper.getStats();
@@ -55,7 +54,7 @@ public class DebugEstimatesLoader extends AsyncLoader<List<BatteryInfo>> {
BatteryInfo oldinfo = BatteryInfo.getBatteryInfoOld(getContext(), batteryBroadcast,
stats, elapsedRealtimeUs, false);
final long timeRemainingEnhanced = batteryUtils.convertMsToUs(
final long timeRemainingEnhanced = BatteryUtils.convertMsToUs(
powerUsageFeatureProvider.getEnhancedBatteryPrediction(getContext()));
BatteryInfo newinfo = BatteryInfo.getBatteryInfo(getContext(), batteryBroadcast, stats,
elapsedRealtimeUs, false, timeRemainingEnhanced, true);