Apply Spotless formatting to Java and Kotlin files
This commit is contained in:
@@ -102,13 +102,7 @@ class MLKitQRCodeAnalyzer(
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryInvertedScan(
|
||||
yData: ByteArray,
|
||||
width: Int,
|
||||
height: Int,
|
||||
rotationDegrees: Int,
|
||||
onComplete: () -> Unit,
|
||||
) {
|
||||
private fun tryInvertedScan(yData: ByteArray, width: Int, height: Int, rotationDegrees: Int, onComplete: () -> Unit) {
|
||||
val inverted = toLumaBitmap(yData, width, 0, 0, width, height, invert = true)
|
||||
barcodeScanner.process(InputImage.fromBitmap(inverted, rotationDegrees))
|
||||
.addOnSuccessListener { codes ->
|
||||
@@ -140,15 +134,7 @@ class MLKitQRCodeAnalyzer(
|
||||
return yData
|
||||
}
|
||||
|
||||
private fun toLumaBitmap(
|
||||
yData: ByteArray,
|
||||
srcWidth: Int,
|
||||
left: Int,
|
||||
top: Int,
|
||||
width: Int,
|
||||
height: Int,
|
||||
invert: Boolean,
|
||||
): Bitmap {
|
||||
private fun toLumaBitmap(yData: ByteArray, srcWidth: Int, left: Int, top: Int, width: Int, height: Int, invert: Boolean): Bitmap {
|
||||
val size = width * height
|
||||
val pixels = pixelBuffer?.takeIf { it.size >= size } ?: IntArray(size).also { pixelBuffer = it }
|
||||
|
||||
|
||||
@@ -19,10 +19,7 @@ import io.nekohasekai.sfa.update.UpdateState
|
||||
object Vendor : VendorInterface {
|
||||
private const val TAG = "Vendor"
|
||||
|
||||
override fun checkUpdate(
|
||||
activity: Activity,
|
||||
byUser: Boolean,
|
||||
) {
|
||||
override fun checkUpdate(activity: Activity, byUser: Boolean) {
|
||||
val appUpdateManager = AppUpdateManagerFactory.create(activity)
|
||||
val appUpdateInfoTask = appUpdateManager.appUpdateInfo
|
||||
appUpdateInfoTask.addOnSuccessListener { appUpdateInfo ->
|
||||
@@ -95,11 +92,7 @@ object Vendor : VendorInterface {
|
||||
}
|
||||
}
|
||||
|
||||
override fun supportsTrackSelection(): Boolean {
|
||||
return false
|
||||
}
|
||||
override fun supportsTrackSelection(): Boolean = false
|
||||
|
||||
override fun checkUpdateAsync(): UpdateInfo? {
|
||||
return null
|
||||
}
|
||||
override fun checkUpdateAsync(): UpdateInfo? = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user