Merge "Fix cell stats did not increase due to rate limit in battery stats"
This commit is contained in:
@@ -155,6 +155,13 @@ public class BatteryStatsManagerTest{
|
|||||||
// removing data activity tracking.
|
// removing data activity tracking.
|
||||||
mCtsNetUtils.ensureWifiConnected();
|
mCtsNetUtils.ensureWifiConnected();
|
||||||
|
|
||||||
|
// There's rate limit to update mobile battery so if ConnectivityService calls
|
||||||
|
// BatteryStatsManager.reportMobileRadioPowerState when default network changed,
|
||||||
|
// the mobile stats might not be updated. But if the mobile update due to other
|
||||||
|
// reasons (plug/unplug, battery level change, etc) will be unaffected. Thus here
|
||||||
|
// dumps the battery stats to trigger a full sync of data.
|
||||||
|
executeShellCommand("dumpsys batterystats");
|
||||||
|
|
||||||
// Check cellular battery stats are updated.
|
// Check cellular battery stats are updated.
|
||||||
runAsShell(UPDATE_DEVICE_STATS,
|
runAsShell(UPDATE_DEVICE_STATS,
|
||||||
() -> assertStatsEventually(mBsm::getCellularBatteryStats,
|
() -> assertStatsEventually(mBsm::getCellularBatteryStats,
|
||||||
|
|||||||
Reference in New Issue
Block a user