Use scheduele instead of scheduleAtFixedRate
Avoid bogus lint warning
This commit is contained in:
@@ -1238,7 +1238,7 @@ class BaresipService: Service() {
|
|||||||
} else {
|
} else {
|
||||||
rt.play()
|
rt.play()
|
||||||
rtTimer = Timer()
|
rtTimer = Timer()
|
||||||
rtTimer!!.scheduleAtFixedRate(object : TimerTask() {
|
rtTimer!!.schedule(object : TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (!rt.isPlaying)
|
if (!rt.isPlaying)
|
||||||
rt.play()
|
rt.play()
|
||||||
@@ -1247,7 +1247,7 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
if (shouldVibrate()) {
|
if (shouldVibrate()) {
|
||||||
vbTimer = Timer()
|
vbTimer = Timer()
|
||||||
vbTimer!!.scheduleAtFixedRate(object : TimerTask() {
|
vbTimer!!.schedule(object : TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (VERSION.SDK_INT < 26) {
|
if (VERSION.SDK_INT < 26) {
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
@@ -1372,7 +1372,7 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("WakelockTimeout")
|
@SuppressLint("WakelockTimeout", "Wakelock")
|
||||||
private fun proximitySensing(enable: Boolean) {
|
private fun proximitySensing(enable: Boolean) {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
if (!proximityWakeLock.isHeld) {
|
if (!proximityWakeLock.isHeld) {
|
||||||
|
|||||||
Reference in New Issue
Block a user