Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f5add8e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [14521021, 14522322, 14522323, 14519699, 14522103,...

Merge cherrypicks of [14521021, 14522322, 14522323, 14519699, 14522103, 14522048, 14522049, 14519700, 14521354, 14518597, 14522104, 14521355] into sc-d1-release

Change-Id: I3c47b4297c448cde0eeae8d6f0f146a89c633682
parents 50ece0c2 d7754929
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ class ControlsUiControllerImpl @Inject constructor (
    private val onSeedingComplete = Consumer<Boolean> {
        accepted ->
            if (accepted) {
                selectedStructure = controlsController.get().getFavorites().maxByOrNull {
                selectedStructure = controlsController.get().getFavorites().maxBy {
                    it.controls.size
                } ?: EMPTY_STRUCTURE
                updatePreferences(selectedStructure)
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class PrivacyChipBuilder(private val context: Context, itemsList: List<PrivacyIt
        appsAndTypes = itemsList.groupBy({ it.application }, { it.privacyType })
                .toList()
                .sortedWith(compareBy({ -it.second.size }, // Sort by number of AppOps
                        { it.second.minOrNull() })) // Sort by "smallest" AppOpp (Location is largest)
                        { it.second.min() })) // Sort by "smallest" AppOpp (Location is largest)
        types = itemsList.map { it.privacyType }.distinct().sorted()
    }

+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) {
 * cccc dd
 */
fun Iterable<Pair<String, String>>.columnize(separator: String = " | "): String {
    val col1w = map { (a, _) -> a.length }.maxOrNull()!!
    val col2w = map { (_, b) -> b.length }.maxOrNull()!!
    val col1w = map { (a, _) -> a.length }.max()!!
    val col2w = map { (_, b) -> b.length }.max()!!
    return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n")
}