Merge "Remove context from powerUsageFeatureProvider" into main

This commit is contained in:
Chaohui Wang
2023-07-14 08:36:27 +00:00
committed by Android (Google) Code Review
22 changed files with 49 additions and 53 deletions

View File

@@ -57,7 +57,7 @@ public class BatteryInfoLoaderTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
FakeFeatureFactory.setupForTest().getPowerUsageFeatureProvider(mContext);
FakeFeatureFactory.setupForTest().getPowerUsageFeatureProvider();
doReturn(mContext).when(mContext).getApplicationContext();
when(mContext.getSystemService(eq(Context.BATTERY_STATS_SERVICE)))

View File

@@ -162,8 +162,9 @@ public class FakeFeatureFactory extends FeatureFactory {
return batterySettingsFeatureProvider;
}
@NotNull
@Override
public PowerUsageFeatureProvider getPowerUsageFeatureProvider(Context context) {
public PowerUsageFeatureProvider getPowerUsageFeatureProvider() {
return powerUsageFeatureProvider;
}