Code cleanup, bumped dependencies & gradle

This commit is contained in:
Sylvain Berfini 2025-06-20 13:52:03 +02:00
parent 4d8ab32da7
commit 67e3c51a84
21 changed files with 21 additions and 55 deletions

View file

@ -49,7 +49,7 @@ class CorePreferences
@get:WorkerThread @set:WorkerThread
var printLogsInLogcat: Boolean
get() = config.getBool("app", "debug", org.linphone.BuildConfig.DEBUG)
get() = config.getBool("app", "debug", BuildConfig.DEBUG)
set(value) {
config.setBool("app", "debug", value)
}

View file

@ -1817,7 +1817,7 @@ class NotificationsManager
return TaskStackBuilder.create(context).run {
addNextIntentWithParentStack(
Intent(context, MainActivity::class.java).apply {
setAction(Intent.ACTION_MAIN) // Needed as well
action = Intent.ACTION_MAIN // Needed as well
putExtras(args) // Need to pass args here for Chat extra
}
)

View file

@ -258,7 +258,7 @@ class ActiveCallFragment : GenericCallFragment() {
)
} else {
// Only allow "trying again" once
showZrtpAlertDialog(false)
showZrtpAlertDialog()
}
}
}
@ -408,7 +408,7 @@ class ActiveCallFragment : GenericCallFragment() {
if (callViewModel.isZrtpAlertDialogVisible) {
Log.i("$TAG Fragment resuming, showing ZRTP alert dialog")
showZrtpAlertDialog(false)
showZrtpAlertDialog()
} else if (callViewModel.isZrtpDialogVisible) {
Log.i("$TAG Fragment resuming, showing ZRTP SAS validation dialog")
callViewModel.showZrtpSasDialogIfPossible()
@ -481,12 +481,12 @@ class ActiveCallFragment : GenericCallFragment() {
callViewModel.isZrtpDialogVisible = true
}
private fun showZrtpAlertDialog(allowTryAgain: Boolean = true) {
private fun showZrtpAlertDialog() {
if (zrtpSasDialog != null) {
zrtpSasDialog?.dismiss()
}
val model = ZrtpAlertDialogModel(allowTryAgain)
val model = ZrtpAlertDialogModel(false)
val dialog = DialogUtils.getZrtpAlertDialog(requireActivity(), model)
model.tryAgainEvent.observe(viewLifecycleOwner) { event ->

View file

@ -77,6 +77,7 @@ import org.linphone.utils.DialogUtils
import org.linphone.utils.Event
import org.linphone.utils.FileUtils
import org.linphone.utils.LinphoneUtils
import androidx.core.content.edit
@UiThread
class MainActivity : GenericActivity() {
@ -414,9 +415,8 @@ class MainActivity : GenericActivity() {
HISTORY_FRAGMENT_ID
}
}
with(getPreferences(MODE_PRIVATE).edit()) {
getPreferences(MODE_PRIVATE).edit {
putInt(DEFAULT_FRAGMENT_KEY, defaultFragmentId)
apply()
}
Log.i("$TAG Stored [$defaultFragmentId] as default page")

View file

@ -207,8 +207,6 @@ class SettingsViewModel
val deviceName = MutableLiveData<String>()
val remoteProvisioningUrl = MutableLiveData<String>()
val expandAdvancedCalls = MutableLiveData<Boolean>()
val mediaEncryptionIndex = MutableLiveData<Int>()
val mediaEncryptionLabels = arrayListOf<String>()
private val mediaEncryptionValues = arrayListOf<MediaEncryption>()
@ -288,7 +286,6 @@ class SettingsViewModel
expandNetwork.value = false
expandUserInterface.value = false
expandTunnel.value = false
expandAdvancedCalls.value = false
expandAudioDevices.value = false
expandAudioCodecs.value = false
expandVideoCodecs.value = false
@ -1002,11 +999,6 @@ class SettingsViewModel
}
}
@UiThread
fun toggleAdvancedCallsExpand() {
expandAdvancedCalls.value = expandAdvancedCalls.value == false
}
@UiThread
fun toggleAudioDevicesExpand() {
expandAudioDevices.value = expandAudioDevices.value == false

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M213.66,66.34l-40,-40A8,8 0,0 0,168 24L88,24A16,16 0,0 0,72 40L72,56L56,56A16,16 0,0 0,40 72L40,216a16,16 0,0 0,16 16L168,232a16,16 0,0 0,16 -16L184,200h16a16,16 0,0 0,16 -16L216,72A8,8 0,0 0,213.66 66.34ZM168,216L56,216L56,72h76.69L168,107.31v84.53c0,0.06 0,0.11 0,0.16s0,0.1 0,0.16L168,216ZM200,184L184,184L184,104a8,8 0,0 0,-2.34 -5.66l-40,-40A8,8 0,0 0,136 56L88,56L88,40h76.69L200,75.31ZM144,152a8,8 0,0 1,-8 8L88,160a8,8 0,0 1,0 -16h48A8,8 0,0 1,144 152ZM144,184a8,8 0,0 1,-8 8L88,192a8,8 0,0 1,0 -16h48A8,8 0,0 1,144 184Z"
android:fillColor="#4e6074"/>
</vector>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<corners android:radius="15dp" />
<solid android:color="?attr/color_grey_100"/>
</shape>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="?attr/color_main2_200" />
</shape>

View file

@ -127,7 +127,7 @@
android:layout_marginBottom="10dp"
app:alignTopRight="true"
app:displayMode="black_bars"
roundCornersRadius="@dimen/call_round_corners_texture_view_radius"
app:radius="@dimen/call_round_corners_texture_view_radius"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/call_video_preview_max_size"

View file

@ -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" />

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/color_separator">
android:background="?attr/color_separator"
tools:ignore="Overdraw">
</View>

View file

@ -88,7 +88,7 @@
android:layout_marginEnd="10dp"
app:alignTopRight="true"
app:displayMode="black_bars"
roundCornersRadius="@dimen/call_round_corners_texture_view_radius"
app:radius="@dimen/call_round_corners_texture_view_radius"
app:layout_constraintBottom_toTopOf="@id/add_participants"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/call_video_preview_max_size"

View file

@ -121,7 +121,7 @@
android:layout_marginBottom="10dp"
app:alignTopRight="true"
app:displayMode="black_bars"
roundCornersRadius="@dimen/call_round_corners_texture_view_radius"
app:radius="@dimen/call_round_corners_texture_view_radius"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/call_video_preview_max_size"

View file

@ -86,7 +86,7 @@
android:layout_marginEnd="10dp"
app:alignTopRight="true"
app:displayMode="black_bars"
roundCornersRadius="@dimen/call_round_corners_texture_view_radius"
app:radius="@dimen/call_round_corners_texture_view_radius"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/call_video_preview_max_size"

View file

@ -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" />

View file

@ -69,7 +69,7 @@
android:padding="10dp"
android:src="@{viewModel.isMediaPlaying ? @drawable/pause_fill : @drawable/play_fill, default=@drawable/play_fill}"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_play_pause_audio_playback"
android:contentDescription="@string/content_description_play_pause_video_playback"
android:background="@drawable/circle_transparent_dark_button_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -33,7 +33,6 @@
<string name="dialog_accept">Accepter</string>
<string name="dialog_cancel">Annuler</string>
<string name="dialog_continue">Continuer</string>
<string name="dialog_ok">OK</string>
<string name="dialog_call">Appeler</string>
<string name="dialog_delete">Supprimer</string>
<string name="dialog_install">Installer</string>
@ -86,7 +85,6 @@
<!-- Generic toasts -->
<string name="sip_address_copied_to_clipboard_toast">Adresse copiée</string>
<string name="new_account_configured_toast">Nouveau compte ajouté</string>
<string name="default_account_connection_state_error_toast">Erreur de connexion !</string>
<string name="file_successfully_exported_to_media_store_toast">Média exporté</string>
<string name="export_file_to_media_store_error_toast">Échec de l\'exportation</string>
<string name="file_successfully_exported_to_documents_toast">Document exporté</string>
@ -372,7 +370,6 @@
<string name="account_settings_dialog_invalid_password_hint">Mot de passe</string>
<string name="account_failed_to_find_identity_toast">Le compte selectionné est introuvable !</string>
<string name="history_title">Historique d\'appel</string>
<string name="history_call_start_title">Nouvel appel</string>
<string name="history_call_start_search_bar_filter_hint">Cherchez un contact ou une suggestion</string>
<string name="history_call_start_create_group_call">Démarrer un appel de groupe</string>

View file

@ -6,7 +6,6 @@
<dimen name="screen_bottom_margin">10dp</dimen>
<dimen name="landscape_nav_bar_width">80dp</dimen>
<dimen name="bottom_nav_bar_text_size">12sp</dimen>
<dimen name="sliding_pane_left_fragment_width">350dp</dimen>
<dimen name="sliding_pane_right_fragment_width">300dp</dimen>

View file

@ -73,7 +73,6 @@
<string name="dialog_accept">Accept</string>
<string name="dialog_cancel">Cancel</string>
<string name="dialog_continue">Continue</string>
<string name="dialog_ok">OK</string>
<string name="dialog_call">Call</string>
<string name="dialog_delete">Delete</string>
<string name="dialog_install">Install</string>
@ -127,7 +126,6 @@
<!-- Generic toasts -->
<string name="sip_address_copied_to_clipboard_toast">SIP address copied into clipboard</string>
<string name="new_account_configured_toast">New account configured</string>
<string name="default_account_connection_state_error_toast">Connection error!</string>
<string name="file_successfully_exported_to_media_store_toast">File has been exported to native gallery</string>
<string name="export_file_to_media_store_error_toast">Error trying to export file to native gallery</string>
<string name="file_successfully_exported_to_documents_toast">File has been exported to documents</string>
@ -414,7 +412,6 @@
<string name="account_failed_to_find_identity_toast">Failed to find matching account!</string>
<!-- Call history -->
<string name="history_title">Call history</string>
<string name="history_call_start_title">New call</string>
<string name="history_call_start_search_bar_filter_hint">Search contact or history call</string>
<string name="history_call_start_create_group_call">Create a group call</string>

View file

@ -2,8 +2,8 @@
agp = "8.10.1"
kotlin = "2.0.21"
gmsGoogleServices = "4.4.2"
firebaseCrashlytics = "3.0.3"
firebaseBomVersion = "33.14.0"
firebaseCrashlytics = "3.0.4"
firebaseBomVersion = "33.15.0"
ktlint = "12.1.2"
annotations = "1.9.1"

View file

@ -1,6 +1,6 @@
#Thu Jun 22 12:11:25 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists