mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Updated Ktlint
This commit is contained in:
parent
ab1d271b76
commit
4304552bc8
113 changed files with 388 additions and 155 deletions
|
|
@ -49,7 +49,7 @@ task("getGitVersion") {
|
|||
"git",
|
||||
"rev-list",
|
||||
gitVersionStream.toString().trim() + "..HEAD",
|
||||
"--count"
|
||||
"--count",
|
||||
)
|
||||
standardOutput = gitCommitsCount
|
||||
}
|
||||
|
|
@ -62,12 +62,14 @@ task("getGitVersion") {
|
|||
standardOutput = gitBranch
|
||||
}
|
||||
|
||||
gitVersion = if (gitCommitsCount.toString().trim().toInt() == 0) {
|
||||
gitVersionStream.toString().trim()
|
||||
} else {
|
||||
gitVersionStream.toString().trim() + "." + gitCommitsCount.toString()
|
||||
.trim() + "+" + gitCommitHash.toString().trim()
|
||||
}
|
||||
gitVersion =
|
||||
if (gitCommitsCount.toString().trim().toInt() == 0) {
|
||||
gitVersionStream.toString().trim()
|
||||
} else {
|
||||
gitVersionStream.toString().trim() + "." +
|
||||
gitCommitsCount.toString()
|
||||
.trim() + "+" + gitCommitHash.toString().trim()
|
||||
}
|
||||
println("Git version: $gitVersion")
|
||||
} catch (e: Exception) {
|
||||
println("Git not found [$e], using $gitVersion")
|
||||
|
|
@ -168,7 +170,7 @@ android {
|
|||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
|
||||
|
|
@ -251,25 +253,62 @@ dependencies {
|
|||
implementation(libs.linphone)
|
||||
}
|
||||
|
||||
ktlint {
|
||||
android = true
|
||||
ignoreFailures = true
|
||||
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
|
||||
android.set(true)
|
||||
ignoreFailures.set(true)
|
||||
additionalEditorconfig.set(
|
||||
mapOf(
|
||||
"max_line_length" to "120",
|
||||
"ktlint_standard_max-line-length" to "disabled",
|
||||
"ktlint_standard_function-signature" to "disabled",
|
||||
"ktlint_standard_no-blank-line-before-rbrace" to "disabled",
|
||||
"ktlint_standard_no-empty-class-body" to "disabled",
|
||||
"ktlint_standard_annotation-spacing" to "disabled",
|
||||
"ktlint_standard_class-signature" to "disabled",
|
||||
"ktlint_standard_function-expression-body" to "disabled",
|
||||
"ktlint_standard_function-type-modifier-spacing" to "disabled",
|
||||
"ktlint_standard_if-else-wrapping" to "disabled",
|
||||
"ktlint_standard_argument-list-wrapping" to "disabled",
|
||||
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
||||
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
|
||||
"ktlint_standard_no-empty-first-line-in-class-body" to "disabled",
|
||||
"ktlint_standard_no-empty-first-line-in-method-block" to "disabled",
|
||||
"ktlint_standard_no-trailing-spaces" to "disabled",
|
||||
"ktlint_standard_no-blank-line-in-list" to "disabled",
|
||||
"ktlint_standard_no-multi-spaces" to "disabled",
|
||||
"ktlint_standard_try-catch-finally-spacing" to "disabled",
|
||||
"ktlint_standard_block-comment-initial-star-alignment" to "disabled",
|
||||
"ktlint_standard_spacing-between-declarations-with-comments" to "disabled",
|
||||
"ktlint_standard_no-consecutive-comments" to "disabled",
|
||||
"ktlint_standard_multiline-expression-wrapping" to "disabled",
|
||||
"ktlint_standard_parameter-list-wrapping" to "disabled",
|
||||
"ktlint_standard_comment-wrapping" to "disabled",
|
||||
"ktlint_standard_discouraged-comment-location" to "disabled",
|
||||
"ktlint_standard_string-template-indent" to "disabled",
|
||||
"ktlint_standard_parameter-list-spacing" to "disabled",
|
||||
"ktlint_standard_statement-wrapping" to "disabled",
|
||||
"ktlint_standard_import-ordering" to "disabled",
|
||||
"ktlint_standard_paren-spacing" to "disabled",
|
||||
"ktlint_standard_curly-spacing" to "disabled",
|
||||
"ktlint_standard_indent" to "disabled",
|
||||
)
|
||||
)
|
||||
}
|
||||
project.tasks.preBuild.dependsOn("ktlintFormat")
|
||||
|
||||
if (crashlyticsAvailable) {
|
||||
afterEvaluate {
|
||||
tasks.getByName("assembleDebug").finalizedBy(
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileDebug")
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileDebug"),
|
||||
)
|
||||
tasks.getByName("packageDebug").finalizedBy(
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileDebug")
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileDebug"),
|
||||
)
|
||||
tasks.getByName("assembleRelease").finalizedBy(
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileRelease")
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileRelease"),
|
||||
)
|
||||
tasks.getByName("packageRelease").finalizedBy(
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileRelease")
|
||||
tasks.getByName("uploadCrashlyticsSymbolFileRelease"),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,13 +123,13 @@
|
|||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.file_viewer.MediaViewerActivity"
|
||||
android:name=".ui.fileviewer.MediaViewerActivity"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.file_viewer.FileViewerActivity"
|
||||
android:name=".ui.fileviewer.FileViewerActivity"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true" />
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@
|
|||
package org.linphone.contacts
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.*
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Rect
|
||||
import android.graphics.RectF
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.text.TextPaint
|
||||
import androidx.core.content.ContextCompat
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@ import androidx.loader.content.CursorLoader
|
|||
import androidx.loader.content.Loader
|
||||
import java.lang.Exception
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.core.*
|
||||
import org.linphone.core.Factory
|
||||
import org.linphone.core.Friend
|
||||
import org.linphone.core.FriendList
|
||||
import org.linphone.core.GlobalState
|
||||
import org.linphone.core.SubscribePolicy
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.PhoneNumberUtils
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ import org.linphone.utils.LinphoneUtils
|
|||
import org.linphone.utils.PhoneNumberUtils
|
||||
import org.linphone.utils.ShortcutUtils
|
||||
|
||||
class ContactsManager @UiThread constructor() {
|
||||
class ContactsManager
|
||||
@UiThread
|
||||
constructor() {
|
||||
companion object {
|
||||
private const val TAG = "[Contacts Manager]"
|
||||
|
||||
|
|
@ -101,7 +103,7 @@ class ContactsManager @UiThread constructor() {
|
|||
|
||||
var found = false
|
||||
if (results.isNotEmpty()) {
|
||||
val result = results.first() {
|
||||
val result = results.first {
|
||||
it.friend != null
|
||||
}
|
||||
if (result != null) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class CoreContext @UiThread constructor(val context: Context) : HandlerThread("Core Thread") {
|
||||
class CoreContext
|
||||
@UiThread
|
||||
constructor(val context: Context) : HandlerThread("Core Thread") {
|
||||
companion object {
|
||||
private const val TAG = "[Core Context]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ import java.io.FileOutputStream
|
|||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.contacts.ContactLoader.Companion.LINPHONE_ADDRESS_BOOK_FRIEND_LIST
|
||||
|
||||
class CorePreferences @UiThread constructor(private val context: Context) {
|
||||
class CorePreferences
|
||||
@UiThread
|
||||
constructor(private val context: Context) {
|
||||
companion object {
|
||||
private const val TAG = "[Preferences]"
|
||||
|
||||
|
|
@ -100,7 +102,7 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
config.setString("app", "device", value.trim())
|
||||
}
|
||||
|
||||
/* Call settings */
|
||||
// Call settings
|
||||
|
||||
// This won't be done if bluetooth or wired headset is used
|
||||
@get:WorkerThread @set:WorkerThread
|
||||
|
|
@ -124,7 +126,7 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
config.setBool("app", "show_confirmation_dialog_zrtp_trust_call", value)
|
||||
}
|
||||
|
||||
/* Conversation related */
|
||||
// Conversation related
|
||||
|
||||
var markConversationAsReadWhenDismissingMessageNotification: Boolean
|
||||
get() = config.getBool("app", "mark_as_read_notif_dismissal", false)
|
||||
|
|
@ -132,7 +134,7 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
config.setBool("app", "mark_as_read_notif_dismissal", value)
|
||||
}
|
||||
|
||||
/* Contacts related */
|
||||
// Contacts related
|
||||
|
||||
@get:WorkerThread @set:WorkerThread
|
||||
var contactsFilter: String
|
||||
|
|
@ -159,14 +161,14 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
config.setString("app", "friend_list_to_store_newly_created_contacts", value)
|
||||
}
|
||||
|
||||
/* Voice recordings related */
|
||||
// Voice recordings related
|
||||
|
||||
@get:WorkerThread @set:WorkerThread
|
||||
var voiceRecordingMaxDuration: Int
|
||||
get() = config.getInt("app", "voice_recording_max_duration", 600000) // in ms
|
||||
set(value) = config.setInt("app", "voice_recording_max_duration", value)
|
||||
|
||||
/* User interface related */
|
||||
// User interface related
|
||||
|
||||
// -1 means auto, 0 no, 1 yes
|
||||
@get:WorkerThread @set:WorkerThread
|
||||
|
|
@ -274,7 +276,7 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
val automaticallyShowDialpad: Boolean
|
||||
get() = config.getBool("ui", "automatically_show_dialpad", false)
|
||||
|
||||
/* Paths */
|
||||
// Paths
|
||||
|
||||
@get:WorkerThread
|
||||
val defaultDomain: String
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ import org.linphone.utils.FileUtils
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.ShortcutUtils
|
||||
|
||||
class NotificationsManager @MainThread constructor(private val context: Context) {
|
||||
class NotificationsManager
|
||||
@MainThread
|
||||
constructor(private val context: Context) {
|
||||
companion object {
|
||||
private const val TAG = "[Notifications Manager]"
|
||||
|
||||
|
|
@ -876,7 +878,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
contact,
|
||||
displayName,
|
||||
address.asStringUriOnly(),
|
||||
message.time * 1000, /* Linphone timestamps are in seconds */
|
||||
message.time * 1000, // Linphone timestamps are in seconds
|
||||
isOutgoing = false,
|
||||
isReaction = true,
|
||||
reactionToMessageId = message.messageId,
|
||||
|
|
@ -998,7 +1000,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
contact,
|
||||
displayName,
|
||||
address.asStringUriOnly(),
|
||||
message.time * 1000, /* Linphone timestamps are in seconds */
|
||||
message.time * 1000, // Linphone timestamps are in seconds
|
||||
isOutgoing = message.isOutgoing
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ import org.linphone.core.CoreListenerStub
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class TelecomManager @WorkerThread constructor(context: Context) {
|
||||
class TelecomManager
|
||||
@WorkerThread
|
||||
constructor(context: Context) {
|
||||
companion object {
|
||||
private const val TAG = "[Telecom Manager]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class AcceptConditionsAndPolicyDialogModel @UiThread constructor() {
|
||||
class AcceptConditionsAndPolicyDialogModel
|
||||
@UiThread
|
||||
constructor() {
|
||||
companion object {
|
||||
private const val TAG = "[Accept Terms & Policy Dialog Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ConfirmPhoneNumberDialogModel @UiThread constructor(phoneNumber: String) {
|
||||
class ConfirmPhoneNumberDialogModel
|
||||
@UiThread
|
||||
constructor(phoneNumber: String) {
|
||||
val message = MutableLiveData<String>()
|
||||
|
||||
val dismissEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class AccountCreationViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class AccountCreationViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Account Creation ViewModel]"
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ import org.linphone.ui.GenericViewModel
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
open class AccountLoginViewModel @UiThread constructor() : GenericViewModel() {
|
||||
open class AccountLoginViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Account Login ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class QrCodeViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class QrCodeViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Qr Code Scanner ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.ui.GenericViewModel
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ThirdPartySipAccountLoginViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ThirdPartySipAccountLoginViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Third Party SIP Account Login ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import org.linphone.databinding.CallConferenceActiveSpeakerFragmentBinding
|
|||
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
|
||||
import org.linphone.ui.call.fragment.GenericCallFragment
|
||||
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
|
||||
|
||||
@UiThread
|
||||
class ConferenceActiveSpeakerFragment : GenericCallFragment() {
|
||||
companion object {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import org.linphone.databinding.CallConferenceAudioOnlyFragmentBinding
|
|||
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
|
||||
import org.linphone.ui.call.fragment.GenericCallFragment
|
||||
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
|
||||
|
||||
@UiThread
|
||||
class ConferenceAudioOnlyFragment : GenericCallFragment() {
|
||||
companion object {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import org.linphone.databinding.CallConferenceGridFragmentBinding
|
|||
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
|
||||
import org.linphone.ui.call.fragment.GenericCallFragment
|
||||
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
|
||||
|
||||
@UiThread
|
||||
class ConferenceGridFragment : GenericCallFragment() {
|
||||
companion object {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ import org.linphone.core.StreamType
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConferenceParticipantDeviceModel @WorkerThread constructor(
|
||||
class ConferenceParticipantDeviceModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val device: ParticipantDevice,
|
||||
val isMe: Boolean = false
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ import org.linphone.core.Participant
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
||||
|
||||
class ConferenceParticipantModel @WorkerThread constructor(
|
||||
class ConferenceParticipantModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val participant: Participant,
|
||||
val avatarModel: ContactAvatarModel,
|
||||
isMyselfAdmin: Boolean,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.ui.call.conference.view.GridBoxLayout
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ConferenceViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ConferenceViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conference ViewModel]"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ package org.linphone.ui.call.model
|
|||
import androidx.annotation.WorkerThread
|
||||
import org.linphone.core.AudioDevice
|
||||
|
||||
data class AudioDeviceModel @WorkerThread constructor(
|
||||
data class AudioDeviceModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val audioDevice: AudioDevice,
|
||||
val name: String,
|
||||
val type: AudioDevice.Type,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ import org.linphone.core.MediaEncryption
|
|||
import org.linphone.core.StreamType
|
||||
import org.linphone.utils.AppUtils
|
||||
|
||||
class CallMediaEncryptionModel @WorkerThread constructor(
|
||||
class CallMediaEncryptionModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
private val showZrtpSasValidationDialog: () -> Unit
|
||||
) {
|
||||
val mediaEncryption = MutableLiveData<String>()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class CallModel @WorkerThread constructor(val call: Call) {
|
||||
class CallModel
|
||||
@WorkerThread
|
||||
constructor(val call: Call) {
|
||||
companion object {
|
||||
private const val TAG = "[Call Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ import org.linphone.core.MediaDirection
|
|||
import org.linphone.core.StreamType
|
||||
import org.linphone.utils.AppUtils
|
||||
|
||||
class CallStatsModel @WorkerThread constructor() {
|
||||
class CallStatsModel
|
||||
@WorkerThread
|
||||
constructor() {
|
||||
val audioCodec = MutableLiveData<String>()
|
||||
val audioBandwidth = MutableLiveData<String>()
|
||||
val lossRate = MutableLiveData<String>()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ConfirmCallTransferDialogModel @UiThread constructor(
|
||||
class ConfirmCallTransferDialogModel
|
||||
@UiThread
|
||||
constructor(
|
||||
toTransfer: String,
|
||||
toReceiveTransfer: String
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ZrtpAlertDialogModel @UiThread constructor(val allowTryAgain: Boolean) : GenericViewModel() {
|
||||
class ZrtpAlertDialogModel
|
||||
@UiThread
|
||||
constructor(val allowTryAgain: Boolean) : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[ZRTP Alert Dialog]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ZrtpSasConfirmationDialogModel @UiThread constructor(
|
||||
class ZrtpSasConfirmationDialogModel
|
||||
@UiThread
|
||||
constructor(
|
||||
authTokenToRead: String,
|
||||
authTokensToListen: List<String>,
|
||||
val cacheMismatch: Boolean
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class CallsViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class CallsViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Calls ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ import org.linphone.utils.AudioUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class CurrentCallViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Current Call ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import androidx.window.layout.FoldingFeature
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class SharedCallViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class SharedCallViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
val toggleFullScreenEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
||||
val foldingState = MutableLiveData<FoldingFeature>()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package org.linphone.ui.file_viewer
|
||||
package org.linphone.ui.fileviewer
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
|
|
@ -20,8 +20,8 @@ import org.linphone.R
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.FileViewerActivityBinding
|
||||
import org.linphone.ui.GenericActivity
|
||||
import org.linphone.ui.file_viewer.adapter.PdfPagesListAdapter
|
||||
import org.linphone.ui.file_viewer.viewmodel.FileViewModel
|
||||
import org.linphone.ui.fileviewer.adapter.PdfPagesListAdapter
|
||||
import org.linphone.ui.fileviewer.viewmodel.FileViewModel
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
@UiThread
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.linphone.ui.file_viewer
|
||||
package org.linphone.ui.fileviewer
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
|
|
@ -21,8 +21,8 @@ import org.linphone.R
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.FileMediaViewerActivityBinding
|
||||
import org.linphone.ui.GenericActivity
|
||||
import org.linphone.ui.file_viewer.adapter.MediaListAdapter
|
||||
import org.linphone.ui.file_viewer.viewmodel.MediaListViewModel
|
||||
import org.linphone.ui.fileviewer.adapter.MediaListAdapter
|
||||
import org.linphone.ui.fileviewer.viewmodel.MediaListViewModel
|
||||
import org.linphone.ui.main.chat.model.FileModel
|
||||
import org.linphone.ui.main.viewmodel.SharedMainViewModel
|
||||
import org.linphone.utils.AppUtils
|
||||
|
|
@ -17,15 +17,15 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.adapter
|
||||
package org.linphone.ui.fileviewer.adapter
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.ui.file_viewer.fragment.MediaViewerFragment
|
||||
import org.linphone.ui.file_viewer.viewmodel.MediaListViewModel
|
||||
import org.linphone.ui.fileviewer.fragment.MediaViewerFragment
|
||||
import org.linphone.ui.fileviewer.viewmodel.MediaListViewModel
|
||||
|
||||
class MediaListAdapter(
|
||||
fragmentActivity: FragmentActivity,
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.adapter
|
||||
package org.linphone.ui.fileviewer.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -25,7 +25,7 @@ import android.view.ViewGroup
|
|||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.linphone.R
|
||||
import org.linphone.ui.file_viewer.viewmodel.FileViewModel
|
||||
import org.linphone.ui.fileviewer.viewmodel.FileViewModel
|
||||
|
||||
class PdfPagesListAdapter(private val viewModel: FileViewModel) : RecyclerView.Adapter<PdfPagesListAdapter.PdfPageViewHolder>() {
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PdfPageViewHolder {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.fragment
|
||||
package org.linphone.ui.fileviewer.fragment
|
||||
|
||||
import android.graphics.SurfaceTexture
|
||||
import android.os.Bundle
|
||||
|
|
@ -30,7 +30,7 @@ import androidx.annotation.UiThread
|
|||
import androidx.lifecycle.ViewModelProvider
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.FileMediaViewerChildFragmentBinding
|
||||
import org.linphone.ui.file_viewer.viewmodel.MediaViewModel
|
||||
import org.linphone.ui.fileviewer.viewmodel.MediaViewModel
|
||||
import org.linphone.ui.main.fragment.GenericMainFragment
|
||||
import org.linphone.ui.main.viewmodel.SharedMainViewModel
|
||||
import org.linphone.utils.FileUtils
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.view
|
||||
package org.linphone.ui.fileviewer.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.viewmodel
|
||||
package org.linphone.ui.fileviewer.viewmodel
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.pdf.PdfRenderer
|
||||
|
|
@ -42,7 +42,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class FileViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class FileViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[File ViewModel]"
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.viewmodel
|
||||
package org.linphone.ui.fileviewer.viewmodel
|
||||
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.annotation.WorkerThread
|
||||
|
|
@ -28,7 +28,9 @@ import org.linphone.ui.main.chat.viewmodel.AbstractConversationViewModel
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class MediaListViewModel @UiThread constructor() : AbstractConversationViewModel() {
|
||||
class MediaListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractConversationViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Media List ViewModel]"
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.file_viewer.viewmodel
|
||||
package org.linphone.ui.fileviewer.viewmodel
|
||||
|
||||
import android.media.AudioAttributes
|
||||
import android.media.MediaPlayer
|
||||
|
|
@ -35,7 +35,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MediaViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class MediaViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Media ViewModel]"
|
||||
}
|
||||
|
|
@ -220,6 +220,7 @@ class ConversationEventAdapter :
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
inner class EventViewHolder(
|
||||
val binding: ChatConversationEventBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ import org.linphone.R
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.ChatListFragmentBinding
|
||||
import org.linphone.ui.GenericActivity
|
||||
import org.linphone.ui.file_viewer.FileViewerActivity
|
||||
import org.linphone.ui.file_viewer.MediaViewerActivity
|
||||
import org.linphone.ui.fileviewer.FileViewerActivity
|
||||
import org.linphone.ui.fileviewer.MediaViewerActivity
|
||||
import org.linphone.ui.main.chat.adapter.ConversationsListAdapter
|
||||
import org.linphone.ui.main.chat.viewmodel.ConversationsListViewModel
|
||||
import org.linphone.ui.main.fragment.AbstractMainFragment
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.utils.LinphoneUtils
|
|||
import org.linphone.utils.ShortcutUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class ConversationModel @WorkerThread constructor(val chatRoom: ChatRoom) {
|
||||
class ConversationModel
|
||||
@WorkerThread
|
||||
constructor(val chatRoom: ChatRoom) {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import org.linphone.core.EventLog
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class EventLogModel @WorkerThread constructor(
|
||||
class EventLogModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val eventLog: EventLog,
|
||||
isFromGroup: Boolean = false,
|
||||
isGroupedWithPreviousOne: Boolean = false,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ import org.linphone.core.EventLog
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class EventModel @WorkerThread constructor(private val eventLog: EventLog) {
|
||||
class EventModel
|
||||
@WorkerThread
|
||||
constructor(private val eventLog: EventLog) {
|
||||
val text: String
|
||||
|
||||
val icon: Drawable?
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class FileModel @AnyThread constructor(
|
||||
class FileModel
|
||||
@AnyThread
|
||||
constructor(
|
||||
val path: String,
|
||||
val fileName: String,
|
||||
val fileSize: Long,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.annotation.WorkerThread
|
|||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.core.Address
|
||||
|
||||
class MessageBottomSheetParticipantModel @WorkerThread constructor(
|
||||
class MessageBottomSheetParticipantModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
address: Address,
|
||||
val value: String,
|
||||
val timestamp: Long,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MessageDeliveryModel @WorkerThread constructor(
|
||||
class MessageDeliveryModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
private val chatMessage: ChatMessage,
|
||||
private val onDeliveryUpdated: ((model: MessageDeliveryModel) -> Unit)? = null
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ import org.linphone.utils.PatternClickableSpan
|
|||
import org.linphone.utils.SpannableClickedListener
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MessageModel @WorkerThread constructor(
|
||||
class MessageModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val chatMessage: ChatMessage,
|
||||
val isFromGroup: Boolean,
|
||||
val isReply: Boolean,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ import org.linphone.core.ChatMessageListenerStub
|
|||
import org.linphone.core.ChatMessageReaction
|
||||
import org.linphone.core.tools.Log
|
||||
|
||||
class MessageReactionsModel @WorkerThread constructor(
|
||||
class MessageReactionsModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
private val chatMessage: ChatMessage,
|
||||
private val onReactionsUpdated: ((model: MessageReactionsModel) -> Unit)? = null
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ import org.linphone.LinphoneApplication.Companion.coreContext
|
|||
import org.linphone.core.Address
|
||||
import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
||||
|
||||
class ParticipantModel @WorkerThread constructor(
|
||||
class ParticipantModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val address: Address,
|
||||
val isMyselfAdmin: Boolean = false,
|
||||
val isParticipantAdmin: Boolean = false,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ import org.linphone.ui.main.chat.model.FileModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationDocumentsListViewModel @UiThread constructor() : AbstractConversationViewModel() {
|
||||
class ConversationDocumentsListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractConversationViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation Documents List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import org.linphone.ui.GenericViewModel
|
||||
|
||||
class ConversationEphemeralLifetimeViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ConversationEphemeralLifetimeViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
val currentlySelectedValue = MutableLiveData<Long>()
|
||||
|
||||
init {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationForwardMessageViewModel @UiThread constructor() : AddressSelectionViewModel() {
|
||||
class ConversationForwardMessageViewModel
|
||||
@UiThread
|
||||
constructor() : AddressSelectionViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation Forward Message ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationInfoViewModel @UiThread constructor() : AbstractConversationViewModel() {
|
||||
class ConversationInfoViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractConversationViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation Info ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ import org.linphone.ui.main.chat.model.FileModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationMediaListViewModel @UiThread constructor() : AbstractConversationViewModel() {
|
||||
class ConversationMediaListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractConversationViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation Media List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationViewModel @UiThread constructor() : AbstractConversationViewModel() {
|
||||
class ConversationViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractConversationViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversation ViewModel]"
|
||||
private const val MESSAGES_PER_PAGE = 30
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ import org.linphone.ui.main.viewmodel.AbstractMainViewModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationsListViewModel @UiThread constructor() : AbstractMainViewModel() {
|
||||
class ConversationsListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractMainViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Conversations List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class SendMessageInConversationViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class SendMessageInConversationViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Send Message In Conversation ViewModel]"
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class StartConversationViewModel @UiThread constructor() : AddressSelectionViewModel() {
|
||||
class StartConversationViewModel
|
||||
@UiThread
|
||||
constructor() : AddressSelectionViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Start Conversation ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class ContactAvatarModel @WorkerThread constructor(val friend: Friend, val address: Address? = null) : AbstractAvatarModel() {
|
||||
class ContactAvatarModel
|
||||
@WorkerThread
|
||||
constructor(val friend: Friend, val address: Address? = null) : AbstractAvatarModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Contact Avatar Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.annotation.WorkerThread
|
||||
import org.linphone.core.Address
|
||||
|
||||
class ContactDeviceModel @WorkerThread constructor(
|
||||
class ContactDeviceModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val name: String,
|
||||
val address: Address,
|
||||
val trusted: Boolean,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import org.linphone.core.Address
|
||||
import org.linphone.core.Friend
|
||||
|
||||
class ContactNumberOrAddressModel @WorkerThread constructor(
|
||||
class ContactNumberOrAddressModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val friend: Friend,
|
||||
val address: Address?,
|
||||
val displayedValue: String,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.annotation.WorkerThread
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
||||
class NewOrEditNumberOrAddressModel @WorkerThread constructor(
|
||||
class NewOrEditNumberOrAddressModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
defaultValue: String,
|
||||
val isSip: Boolean,
|
||||
val label: String? = "",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class NumberOrAddressPickerDialogModel @UiThread constructor(
|
||||
class NumberOrAddressPickerDialogModel
|
||||
@UiThread
|
||||
constructor(
|
||||
list: List<ContactNumberOrAddressModel>
|
||||
) {
|
||||
val sipAddressesAndPhoneNumbers = MutableLiveData<List<ContactNumberOrAddressModel>>()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class TrustCallDialogModel @UiThread constructor(contact: String, device: String) {
|
||||
class TrustCallDialogModel
|
||||
@UiThread
|
||||
constructor(contact: String, device: String) {
|
||||
val message = MutableLiveData<String>()
|
||||
|
||||
val doNotShowAnymore = MutableLiveData<Boolean>()
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ import org.linphone.ui.main.contacts.model.NewOrEditNumberOrAddressModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
class ContactNewOrEditViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ContactNewOrEditViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Contact New/Edit View Model]"
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.FileUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ContactViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ContactViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Contact ViewModel]"
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ import org.linphone.ui.main.viewmodel.AbstractMainViewModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
class ContactsListViewModel @UiThread constructor() : AbstractMainViewModel() {
|
||||
class ContactsListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractMainViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Contacts List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import org.linphone.R
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.HelpDebugFragmentBinding
|
||||
import org.linphone.ui.GenericActivity
|
||||
import org.linphone.ui.file_viewer.FileViewerActivity
|
||||
import org.linphone.ui.fileviewer.FileViewerActivity
|
||||
import org.linphone.ui.main.fragment.GenericMainFragment
|
||||
import org.linphone.ui.main.help.viewmodel.HelpViewModel
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
class HelpViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class HelpViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Help ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class CallLogHistoryModel @WorkerThread constructor(val callLog: CallLog) {
|
||||
class CallLogHistoryModel
|
||||
@WorkerThread
|
||||
constructor(val callLog: CallLog) {
|
||||
val id = callLog.callId ?: callLog.refKey
|
||||
|
||||
val isOutgoing = MutableLiveData<Boolean>()
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
|
||||
class CallLogModel
|
||||
@WorkerThread
|
||||
constructor(private val callLog: CallLog) {
|
||||
companion object {
|
||||
private const val TAG = "[Call Log Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ConfirmationDialogModel @UiThread constructor() {
|
||||
class ConfirmationDialogModel
|
||||
@UiThread
|
||||
constructor() {
|
||||
val dismissEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
||||
val cancelEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.core.tools.Log
|
||||
|
||||
open class NumpadModel @UiThread constructor(
|
||||
open class NumpadModel
|
||||
@UiThread
|
||||
constructor(
|
||||
private val inCallNumpad: Boolean,
|
||||
private val onDigitClicked: (value: String) -> (Unit),
|
||||
private val onVoicemailClicked: () -> (Unit),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@ import org.linphone.ui.main.viewmodel.AbstractMainViewModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class HistoryListViewModel @UiThread constructor() : AbstractMainViewModel() {
|
||||
class HistoryListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractMainViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[History List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class HistoryViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class HistoryViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[History ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.ui.main.viewmodel.AddressSelectionViewModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class StartCallViewModel @UiThread constructor() : AddressSelectionViewModel() {
|
||||
class StartCallViewModel
|
||||
@UiThread
|
||||
constructor() : AddressSelectionViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Start Call ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ package org.linphone.ui.main.meetings.model
|
|||
import androidx.annotation.WorkerThread
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MeetingListItemModel @WorkerThread constructor(
|
||||
class MeetingListItemModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
meetingModel: MeetingModel?,
|
||||
val firstMeetingOfTheWeek: Boolean
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ import org.linphone.core.Participant
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MeetingModel @WorkerThread constructor(val conferenceInfo: ConferenceInfo) {
|
||||
class MeetingModel
|
||||
@WorkerThread
|
||||
constructor(val conferenceInfo: ConferenceInfo) {
|
||||
companion object {
|
||||
private const val TAG = "[Meeting Model]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.WorkerThread
|
|||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.core.Address
|
||||
|
||||
class ParticipantModel @WorkerThread constructor(address: Address, val isOrganizer: Boolean) {
|
||||
class ParticipantModel
|
||||
@WorkerThread
|
||||
constructor(address: Address, val isOrganizer: Boolean) {
|
||||
val sipUri = address.asStringUriOnly()
|
||||
|
||||
val avatarModel = coreContext.contactsManager.getContactAvatarModelForAddress(address)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MeetingViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class MeetingViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Meeting ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ import org.linphone.utils.AppUtils
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MeetingWaitingRoomViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class MeetingWaitingRoomViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Meeting Waiting Room ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class MeetingsListViewModel @UiThread constructor() : AbstractMainViewModel() {
|
||||
class MeetingsListViewModel
|
||||
@UiThread
|
||||
constructor() : AbstractMainViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Meetings List ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ import org.linphone.utils.Event
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class ScheduleMeetingViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class ScheduleMeetingViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Schedule Meeting ViewModel]"
|
||||
}
|
||||
|
|
@ -514,9 +516,9 @@ class ScheduleMeetingViewModel @UiThread constructor() : GenericViewModel() {
|
|||
|
||||
isBroadcastSelected.postValue(false) // TODO FIXME: not implemented yet
|
||||
|
||||
startTimestamp = conferenceInfo.dateTime * 1000 /* Linphone timestamps are in seconds */
|
||||
startTimestamp = conferenceInfo.dateTime * 1000 // Linphone timestamps are in seconds
|
||||
endTimestamp =
|
||||
(conferenceInfo.dateTime + conferenceInfo.duration * 60) * 1000 /* Linphone timestamps are in seconds */
|
||||
(conferenceInfo.dateTime + conferenceInfo.duration * 60) * 1000 // Linphone timestamps are in seconds
|
||||
Log.i(
|
||||
"$TAG Loaded start date is [$startTimestamp], loaded end date is [$endTimestamp]"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class AccountModel @WorkerThread constructor(
|
||||
class AccountModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val account: Account,
|
||||
private val onMenuClicked: ((view: View, account: Account) -> Unit)? = null
|
||||
) : AbstractAvatarModel() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import org.linphone.R
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class AuthRequestedDialogModel @UiThread constructor(identity: String) {
|
||||
class AuthRequestedDialogModel
|
||||
@UiThread
|
||||
constructor(identity: String) {
|
||||
val message = MutableLiveData<String>()
|
||||
|
||||
val password = MutableLiveData<String>()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
class ConversationContactOrSuggestionModel @WorkerThread constructor(
|
||||
class ConversationContactOrSuggestionModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val address: Address,
|
||||
val localAddress: Address? = null,
|
||||
conversationSubject: String? = null,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.lifecycle.MediatorLiveData
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class GroupSetOrEditSubjectDialogModel @UiThread constructor(
|
||||
class GroupSetOrEditSubjectDialogModel
|
||||
@UiThread
|
||||
constructor(
|
||||
initialSubject: String,
|
||||
val isGroupConversation: Boolean
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import androidx.annotation.WorkerThread
|
|||
import org.linphone.core.Address
|
||||
import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
||||
|
||||
class SelectedAddressModel @WorkerThread constructor(
|
||||
class SelectedAddressModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val address: Address,
|
||||
val avatarModel: ContactAvatarModel?,
|
||||
private val onRemovedFromSelection: ((model: SelectedAddressModel) -> Unit)? = null
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ import org.linphone.utils.FileUtils
|
|||
import org.linphone.utils.LinphoneUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class RecordingModel @WorkerThread constructor(
|
||||
class RecordingModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val filePath: String,
|
||||
val fileName: String,
|
||||
isLegacy: Boolean = false
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ import org.linphone.ui.main.recordings.model.RecordingModel
|
|||
import org.linphone.utils.AudioUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class RecordingMediaPlayerViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class RecordingMediaPlayerViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Recording Media Player ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ import org.linphone.ui.main.recordings.model.RecordingModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
class RecordingsListViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class RecordingsListViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Recordings List ViewModel]"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ import org.linphone.core.AccountDevice
|
|||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class AccountDeviceModel @WorkerThread constructor(
|
||||
class AccountDeviceModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
private val accountDevice: AccountDevice,
|
||||
private val onRemove: (model: AccountDeviceModel, accountDevice: AccountDevice) -> (Unit)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import androidx.annotation.UiThread
|
|||
import androidx.annotation.WorkerThread
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
||||
class CodecModel @WorkerThread constructor(
|
||||
class CodecModel
|
||||
@WorkerThread
|
||||
constructor(
|
||||
val mimeType: String,
|
||||
clockRate: Int,
|
||||
recvFmtp: String?,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ import org.linphone.ui.main.settings.model.AccountDeviceModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.FileUtils
|
||||
|
||||
class AccountProfileViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class AccountProfileViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Account Profile ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class AccountSettingsViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class AccountSettingsViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Account Settings ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ import org.linphone.core.tools.Log
|
|||
import org.linphone.ui.GenericViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class CardDavViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class CardDavViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[CardDAV ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ import org.linphone.ui.main.settings.model.CodecModel
|
|||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class SettingsViewModel @UiThread constructor() : GenericViewModel() {
|
||||
class SettingsViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Settings ViewModel]"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ import org.linphone.ui.main.model.AccountModel
|
|||
import org.linphone.utils.Event
|
||||
import org.linphone.utils.LinphoneUtils
|
||||
|
||||
open class AbstractMainViewModel @UiThread constructor() : GenericViewModel() {
|
||||
open class AbstractMainViewModel
|
||||
@UiThread
|
||||
constructor() : GenericViewModel() {
|
||||
companion object {
|
||||
private const val TAG = "[Abstract Main ViewModel]"
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue