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

@@ -152,7 +152,7 @@ abstract class FeatureFactory {
/** Returns a factory for creating feature controllers. */
@JvmStatic
val factory: FeatureFactory
val featureFactory: FeatureFactory
get() = _factory ?: throw UnsupportedOperationException("No feature factory configured")
private var _appContext: Context? = null
@@ -171,13 +171,13 @@ abstract class FeatureFactory {
/** Returns a factory for creating feature controllers. */
@Deprecated(
"Replace with factory without Context",
"Replace with featureFactory without Context",
ReplaceWith(
"factory",
"com.android.settings.overlay.FeatureFactory.Companion.factory",
"featureFactory",
"com.android.settings.overlay.FeatureFactory.Companion.featureFactory",
)
)
@JvmStatic
fun getFactory(context: Context?): FeatureFactory = factory
fun getFactory(context: Context?): FeatureFactory = featureFactory
}
}