Home
last modified time | relevance | path

Searched refs:TileSpec (Results 1 – 25 of 41) sorted by relevance

12

/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/
H A DTileSpecRepository.kt29 import com.android.systemui.qs.pipeline.shared.TileSpec
115 .map(TileSpec::create)
116 .filter { it !is TileSpec.Invalid }
154 if (tile == TileSpec.Invalid) {
170 if (tiles.all { it == TileSpec.Invalid }) {
191 .map(TileSpec::create)
192 .filter { it !is TileSpec.Invalid }
203 .filter { it !is TileSpec.Invalid }
220 it != TileSpec.Invalid
226 .map(TileSpec::create)
[all …]
H A DAutoAddRepository.kt24 import com.android.systemui.qs.pipeline.shared.TileSpec
40 fun autoAddedTiles(userId: Int): Flow<Set<TileSpec>>
43 suspend fun markTileAdded(userId: Int, spec: TileSpec)
49 suspend fun unmarkTileAdded(userId: Int, spec: TileSpec)
79 it.split(DELIMITER).map(TileSpec::create).filter { it !is TileSpec.Invalid }.toSet()
85 if (spec is TileSpec.Invalid) {
95 if (spec is TileSpec.Invalid) {
107 .filter { it !is TileSpec.Invalid }
121 private suspend fun load(userId: Int): Set<TileSpec> {
125 .map(TileSpec::create)
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/
H A DTileSpecTest.kt35 val tileSpec = TileSpec.create(spec)
37 assertThat(tileSpec is TileSpec.PlatformTileSpec).isTrue()
46 val tileSpec = TileSpec.create(spec)
48 assertThat(tileSpec is TileSpec.CustomTileSpec).isTrue()
57 val tileSpec = TileSpec.create(spec)
59 assertThat(tileSpec).isEqualTo(TileSpec.Invalid)
66 val tileSpec = TileSpec.create(spec)
68 assertThat(tileSpec).isEqualTo(TileSpec.Invalid)
76 val tileSpec = TileSpec.create(spec)
78 assertThat(tileSpec).isEqualTo(TileSpec.Invalid)
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/
H A DCurrentTilesInteractorImplTest.kt144 TileSpec.create("a"),
145 TileSpec.create("e"),
147 TileSpec.create("d"),
186 TileSpec.create("a"),
214 TileSpec.create("e"),
247 val specs = listOf(TileSpec.create("a"), TileSpec.create("a"))
279 val specs = listOf(TileSpec.create("a"), TileSpec.create("c"))
463 val specs = listOf(TileSpec.create("a"), TileSpec.create("b"))
531 val currentSpecs = listOf(TileSpec.create("a"), TileSpec.create("b"))
535 val newSpecs = listOf(TileSpec.create("b"), TileSpec.create("c"), TileSpec.create("a"))
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/
H A DAutoAddSettingsRepositoryTest.kt24 import com.android.systemui.qs.pipeline.shared.TileSpec
111 val specs = mutableSetOf(TileSpec.create("a"))
112 underTest.markTileAdded(userId, TileSpec.create("a"))
116 specs.add(TileSpec.create("b"))
117 underTest.markTileAdded(userId, TileSpec.create("b"))
136 underTest.markTileAdded(userId, TileSpec.Invalid)
148 underTest.unmarkTileAdded(userId, TileSpec.create("a"))
161 underTest.unmarkTileAdded(1, TileSpec.create("a"))
179 fun Set<TileSpec>.toSeparatedString() = joinToString(DELIMITER, transform = TileSpec::spec)
181 fun String.toSet(): Set<TileSpec> {
[all …]
H A DTileSpecSettingsRepositoryTest.kt26 import com.android.systemui.qs.pipeline.shared.TileSpec
93 assertThat(tiles).isEqualTo(listOf(TileSpec.create("a")))
97 .isEqualTo(listOf(TileSpec.create("a"), TileSpec.create("custom(b/c)")))
143 underTest.addTile(userId = 0, TileSpec.create("b"))
172 underTest.addTile(userId = 0, TileSpec.Invalid)
202 underTest.addTile(userId = 1, TileSpec.create("c"))
245 underTest.removeTiles(userId = 0, listOf(TileSpec.Invalid))
276 underTest.removeTiles(userId = 0, listOf(TileSpec.create("a"), TileSpec.create("c")))
375 private fun getDefaultTileSpecs(): List<TileSpec> {
392 private fun String.toTileSpecs(): List<TileSpec> {
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/
H A DFakeTileSpecRepository.kt21 import com.android.systemui.qs.pipeline.shared.TileSpec
28 private val tilesPerUser = mutableMapOf<Int, MutableStateFlow<List<TileSpec>>>()
30 override fun tilesSpecs(userId: Int): Flow<List<TileSpec>> {
34 override suspend fun addTile(userId: Int, tile: TileSpec, position: Int) {
35 if (tile == TileSpec.Invalid) return
48 override suspend fun removeTiles(userId: Int, tiles: Collection<TileSpec>) {
51 value.toMutableList().apply { removeAll(tiles.filter { it != TileSpec.Invalid }) }
55 override suspend fun setTiles(userId: Int, tiles: List<TileSpec>) {
56 getFlow(userId).value = tiles.filter { it != TileSpec.Invalid }
59 private fun getFlow(userId: Int): MutableStateFlow<List<TileSpec>> =
H A DFakeAutoAddRepository.kt19 import com.android.systemui.qs.pipeline.shared.TileSpec
25 private val autoAddedTilesPerUser = mutableMapOf<Int, MutableStateFlow<Set<TileSpec>>>()
27 override fun autoAddedTiles(userId: Int): Flow<Set<TileSpec>> {
31 override suspend fun markTileAdded(userId: Int, spec: TileSpec) {
32 if (spec == TileSpec.Invalid) return
36 override suspend fun unmarkTileAdded(userId: Int, spec: TileSpec) {
40 private fun getFlow(userId: Int): MutableStateFlow<Set<TileSpec>> =
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/shared/logging/
H A DQSPipelineLogger.kt24 import com.android.systemui.qs.pipeline.shared.TileSpec
50 fun logParsedTiles(tiles: List<TileSpec>, usesDefault: Boolean, user: Int) {
81 fun logTileDestroyed(spec: TileSpec, reason: TileDestroyedReason) {
94 fun logTileCreated(spec: TileSpec) {
104 fun logTileNotFoundInFactory(spec: TileSpec) {
114 fun logTileUserChanged(spec: TileSpec, user: Int) {
130 fun logTilesNotInstalled(tiles: Collection<TileSpec>, user: Int) {
142 fun logTileAutoAdded(userId: Int, spec: TileSpec, position: Int) {
155 fun logTileAutoRemoved(userId: Int, spec: TileSpec) {
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/
H A DAutoAddableSettingListTest.kt24 import com.android.systemui.qs.pipeline.shared.TileSpec
36 override fun create(setting: String, spec: TileSpec): AutoAddableSetting {
50 val spec1 = TileSpec.create("spec1")
51 val spec2 = TileSpec.create(ComponentName("pkg", "cls"))
67 val spec = TileSpec.create("spec")
82 val spec = TileSpec.create("spec")
95 private fun toStringLine(setting: String, spec: TileSpec) =
H A DCallbackControllerAutoAddableTest.kt25 import com.android.systemui.qs.pipeline.shared.TileSpec
51 override val spec: TileSpec
78 override val spec: TileSpec
107 override val spec: TileSpec
137 private val SPEC = TileSpec.create("test")
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/shared/
H A DTileSpec.kt31 sealed class TileSpec private constructor(open val spec: String) { regex
34 object Invalid : TileSpec("") {
44 ) : TileSpec(spec)
55 ) : TileSpec(spec) {
63 fun create(spec: String): TileSpec {
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/interactor/
H A DCurrentTilesInteractor.kt42 import com.android.systemui.qs.pipeline.shared.TileSpec
81 val currentTilesSpecs: List<TileSpec>
103 fun removeTiles(specs: Collection<TileSpec>)
113 fun setTiles(specs: List<TileSpec>)
225 tileSpec is TileSpec.CustomTileSpec &&
275 override fun addTile(spec: TileSpec, position: Int) {
281 override fun removeTiles(specs: Collection<TileSpec>) {
294 override fun setTiles(specs: List<TileSpec>) {
330 private suspend fun createTile(spec: TileSpec): QSTile? {
352 tileSpec: TileSpec,
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/model/
H A DAutoAddSignal.kt20 import com.android.systemui.qs.pipeline.shared.TileSpec
25 val spec: TileSpec
29 override val spec: TileSpec,
35 override val spec: TileSpec,
H A DAutoAddTracking.kt19 import com.android.systemui.qs.pipeline.shared.TileSpec
48 data class IfNotAdded(val spec: TileSpec) : AutoAddTracking
H A DTileModel.kt20 import com.android.systemui.qs.pipeline.shared.TileSpec
28 data class TileModel(val spec: TileSpec, val tile: QSTile) {
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/
H A DAutoAddableSettingList.kt23 import com.android.systemui.qs.pipeline.shared.TileSpec
38 val tileSpec = TileSpec.create(spec)
39 if (tileSpec == TileSpec.Invalid) {
43 autoAddableSettingFactory.create(setting, TileSpec.create(spec))
H A DCastAutoAddable.kt21 import com.android.systemui.qs.pipeline.shared.TileSpec
39 override val spec: TileSpec
40 get() = TileSpec.create(CastTile.TILE_SPEC)
H A DReduceBrightColorsAutoAddable.kt24 import com.android.systemui.qs.pipeline.shared.TileSpec
46 override val spec: TileSpec
47 get() = TileSpec.create(ReduceBrightColorsTile.TILE_SPEC)
H A DAutoAddableSetting.kt23 import com.android.systemui.qs.pipeline.shared.TileSpec
48 @Assisted private val spec: TileSpec,
80 fun create(setting: String, spec: TileSpec): AutoAddableSetting
H A DSafetyCenterAutoAddable.kt31 import com.android.systemui.qs.pipeline.shared.TileSpec
55 private suspend fun getSpec(): TileSpec? {
62 TileSpec.create(ComponentName(packageName, specClass))
H A DDataSaverAutoAddable.kt21 import com.android.systemui.qs.pipeline.shared.TileSpec
43 get() = TileSpec.create(DataSaverTile.TILE_SPEC)
H A DHotspotAutoAddable.kt21 import com.android.systemui.qs.pipeline.shared.TileSpec
43 get() = TileSpec.create(HotspotTile.TILE_SPEC)
H A DWalletAutoAddable.kt23 import com.android.systemui.qs.pipeline.shared.TileSpec
42 private val spec = TileSpec.create(QuickAccessWalletTile.TILE_SPEC)
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
H A DQSHostAdapter.kt32 import com.android.systemui.qs.pipeline.shared.TileSpec
92 interactor.removeTiles(listOf(TileSpec.create(spec)))
117 interactor.removeTiles(specs.map(TileSpec::create))
125 interactor.removeTiles(listOf(TileSpec.create(component)))
133 interactor.addTile(TileSpec.create(spec), position)
141 interactor.addTile(TileSpec.create(component), if (end) POSITION_AT_END else 0)
149 interactor.setTiles(newTiles.map(TileSpec::create))

12