public class WifiPowerEstimator extends PowerCalculator
Constructor and Description |
---|
WifiPowerEstimator(PowerProfile profile) |
Modifier and Type | Method and Description |
---|---|
void |
calculateApp(BatterySipper app,
BatteryStats.Uid u,
long rawRealtimeUs,
long rawUptimeUs,
int statsType)
Calculate the amount of power an app used for this subsystem.
|
void |
calculateRemaining(BatterySipper app,
BatteryStats stats,
long rawRealtimeUs,
long rawUptimeUs,
int statsType)
Calculate the remaining power that can not be attributed to an app.
|
void |
reset()
Reset any state maintained in this calculator.
|
public WifiPowerEstimator(PowerProfile profile)
public void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, long rawUptimeUs, int statsType)
PowerCalculator
calculateApp
in class PowerCalculator
app
- The BatterySipper that represents the power use of an app.u
- The recorded stats for the app.rawRealtimeUs
- The raw system realtime in microseconds.rawUptimeUs
- The raw system uptime in microseconds.statsType
- The type of stats. Can be BatteryStats.STATS_CURRENT
,
BatteryStats.STATS_SINCE_CHARGED
, or
BatteryStats.STATS_SINCE_UNPLUGGED
.public void calculateRemaining(BatterySipper app, BatteryStats stats, long rawRealtimeUs, long rawUptimeUs, int statsType)
PowerCalculator
calculateRemaining
in class PowerCalculator
app
- The BatterySipper that will represent this remaining power.stats
- The BatteryStats object from which to retrieve data.rawRealtimeUs
- The raw system realtime in microseconds.rawUptimeUs
- The raw system uptime in microseconds.statsType
- The type of stats. Can be BatteryStats.STATS_CURRENT
,
BatteryStats.STATS_SINCE_CHARGED
, or
BatteryStats.STATS_SINCE_UNPLUGGED
.public void reset()
PowerCalculator
reset
in class PowerCalculator