mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Quick code cleanup
This commit is contained in:
parent
af3b1fa418
commit
51d725c757
5 changed files with 5 additions and 34 deletions
|
|
@ -469,13 +469,13 @@ class ContactsManager
|
|||
Log.d(
|
||||
"$TAG Friend wasn't found using phone number [$username], looking in native address book directly"
|
||||
)
|
||||
findNativeContact(sipAddress, username, true)
|
||||
null
|
||||
}
|
||||
} else {
|
||||
Log.d(
|
||||
"$TAG Friend wasn't found using SIP address [$sipAddress] and username [$username] isn't a phone number, looking in native address book directly"
|
||||
)
|
||||
findNativeContact(sipAddress, username.orEmpty(), false)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -644,14 +644,6 @@ class ContactsManager
|
|||
return temporaryFriendList
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
fun findNativeContact(address: String, username: String, searchAsPhoneNumber: Boolean): Friend? {
|
||||
// As long as read contacts permission is granted, friends will be stored in DB,
|
||||
// so if Core didn't find a matching item it in the FriendList, there's no reason the native address book
|
||||
// shall contain a matching contact.
|
||||
return null
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
fun getMePerson(localAddress: Address): Person {
|
||||
val account = coreContext.core.accountList.find {
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ import android.content.Intent
|
|||
import android.content.pm.PackageManager
|
||||
import android.graphics.Bitmap
|
||||
import android.media.AudioAttributes
|
||||
import android.media.AudioManager
|
||||
import android.media.MediaPlayer
|
||||
import android.media.RingtoneManager
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.AnyThread
|
||||
|
|
@ -1592,24 +1590,6 @@ class NotificationsManager
|
|||
currentKeepAliveThirdPartyAccountsForegroundServiceNotificationId = -1
|
||||
}
|
||||
|
||||
@MainThread
|
||||
private fun createIncomingCallNotificationChannel() {
|
||||
val id = context.getString(R.string.notification_channel_incoming_call_id)
|
||||
val name = context.getString(R.string.notification_channel_incoming_call_name)
|
||||
|
||||
val ringtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
|
||||
val audioAttributes = AudioAttributes.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
|
||||
.setLegacyStreamType(AudioManager.STREAM_RING)
|
||||
.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE).build()
|
||||
|
||||
val channel = NotificationChannel(id, name, NotificationManager.IMPORTANCE_HIGH).apply {
|
||||
description = name
|
||||
setSound(ringtone, audioAttributes)
|
||||
}
|
||||
notificationManager.createNotificationChannel(channel)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
private fun createIncomingCallNotificationChannelWithoutRingtone() {
|
||||
val id = context.getString(R.string.notification_channel_without_ringtone_incoming_call_id)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import androidx.core.content.ContextCompat
|
|||
import androidx.core.content.FileProvider
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.observe
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
|
|
|||
|
|
@ -98,9 +98,10 @@ class RecordingMediaPlayerViewModel
|
|||
|
||||
@UiThread
|
||||
fun setVideoRenderingSurface(textureView: TextureView) {
|
||||
val texture = textureView.surfaceTexture
|
||||
coreContext.postOnCoreThread {
|
||||
Log.i("$TAG Setting window ID in player")
|
||||
player.setWindowId(textureView.surfaceTexture)
|
||||
player.setWindowId(texture)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:bind="http://schemas.android.com/tools">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue