Kotlin 1.5.31 compatibility
Fixes: 204108213 Test: make Change-Id: If73c50d9b51cf73c271bf38d7c4fce09d23ae51d
This commit is contained in:
@@ -120,7 +120,7 @@ class ControlsUiControllerImpl @Inject constructor (
|
||||
private val onSeedingComplete = Consumer<Boolean> {
|
||||
accepted ->
|
||||
if (accepted) {
|
||||
selectedStructure = controlsController.get().getFavorites().maxBy {
|
||||
selectedStructure = controlsController.get().getFavorites().maxByOrNull {
|
||||
it.controls.size
|
||||
} ?: EMPTY_STRUCTURE
|
||||
updatePreferences(selectedStructure)
|
||||
|
||||
@@ -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.min() })) // Sort by "smallest" AppOpp (Location is largest)
|
||||
{ it.second.minOrNull() })) // Sort by "smallest" AppOpp (Location is largest)
|
||||
types = itemsList.map { it.privacyType }.distinct().sorted()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user