Remove context from batteryStatusFeatureProvider

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

Bug: 286764889
Test: m Settings
Change-Id: Ie5f39c3f074a1937526461eba45f11f7ec212cba
This commit is contained in:
Chaohui Wang
2023-07-06 15:53:46 +08:00
parent b3b27451a3
commit 9ed6eccb75
7 changed files with 15 additions and 20 deletions

View File

@@ -81,10 +81,6 @@ open class FeatureFactoryImpl : FeatureFactory() {
private val powerUsageFeatureProvider by lazy { PowerUsageFeatureProviderImpl(appContext) }
private val batteryStatusFeatureProvider by lazy {
BatteryStatusFeatureProviderImpl(appContext)
}
private val userFeatureProvider by lazy { UserFeatureProviderImpl(appContext) }
private val contextualCardFeatureProvider by lazy {
@@ -98,7 +94,9 @@ open class FeatureFactoryImpl : FeatureFactory() {
override fun getPowerUsageFeatureProvider(context: Context) = powerUsageFeatureProvider
override fun getBatteryStatusFeatureProvider(context: Context) = batteryStatusFeatureProvider
override val batteryStatusFeatureProvider by lazy {
BatteryStatusFeatureProviderImpl(appContext)
}
override val batterySettingsFeatureProvider by lazy { BatterySettingsFeatureProviderImpl() }