Home
last modified time | relevance | path

Searched refs:QSTileState (Results 1 – 25 of 53) sorted by relevance

123

/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/
DUiModeNightTileMapperTest.kt32 import com.android.systemui.qs.tiles.viewmodel.QSTileState
59 activationState: QSTileState.ActivationState = QSTileState.ActivationState.INACTIVE, in createUiNightModeTileState()
61 supportedActions: Set<QSTileState.UserAction> = in createUiNightModeTileState()
62 if (activationState == QSTileState.ActivationState.UNAVAILABLE) in createUiNightModeTileState()
63 setOf(QSTileState.UserAction.LONG_CLICK) in createUiNightModeTileState()
64 else setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createUiNightModeTileState()
67 sideViewIcon: QSTileState.SideViewIcon = QSTileState.SideViewIcon.None, in createUiNightModeTileState()
68 enabledState: QSTileState.EnabledState = QSTileState.EnabledState.ENABLED, in createUiNightModeTileState()
70 ): QSTileState { in createUiNightModeTileState()
71 return QSTileState( in createUiNightModeTileState()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/battery/ui/
DBatterySaverTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
37 override fun map(config: QSTileConfig, data: BatterySaverTileModel): QSTileState = in map()
38 QSTileState.build(resources, theme, config.uiConfig) { in map()
46 sideViewIcon = QSTileState.SideViewIcon.None in map()
49 activationState = QSTileState.ActivationState.UNAVAILABLE in map()
50 supportedActions = setOf(QSTileState.UserAction.LONG_CLICK) in map()
53 activationState = QSTileState.ActivationState.ACTIVE in map()
55 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
68 activationState = QSTileState.ActivationState.INACTIVE in map()
70 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/battery/ui/
DBatterySaverTileMapperTest.kt29 import com.android.systemui.qs.tiles.viewmodel.QSTileState
64 QSTileState.ActivationState.INACTIVE, in map_standard_notPluggedInNotPowerSaving()
80 QSTileState.ActivationState.ACTIVE, in map_standard_notPluggedInPowerSaving()
96 QSTileState.ActivationState.UNAVAILABLE, in map_standard_pluggedInPowerSaving()
112 QSTileState.ActivationState.UNAVAILABLE, in map_standard_pluggedInNotPowerSaving()
128 QSTileState.ActivationState.INACTIVE, in map_extremeSaverDisabledNotPluggedInNotPowerSaving()
144 QSTileState.ActivationState.ACTIVE, in map_extremeSaverDisabledNotPluggedInPowerSaving()
160 QSTileState.ActivationState.UNAVAILABLE, in map_extremeSaverDisabledPluggedInPowerSaving()
176 QSTileState.ActivationState.UNAVAILABLE, in map_extremeSaverDisabledPluggedInNotPowerSaving()
192 QSTileState.ActivationState.INACTIVE, in map_extremeSaverEnabledNotPluggedInNotPowerSaving()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/impl/work/ui/
DWorkModeTileMapperTest.kt33 import com.android.systemui.qs.tiles.viewmodel.QSTileState
82 val actualState: QSTileState = in mapsDisabledDataToInactiveState()
85 val expectedState = createWorkModeTileState(QSTileState.ActivationState.INACTIVE) in mapsDisabledDataToInactiveState()
93 val actualState: QSTileState = in mapsEnabledDataToActiveState()
96 val expectedState = createWorkModeTileState(QSTileState.ActivationState.ACTIVE) in mapsEnabledDataToActiveState()
102 val actualState: QSTileState = mapper.map(qsTileConfig, WorkModeTileModel.NoActiveProfile) in mapsNoActiveProfileDataToUnavailableState()
104 val expectedState = createWorkModeTileState(QSTileState.ActivationState.UNAVAILABLE) in mapsNoActiveProfileDataToUnavailableState()
109 activationState: QSTileState.ActivationState, in createWorkModeTileState()
110 ): QSTileState { in createWorkModeTileState()
113 return QSTileState( in createWorkModeTileState()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/saver/domain/
DDataSaverTileMapperTest.kt29 import com.android.systemui.qs.tiles.viewmodel.QSTileState
61 QSTileState.ActivationState.ACTIVE, in activeStateMatchesEnabledModel()
75 QSTileState.ActivationState.INACTIVE, in inactiveStateMatchesDisabledModel()
82 activationState: QSTileState.ActivationState, in createDataSaverTileState()
84 ): QSTileState { in createDataSaverTileState()
87 if (activationState == QSTileState.ActivationState.ACTIVE) in createDataSaverTileState()
89 else if (activationState == QSTileState.ActivationState.INACTIVE) in createDataSaverTileState()
93 return QSTileState( in createDataSaverTileState()
99 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createDataSaverTileState()
102 QSTileState.SideViewIcon.None, in createDataSaverTileState()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/ui/
DReduceBrightColorsTileMapperTest.kt30 import com.android.systemui.qs.tiles.viewmodel.QSTileState
66 QSTileState.ActivationState.INACTIVE, in disabledModel()
77 val expectedState = createReduceBrightColorsTileState(QSTileState.ActivationState.ACTIVE) in enabledModel()
82 activationState: QSTileState.ActivationState, in createReduceBrightColorsTileState()
83 ): QSTileState { in createReduceBrightColorsTileState()
87 if (activationState == QSTileState.ActivationState.ACTIVE) in createReduceBrightColorsTileState()
90 return QSTileState( in createReduceBrightColorsTileState()
97 if (activationState == QSTileState.ActivationState.ACTIVE) Tile.STATE_ACTIVE in createReduceBrightColorsTileState()
99 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createReduceBrightColorsTileState()
102 QSTileState.SideViewIcon.None, in createReduceBrightColorsTileState()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/night/ui/
DNightDisplayTileMapperTest.kt32 import com.android.systemui.qs.tiles.viewmodel.QSTileState
75 QSTileState.ActivationState.INACTIVE, in disabledModel_whenAutoModeOff()
90 QSTileState.ActivationState.INACTIVE, in disabledModel_whenAutoModeOff_whenForceEnable()
104 QSTileState.ActivationState.ACTIVE, in enabledModel_whenAutoModeOff()
118 QSTileState.ActivationState.ACTIVE, in enabledModel_forceAutoMode_whenAutoModeOff()
130 val expectedState = createNightDisplayTileState(QSTileState.ActivationState.ACTIVE, null) in enabledModel_autoModeTwilight_locationOff()
142 QSTileState.ActivationState.ACTIVE, in enabledModel_autoModeTwilight_locationOn()
156 QSTileState.ActivationState.INACTIVE, in disabledModel_autoModeTwilight_locationOn()
168 val expectedState = createNightDisplayTileState(QSTileState.ActivationState.INACTIVE, null) in disabledModel_autoModeTwilight_locationOff()
181 QSTileState.ActivationState.INACTIVE, in disabledModel_autoModeCustom_24Hour()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/
DCustomTileMapperTest.kt39 import com.android.systemui.qs.tiles.viewmodel.QSTileState
74 activationState = QSTileState.ActivationState.UNAVAILABLE, in stateHasPendingBinding()
75 actions = setOf(QSTileState.UserAction.LONG_CLICK), in stateHasPendingBinding()
93 activationState = QSTileState.ActivationState.ACTIVE, in stateActive()
111 activationState = QSTileState.ActivationState.INACTIVE, in stateInactive()
129 activationState = QSTileState.ActivationState.UNAVAILABLE, in stateUnavailable()
130 actions = setOf(QSTileState.UserAction.LONG_CLICK), in stateUnavailable()
148 sideIcon = QSTileState.SideViewIcon.Chevron, in tileWithChevron()
167 activationState = QSTileState.ActivationState.INACTIVE, in defaultIconFallback()
190 activationState = QSTileState.ActivationState.INACTIVE, in failedToLoadIconTileIsInactive()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/
DUiModeNightTileMapper.kt28 import com.android.systemui.qs.tiles.viewmodel.QSTileState
45 override fun map(config: QSTileConfig, data: UiModeNightTileModel): QSTileState = in map()
47 QSTileState.build(resources, theme, config.uiConfig) { in map()
104 activationState = QSTileState.ActivationState.UNAVAILABLE in map()
109 if (isNightMode) QSTileState.ActivationState.ACTIVE in map()
110 else QSTileState.ActivationState.INACTIVE in map()
114 if (activationState == QSTileState.ActivationState.INACTIVE) in map()
121 if (activationState == QSTileState.ActivationState.ACTIVE) in map()
129 if (activationState == QSTileState.ActivationState.UNAVAILABLE) in map()
130 setOf(QSTileState.UserAction.LONG_CLICK) in map()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/screenrecord/domain/ui/
DScreenRecordTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
37 override fun map(config: QSTileConfig, data: ScreenRecordModel): QSTileState = in map()
38 QSTileState.build(resources, theme, config.uiConfig) { in map()
40 supportedActions = setOf(QSTileState.UserAction.CLICK) in map()
44 activationState = QSTileState.ActivationState.ACTIVE in map()
52 sideViewIcon = QSTileState.SideViewIcon.None in map()
56 activationState = QSTileState.ActivationState.ACTIVE in map()
65 sideViewIcon = QSTileState.SideViewIcon.None in map()
69 activationState = QSTileState.ActivationState.INACTIVE in map()
77 sideViewIcon = QSTileState.SideViewIcon.Chevron // tapping will open dialog in map()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/screenrecord/ui/
DScreenRecordTileMapperTest.kt30 import com.android.systemui.qs.tiles.viewmodel.QSTileState
67 QSTileState.ActivationState.ACTIVE, in activeStateMatchesRecordingDataModel()
83 QSTileState.ActivationState.ACTIVE, in activeStateMatchesStartingDataModel()
98 QSTileState.ActivationState.INACTIVE, in inactiveStateMatchesDisabledDataModel()
106 activationState: QSTileState.ActivationState, in createScreenRecordTileState()
109 ): QSTileState { in createScreenRecordTileState()
112 return QSTileState( in createScreenRecordTileState()
118 setOf(QSTileState.UserAction.CLICK), in createScreenRecordTileState()
122 if (activationState == QSTileState.ActivationState.INACTIVE) in createScreenRecordTileState()
123 QSTileState.SideViewIcon.Chevron in createScreenRecordTileState()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/colorcorrection/domain/
DColorCorrectionTileMapperTest.kt29 import com.android.systemui.qs.tiles.viewmodel.QSTileState
59 createColorCorrectionTileState(QSTileState.ActivationState.INACTIVE, subtitleArray[1]) in disabledModel()
70 createColorCorrectionTileState(QSTileState.ActivationState.ACTIVE, subtitleArray[2]) in enabledModel()
75 activationState: QSTileState.ActivationState, in createColorCorrectionTileState()
77 ): QSTileState { in createColorCorrectionTileState()
79 return QSTileState( in createColorCorrectionTileState()
85 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createColorCorrectionTileState()
88 QSTileState.SideViewIcon.None, in createColorCorrectionTileState()
89 QSTileState.EnabledState.ENABLED, in createColorCorrectionTileState()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/work/ui/
DWorkModeTileMapper.kt28 import com.android.systemui.qs.tiles.viewmodel.QSTileState
40 override fun map(config: QSTileConfig, data: WorkModeTileModel): QSTileState = in map()
41 QSTileState.build(resources, theme, config.uiConfig) { in map()
52 activationState = QSTileState.ActivationState.ACTIVE in map()
55 activationState = QSTileState.ActivationState.INACTIVE in map()
60 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
63 activationState = QSTileState.ActivationState.UNAVAILABLE in map()
70 sideViewIcon = QSTileState.SideViewIcon.None in map()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/onehanded/ui/
DOneHandedModeTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
37 override fun map(config: QSTileConfig, data: OneHandedModeTileModel): QSTileState = in map()
38 QSTileState.build(resources, theme, config.uiConfig) { in map()
44 activationState = QSTileState.ActivationState.ACTIVE in map()
47 activationState = QSTileState.ActivationState.INACTIVE in map()
50 sideViewIcon = QSTileState.SideViewIcon.None in map()
53 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/flashlight/domain/
DFlashlightMapperTest.kt27 import com.android.systemui.qs.tiles.viewmodel.QSTileState
53 val tileState: QSTileState = in mapsDisabledDataToInactiveState()
58 assertEquals(QSTileState.ActivationState.INACTIVE, actualActivationState) in mapsDisabledDataToInactiveState()
63 val tileState: QSTileState = in mapsEnabledDataToActiveState()
67 assertEquals(QSTileState.ActivationState.ACTIVE, actualActivationState) in mapsEnabledDataToActiveState()
72 val tileState: QSTileState = in mapsEnabledDataToOnIconState()
83 val tileState: QSTileState = in mapsDisabledDataToOffIconState()
94 val tileState: QSTileState = in mapsUnavailableDataToOffIconState()
106 val tileState: QSTileState = in supportClickActionWhenAvailable()
110 assertThat(supportedActions).containsExactly(QSTileState.UserAction.CLICK) in supportClickActionWhenAvailable()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/onehanded/ui/
DOneHandedModeTileMapperTest.kt30 import com.android.systemui.qs.tiles.viewmodel.QSTileState
70 QSTileState.ActivationState.INACTIVE, in disabledModel()
85 QSTileState.ActivationState.ACTIVE, in enabledModel()
93 activationState: QSTileState.ActivationState, in createOneHandedModeTileState()
96 ): QSTileState { in createOneHandedModeTileState()
98 return QSTileState( in createOneHandedModeTileState()
104 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createOneHandedModeTileState()
107 QSTileState.SideViewIcon.None, in createOneHandedModeTileState()
108 QSTileState.EnabledState.ENABLED, in createOneHandedModeTileState()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/inversion/domain/
DColorInversionTileMapperTest.kt30 import com.android.systemui.qs.tiles.viewmodel.QSTileState
64 QSTileState.ActivationState.INACTIVE, in disabledModel()
79 QSTileState.ActivationState.ACTIVE, in enabledModel()
87 activationState: QSTileState.ActivationState, in createColorInversionTileState()
90 ): QSTileState { in createColorInversionTileState()
92 return QSTileState( in createColorInversionTileState()
98 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK), in createColorInversionTileState()
101 QSTileState.SideViewIcon.None, in createColorInversionTileState()
102 QSTileState.EnabledState.ENABLED, in createColorInversionTileState()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/rotation/ui/mapper/
DRotationLockTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
38 override fun map(config: QSTileConfig, data: RotationLockTileModel): QSTileState = in map()
39 QSTileState.build(resources, theme, config.uiConfig) { in map()
45 activationState = QSTileState.ActivationState.INACTIVE in map()
49 activationState = QSTileState.ActivationState.ACTIVE in map()
65 this.sideViewIcon = QSTileState.SideViewIcon.None in map()
67 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
75 private fun getSecondaryLabelWithPosture(activationState: QSTileState.ActivationState): String { in getSecondaryLabelWithPosture()
79 if (activationState == QSTileState.ActivationState.ACTIVE) ON_INDEX else OFF_INDEX] in getSecondaryLabelWithPosture()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/location/domain/
DLocationTileMapperTest.kt27 import com.android.systemui.qs.tiles.viewmodel.QSTileState
54 val tileState: QSTileState = mapper.map(qsTileConfig, LocationTileModel(false)) in mapsDisabledDataToInactiveState()
57 Assert.assertEquals(QSTileState.ActivationState.INACTIVE, actualActivationState) in mapsDisabledDataToInactiveState()
62 val tileState: QSTileState = mapper.map(qsTileConfig, LocationTileModel(true)) in mapsEnabledDataToActiveState()
65 Assert.assertEquals(QSTileState.ActivationState.ACTIVE, actualActivationState) in mapsEnabledDataToActiveState()
70 val tileState: QSTileState = mapper.map(qsTileConfig, LocationTileModel(true)) in mapsEnabledDataToOnIconState()
79 val tileState: QSTileState = mapper.map(qsTileConfig, LocationTileModel(false)) in mapsDisabledDataToOffIconState()
90 val tileState: QSTileState = mapper.map(qsTileConfig, LocationTileModel(dontCare)) in supportsClickAndLongClickActions()
94 .containsExactly(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in supportsClickAndLongClickActions()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/fontscaling/domain/
DFontScalingTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
37 override fun map(config: QSTileConfig, data: FontScalingTileModel): QSTileState = in map()
38 QSTileState.build(resources, theme, config.uiConfig) { in map()
50 activationState = QSTileState.ActivationState.ACTIVE in map()
51 sideViewIcon = QSTileState.SideViewIcon.Chevron in map()
53 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/colorcorrection/domain/
DColorCorrectionTileMapper.kt24 import com.android.systemui.qs.tiles.viewmodel.QSTileState
36 override fun map(config: QSTileConfig, data: ColorCorrectionTileModel): QSTileState = in map()
37 QSTileState.build(resources, theme, config.uiConfig) { in map()
43 activationState = QSTileState.ActivationState.ACTIVE in map()
46 activationState = QSTileState.ActivationState.INACTIVE in map()
51 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/fontscaling/domain/
DFontScalingTileMapperTest.kt29 import com.android.systemui.qs.tiles.viewmodel.QSTileState
59 private fun createFontScalingTileState(): QSTileState = in createFontScalingTileState()
60 QSTileState( in createFontScalingTileState()
71 QSTileState.ActivationState.ACTIVE,
73 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK),
76 QSTileState.SideViewIcon.Chevron,
77 QSTileState.EnabledState.ENABLED,
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/sensorprivacy/ui/
DSensorPrivacyToggleTileMapper.kt25 import com.android.systemui.qs.tiles.viewmodel.QSTileState
47 override fun map(config: QSTileConfig, data: SensorPrivacyToggleTileModel): QSTileState = in create()
48 QSTileState.build(resources, theme, config.uiConfig) { in create()
52 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in create()
56 sideViewIcon = QSTileState.SideViewIcon.None in create()
59 activationState = QSTileState.ActivationState.INACTIVE in create()
62 activationState = QSTileState.ActivationState.ACTIVE in create()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/
DInternetTileMapper.kt29 import com.android.systemui.qs.tiles.viewmodel.QSTileState
42 override fun map(config: QSTileConfig, data: InternetTileModel): QSTileState = in map()
43 QSTileState.build(resources, theme, config.uiConfig) { in map()
68 sideViewIcon = QSTileState.SideViewIcon.Chevron in map()
71 if (data is InternetTileModel.Active) QSTileState.ActivationState.ACTIVE in map()
72 else QSTileState.ActivationState.INACTIVE in map()
75 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/inversion/domain/
DColorInversionTileMapper.kt26 import com.android.systemui.qs.tiles.viewmodel.QSTileState
37 override fun map(config: QSTileConfig, data: ColorInversionTileModel): QSTileState = in map()
38 QSTileState.build(resources, theme, config.uiConfig) { in map()
42 activationState = QSTileState.ActivationState.ACTIVE in map()
46 activationState = QSTileState.ActivationState.INACTIVE in map()
53 setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK) in map()

123