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

@@ -79,8 +79,6 @@ open class FeatureFactoryImpl : FeatureFactory() {
)
}
private val powerUsageFeatureProvider by lazy { PowerUsageFeatureProviderImpl(appContext) }
private val userFeatureProvider by lazy { UserFeatureProviderImpl(appContext) }
private val contextualCardFeatureProvider by lazy {
@@ -92,7 +90,7 @@ open class FeatureFactoryImpl : FeatureFactory() {
override val metricsFeatureProvider by lazy { SettingsMetricsFeatureProvider() }
override fun getPowerUsageFeatureProvider(context: Context) = powerUsageFeatureProvider
override val powerUsageFeatureProvider by lazy { PowerUsageFeatureProviderImpl(appContext) }
override val batteryStatusFeatureProvider by lazy {
BatteryStatusFeatureProviderImpl(appContext)