mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Code improvements
This commit is contained in:
parent
32145980f4
commit
0105f1d669
11 changed files with 13 additions and 17 deletions
|
|
@ -30,6 +30,7 @@
|
|||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||
|
||||
<application
|
||||
android:name=".LinphoneApplication"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import org.linphone.core.MediaDirection
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.AudioUtils
|
||||
|
||||
class TelecomCallControlCallback constructor(
|
||||
class TelecomCallControlCallback(
|
||||
private val call: Call,
|
||||
private val callControl: CallControlScope,
|
||||
private val scope: CoroutineScope
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class PermissionsFragment : Fragment() {
|
|||
private val requestPermissionLauncher = registerForActivityResult(
|
||||
ActivityResultContracts.RequestMultiplePermissions()
|
||||
) { permissions ->
|
||||
permissions.entries.forEach() {
|
||||
permissions.entries.forEach {
|
||||
val permissionName = it.key
|
||||
val isGranted = it.value
|
||||
if (isGranted) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class ConferenceModel {
|
|||
if (found != null) {
|
||||
Log.i("$TAG Newly active speaker participant is [${found.name}]")
|
||||
found.isActiveSpeaker.postValue(true)
|
||||
activeSpeaker.postValue(found)
|
||||
activeSpeaker.postValue(found!!)
|
||||
} else {
|
||||
Log.i("$TAG Failed to find actively speaking participant...")
|
||||
val model = ConferenceParticipantDeviceModel(participantDevice)
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ class MainActivity : GenericActivity() {
|
|||
}
|
||||
|
||||
val list = arrayListOf<String>()
|
||||
lifecycleScope.launch() {
|
||||
lifecycleScope.launch {
|
||||
val deferred = arrayListOf<Deferred<String?>>()
|
||||
for (uri in parcelablesUri) {
|
||||
deferred.add(async { FileUtils.getFilePath(this@MainActivity, uri, false) })
|
||||
|
|
|
|||
|
|
@ -338,8 +338,8 @@ class ConversationFragment : SlidingPaneChildFragment() {
|
|||
sendMessageViewModel.configureChatRoom(viewModel.chatRoom)
|
||||
|
||||
// Wait for chat room to be ready before trying to forward a message in it
|
||||
sharedViewModel.messageToForwardEvent.observe(viewLifecycleOwner) {
|
||||
it.consume { toForward ->
|
||||
sharedViewModel.messageToForwardEvent.observe(viewLifecycleOwner) { event ->
|
||||
event.consume { toForward ->
|
||||
Log.i("$TAG Found message to forward")
|
||||
sendMessageViewModel.forwardMessage(toForward)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,11 +293,6 @@ class MessageModel @WorkerThread constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun firstImageClicked() {
|
||||
filesList.value.orEmpty().firstOrNull()?.onClick()
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
private fun computeContentsList() {
|
||||
Log.d("$TAG Computing message contents list")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ package org.linphone.ui.main.chat.view
|
|||
import android.content.Context
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.util.AttributeSet
|
||||
import android.view.View.MeasureSpec.*
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,8 @@
|
|||
app:layout_constraintWidth_max="@dimen/text_input_max_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/phone_number_label"
|
||||
app:layout_constraintStart_toEndOf="@id/prefix_caret"
|
||||
app:layout_constraintEnd_toEndOf="@id/username"/>
|
||||
app:layout_constraintEnd_toEndOf="@id/username"
|
||||
bind:ignore="RtlSymmetry" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style_600"
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
android:text="@{viewModel.isEdit ? @string/contact_edit_title : @string/contact_new_title, default=@string/contact_new_title}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/back"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue