Clean up Kotlin FeatureFactory.getFactory(context)

Replace with featureFactory.

Bug: 286764889
Test: m Settings
Change-Id: I30bd2e9b25e1681d7694939dd8ec84fcd6fd7c08
This commit is contained in:
Chaohui Wang
2023-06-29 22:40:33 +08:00
parent a23aee3242
commit 8f0b2d15c6
13 changed files with 30 additions and 35 deletions

View File

@@ -17,13 +17,12 @@ package com.android.settings.deviceinfo.hardwareinfo
import android.content.Context
import com.android.settings.core.BasePreferenceController
import com.android.settings.overlay.FeatureFactory
import com.android.settings.overlay.FeatureFactory.Companion.featureFactory
/** Preference controller for Manufactured Year. */
class ManufacturedYearPreferenceController(context: Context, preferenceKey: String) :
BasePreferenceController(context, preferenceKey) {
private val year: String? =
FeatureFactory.getFactory(context).hardwareInfoFeatureProvider.manufacturedYear
private val year: String? = featureFactory.hardwareInfoFeatureProvider.manufacturedYear
override fun getAvailabilityStatus(): Int =
if (!year.isNullOrEmpty()) AVAILABLE else UNSUPPORTED_ON_DEVICE