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

Commit 83eae9ed authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by Automerger Merge Worker
Browse files

Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" am: f1e2bb9a am:...

Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" am: f1e2bb9a am: c2db9c85 am: 51a1b7d0 am: b357fadd am: 0b9690a3

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705633

Change-Id: Iffb0ca58172ca17b3d207941ef7b35a6ed9e7e83
parents 2c0fb9d2 0b9690a3
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")
}