[fenix] For https://github.com/mozilla-mobile/fenix/issues/21776 - Replace Java static method with Kotlin analog

pull/600/head
Gabriel Luong 3 years ago committed by mergify[bot]
parent 999f0ab3c1
commit 230536c9b7

@ -40,6 +40,8 @@ import org.mozilla.fenix.R
import java.text.NumberFormat import java.text.NumberFormat
import kotlin.math.PI import kotlin.math.PI
import kotlin.math.abs
import kotlin.math.min
import kotlin.math.roundToInt import kotlin.math.roundToInt
/** /**
@ -182,7 +184,7 @@ class TextPercentageSeekBarPreference @JvmOverloads constructor(
*/ */
set(seekBarIncrement) { set(seekBarIncrement) {
if (seekBarIncrement != mSeekBarIncrement) { if (seekBarIncrement != mSeekBarIncrement) {
mSeekBarIncrement = Math.min(mMax - mMin, Math.abs(seekBarIncrement)) mSeekBarIncrement = min(mMax - mMin, abs(seekBarIncrement))
notifyChanged() notifyChanged()
} }
} }

Loading…
Cancel
Save