Remove context from powerUsageFeatureProvider

PowerUsageFeatureProviderImpl is created by using application context,
no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: Iec81e98648fcb2f6a20978ef4ce164e1af50a804
This commit is contained in:
Chaohui Wang
2023-07-13 09:52:30 +08:00
parent 660c6328fc
commit 36b8227073
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)))