chore: Cleanup Android codebase (#2415)
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
package com.mrousavy.camera.extensions
|
||||
|
||||
import android.hardware.camera2.params.DynamicRangeProfiles
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
|
||||
private fun Set<Long>.firstMatch(filter: Set<Long>): Long? {
|
||||
filter.forEach { f ->
|
||||
if (this.contains(f)) {
|
||||
return f
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||
private val bestProfiles = setOf(
|
||||
DynamicRangeProfiles.HDR10_PLUS,
|
||||
DynamicRangeProfiles.HDR10,
|
||||
DynamicRangeProfiles.HLG10
|
||||
)
|
||||
|
||||
val DynamicRangeProfiles.bestProfile: Long?
|
||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||
get() {
|
||||
return supportedProfiles.firstMatch(bestProfiles)
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
package com.mrousavy.camera.extensions
|
||||
|
||||
fun <T> List<T>.containsAny(elements: List<T>): Boolean = elements.any { element -> this.contains(element) }
|
Reference in New Issue
Block a user