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

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

Merge cherrypicks of [14522222, 14522223, 14522225, 14522168, 14522184,...

Merge cherrypicks of [14522222, 14522223, 14522225, 14522168, 14522184, 14522130, 14522131, 14522204, 14522170, 14522150, 14522303, 14522305] into sc-release

Change-Id: I2c05b42dde9d155f5818ff2e7aaf27b76e250f51
parents 05410a28 ef16546d
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")
}