mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-18 06:08:29 +00:00
Merge branch 'fix/anfe' into 'release/6.2'
Added missing try/catch on PickVisualMediaRequest See merge request BC/public/linphone-android!2486
This commit is contained in:
commit
9d118d8101
4 changed files with 30 additions and 7 deletions
|
|
@ -693,14 +693,22 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
||||||
|
|
||||||
binding.setOpenFilePickerClickListener {
|
binding.setOpenFilePickerClickListener {
|
||||||
Log.i("$TAG Opening file picker")
|
Log.i("$TAG Opening file picker")
|
||||||
pickDocument.launch(arrayOf("*/*"))
|
try {
|
||||||
|
pickDocument.launch(arrayOf("*/*"))
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e("$TAG Failed to start file picker: $anfe")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setOpenMediaPickerClickListener {
|
binding.setOpenMediaPickerClickListener {
|
||||||
Log.i("$TAG Opening media picker")
|
Log.i("$TAG Opening media picker")
|
||||||
pickMedia.launch(
|
try {
|
||||||
PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageAndVideo)
|
pickMedia.launch(
|
||||||
)
|
PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageAndVideo)
|
||||||
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e("$TAG Failed to start media picker: $anfe")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setOpenCameraClickListener {
|
binding.setOpenCameraClickListener {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.main.contacts.fragment
|
package org.linphone.ui.main.contacts.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
|
@ -212,7 +213,11 @@ class EditContactFragment : SlidingPaneChildFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickImage() {
|
private fun pickImage() {
|
||||||
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
try {
|
||||||
|
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e("$TAG Failed to start media picker: $anfe")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showAbortConfirmationDialogIfPendingChanges() {
|
private fun showAbortConfirmationDialogIfPendingChanges() {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.main.contacts.fragment
|
package org.linphone.ui.main.contacts.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
|
@ -214,7 +215,11 @@ class NewContactFragment : GenericMainFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickImage() {
|
private fun pickImage() {
|
||||||
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
try {
|
||||||
|
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e("$TAG Failed to start media picker: $anfe")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showAbortConfirmationDialogIfPendingChanges() {
|
private fun showAbortConfirmationDialogIfPendingChanges() {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.main.settings.fragment
|
package org.linphone.ui.main.settings.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
@ -223,7 +224,11 @@ class AccountProfileFragment : GenericMainFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickImage() {
|
private fun pickImage() {
|
||||||
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
try {
|
||||||
|
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e("$TAG Failed to start media picker: $anfe")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun copyAddressToClipboard(value: String) {
|
private fun copyAddressToClipboard(value: String) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue