Commit 3190a186 authored by Sylvain Berfini's avatar Sylvain Berfini :cow:
Browse files

Added firebase project ID in troubleshooting fragment, updated icons

Showing with 80 additions and 3 deletions
......@@ -23,6 +23,7 @@ import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.google.firebase.FirebaseApp
import kotlinx.coroutines.launch
import org.linphone.BuildConfig
import org.linphone.LinphoneApplication.Companion.coreContext
......@@ -49,6 +50,8 @@ class HelpViewModel @UiThread constructor() : GenericViewModel() {
val sdkVersion = MutableLiveData<String>()
val firebaseProjectId = MutableLiveData<String>()
val checkUpdateAvailable = MutableLiveData<Boolean>()
val uploadLogsAvailable = MutableLiveData<Boolean>()
......@@ -138,6 +141,8 @@ class HelpViewModel @UiThread constructor() : GenericViewModel() {
sdkVersion.value = coreContext.sdkVersion
logsUploadInProgress.value = false
firebaseProjectId.value = FirebaseApp.getInstance().options.projectId
coreContext.postOnCoreThread { core ->
core.addListener(coreListener)
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:pathData="M93.19,329.38 L140.64,25.31c1.64,-10.37 15.55,-12.82 20.46,-3.55l51,95.45ZM432,400 L385.26,123.21a11,11 0,0 0,-18.54 -6L80,400l159.36,91.91a33.18,33.18 0,0 0,31.91 0ZM302.36,158.93 L265.82,89.39a10.86,10.86 0,0 0,-19.36 0L85.83,375.74Z"
android:fillColor="#4e6074"/>
</vector>
<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="M239.82,114.19 L72,18.16a16,16 0,0 0,-16.12 0A15.68,15.68 0,0 0,48 31.87L48,224.13a15.68,15.68 0,0 0,7.92 13.67,16 16,0 0,0 16.12,0l167.78,-96a15.75,15.75 0,0 0,0 -27.62ZM64,212.67L64,43.33L148.69,128ZM160,139.31 L178.92,158.23 90.42,208.89ZM90.4,47.1l88.53,50.67L160,116.69ZM193.31,150l-22,-22 22,-22 38.43,22Z"
android:fillColor="#4e6074"/>
</vector>
<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="M223.68,66.15 L135.68,18a15.88,15.88 0,0 0,-15.36 0l-88,48.17a16,16 0,0 0,-8.32 14v95.64a16,16 0,0 0,8.32 14l88,48.17a15.88,15.88 0,0 0,15.36 0l88,-48.17a16,16 0,0 0,8.32 -14L232,80.18A16,16 0,0 0,223.68 66.15ZM128,32l80.34,44 -29.77,16.3 -80.35,-44ZM128,120 L47.66,76l33.9,-18.56 80.34,44ZM40,90l80,43.78v85.79L40,175.82ZM216,175.78h0l-80,43.79L136,133.82l32,-17.51L168,152a8,8 0,0 0,16 0L184,107.55L216,90v85.77Z"
android:fillColor="#4e6074"/>
</vector>
......@@ -110,7 +110,7 @@
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@drawable/info"
android:src="@drawable/google_play"
android:contentDescription="@null"
app:tint="?attr/color_main1_500"
app:layout_constraintStart_toStartOf="parent"
......@@ -153,7 +153,7 @@
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@drawable/info"
android:src="@drawable/resource_package"
android:contentDescription="@null"
app:tint="?attr/color_main1_500"
app:layout_constraintStart_toStartOf="parent"
......@@ -190,6 +190,49 @@
app:layout_constraintStart_toEndOf="@id/sdk_version_icon"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/firebase_project_icon"
android:onClick="@{sdkVersionClickListener}"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@drawable/firebase"
android:contentDescription="@null"
app:tint="?attr/color_main1_500"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/firebase_project_title"
app:layout_constraintTop_toTopOf="@id/firebase_project_title"
app:layout_constraintBottom_toBottomOf="@id/firebase_project_title" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/header_style"
android:id="@+id/firebase_project_title"
android:onClick="@{sdkVersionClickListener}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="20dp"
android:text="@string/help_troubleshooting_firebase_project_title"
app:layout_constraintTop_toBottomOf="@id/sdk_version_subtitle"
app:layout_constraintStart_toEndOf="@id/firebase_project_icon"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/firebase_project_subtitle"
android:onClick="@{sdkVersionClickListener}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@{viewModel.firebaseProjectId, default=`linphone-android-8a563`}"
android:textSize="14sp"
android:textColor="?attr/color_main2_600"
app:layout_constraintTop_toBottomOf="@id/firebase_project_title"
app:layout_constraintStart_toEndOf="@id/firebase_project_icon"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/tertiary_button_label_style"
android:onClick="@{() -> viewModel.showConfigFile()}"
......@@ -209,7 +252,7 @@
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/sdk_version_subtitle"/>
app:layout_constraintTop_toBottomOf="@id/firebase_project_subtitle"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/settings_title_style"
......
......@@ -166,6 +166,7 @@
<string name="help_troubleshooting_share_logs">Partager les journaux</string>
<string name="help_troubleshooting_app_version_title">Version de l\'application</string>
<string name="help_troubleshooting_sdk_version_title">Version du SDK</string>
<string name="help_troubleshooting_firebase_project_title">ID du projet Firebase</string>
<string name="help_troubleshooting_share_logs_dialog_title">Partager le lien vers journaux avec…</string>
<string name="help_troubleshooting_debug_logs_cleaned_toast_message">Les journaux ont été nettoyés</string>
<string name="help_troubleshooting_debug_logs_upload_error_toast_message">Echec à l\'envoi des journaux</string>
......
......@@ -203,6 +203,7 @@
<string name="help_troubleshooting_share_logs">Share logs</string>
<string name="help_troubleshooting_app_version_title">App version</string>
<string name="help_troubleshooting_sdk_version_title">SDK version</string>
<string name="help_troubleshooting_firebase_project_title">Firebase project ID</string>
<string name="help_troubleshooting_share_logs_dialog_title">Share debug logs link using…</string>
<string name="help_troubleshooting_debug_logs_cleaned_toast_message">Debug logs have been cleaned</string>
<string name="help_troubleshooting_debug_logs_upload_error_toast_message">Failed to upload debug logs</string>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment