1 package com.android.systemui.qs.pipeline.data.repository 2 3 import com.android.systemui.qs.pipeline.shared.TileSpec 4 5 object TilesSettingConverter { 6 7 const val DELIMITER = "," 8 toTilesListnull9 fun toTilesList(commaSeparatedTiles: String) = 10 commaSeparatedTiles.split(DELIMITER).map(TileSpec::create).filter { it != TileSpec.Invalid } 11 toTilesSetnull12 fun toTilesSet(commaSeparatedTiles: String) = 13 commaSeparatedTiles 14 .split(DELIMITER) 15 .map(TileSpec::create) 16 .filter { it != TileSpec.Invalid } 17 .toSet() 18 } 19