Avoid some lint warnings
This commit is contained in:
@ -56,7 +56,7 @@ class AccountActivity : AppCompatActivity() {
|
||||
private var save = false
|
||||
private var uaIndex= -1
|
||||
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Main)
|
||||
private val scope = CoroutineScope(Job() + Dispatchers.Main)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ object Api {
|
||||
const val AF_INET = 2
|
||||
const val AF_INET6 = 10
|
||||
const val VIDMODE_OFF = 0
|
||||
const val VIDMODE_ON = 1
|
||||
// const val VIDMODE_ON = 1
|
||||
const val ANSWERMODE_MANUAL = 0
|
||||
const val ANSWERMODE_AUTO = 2
|
||||
const val DTMFMODE_RTP_EVENT = 0
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.tutpro.baresip
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
@ -17,6 +18,7 @@ class BootCompletedReceiver : BroadcastReceiver() {
|
||||
|
||||
private val START_NOTIFICATION_IN = 105
|
||||
|
||||
@SuppressLint("UnspecifiedImmutableFlag")
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
|
||||
Log.i(TAG, "BootCompletedReceiver received intent ${intent.action}")
|
||||
@ -43,7 +45,11 @@ class BootCompletedReceiver : BroadcastReceiver() {
|
||||
val channel = NotificationChannel("default", "default",
|
||||
NotificationManager.IMPORTANCE_DEFAULT)
|
||||
nm.createNotificationChannel(channel)
|
||||
val pi = PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_ONE_SHOT)
|
||||
val pi = if (Build.VERSION.SDK_INT >= 23)
|
||||
PendingIntent.getActivity(context, 0, i,
|
||||
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_ONE_SHOT)
|
||||
else
|
||||
PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_ONE_SHOT)
|
||||
with(NotificationCompat.Builder(context, "default")) {
|
||||
setSmallIcon(R.drawable.ic_stat)
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
|
||||
@ -31,7 +31,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String,
|
||||
while (it.hasNext()) if (it.next().aor == aor) it.remove()
|
||||
}
|
||||
|
||||
fun aorHistorySize(aor: String): Int {
|
||||
private fun aorHistorySize(aor: String): Int {
|
||||
return BaresipService.callHistory.filter { it.aor == aor }.count()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user