Fix robolectric error

Fixes: 144551238
Fixes: 144551930
Test: Robolectric
Change-Id: I33851ae2c4a06495f73e8db5d4df0992df5e7f3e
This commit is contained in:
Raff Tsai
2019-11-18 10:39:22 +08:00
parent 9096329b22
commit 4950d4cbc0
3 changed files with 6 additions and 18 deletions

View File

@@ -201,7 +201,8 @@ public class BatteryFixSlice implements CustomSliceable {
}
@WorkerThread
private static List<BatteryTip> refreshBatteryTips(Context context) {
@VisibleForTesting
static List<BatteryTip> refreshBatteryTips(Context context) {
final BatteryStatsHelperLoader statsLoader = new BatteryStatsHelperLoader(context);
final BatteryStatsHelper statsHelper = statsLoader.loadInBackground();
final BatteryTipLoader loader = new BatteryTipLoader(context, statsHelper);