Remove backing fields for ColorAndMotionScreen
Bug: 373451690 Flag: EXEMPT refactor Test: atest Change-Id: I371bd221b6079c9816725e5253e110eef423fc5e
This commit is contained in:
@@ -17,16 +17,19 @@
|
||||
package com.android.settings.accessibility
|
||||
|
||||
import android.content.Context
|
||||
import com.android.settings.flags.Flags
|
||||
import com.android.settings.R
|
||||
import com.android.settings.flags.Flags
|
||||
import com.android.settingslib.metadata.ProvidePreferenceScreen
|
||||
import com.android.settingslib.metadata.preferenceHierarchy
|
||||
import com.android.settingslib.preference.PreferenceScreenCreator
|
||||
|
||||
@ProvidePreferenceScreen
|
||||
class ColorAndMotionScreen : PreferenceScreenCreator {
|
||||
override val key: String = KEY
|
||||
override val title: Int = R.string.accessibility_color_and_motion_title
|
||||
override val key: String
|
||||
get() = KEY
|
||||
|
||||
override val title: Int
|
||||
get() = R.string.accessibility_color_and_motion_title
|
||||
|
||||
override fun isFlagEnabled(context: Context) = Flags.catalystAccessibilityColorAndMotion()
|
||||
|
||||
@@ -36,8 +39,7 @@ class ColorAndMotionScreen : PreferenceScreenCreator {
|
||||
|
||||
override fun getPreferenceHierarchy(context: Context) = preferenceHierarchy(this) {}
|
||||
|
||||
|
||||
companion object {
|
||||
const val KEY = "accessibility_color_and_motion"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,9 @@ import org.junit.runner.RunWith
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ColorAndMotionScreenTest : CatalystScreenTestCase() {
|
||||
override val preferenceScreenCreator: PreferenceScreenCreator = ColorAndMotionScreen()
|
||||
override val flagName: String = Flags.FLAG_CATALYST_ACCESSIBILITY_COLOR_AND_MOTION
|
||||
|
||||
override val flagName: String
|
||||
get() = Flags.FLAG_CATALYST_ACCESSIBILITY_COLOR_AND_MOTION
|
||||
|
||||
override fun migration() {}
|
||||
|
||||
@@ -35,4 +37,4 @@ class ColorAndMotionScreenTest : CatalystScreenTestCase() {
|
||||
fun key() {
|
||||
assertThat(preferenceScreenCreator.key).isEqualTo(ColorAndMotionScreen.KEY)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user