Skip to content

Commit 2c3674b

Browse files
committed
feat: Do not log NameNotFoundException to sentry when saving to kDrive
When saving an email to kDrive, we check if the app is installed on the device. To know that the app is not installed, we need to catch a NameNotFoundException. This is an expected behavior and doesn't need to be logged to sentry
1 parent 5930a1c commit 2c3674b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/java/com/infomaniak/mail/utils/SaveOnKDriveUtils.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Infomaniak Mail - Android
3-
* Copyright (C) 2024 Infomaniak Network SA
3+
* Copyright (C) 2024-2025 Infomaniak Network SA
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@ package com.infomaniak.mail.utils
1919

2020
import android.content.Context
2121
import android.content.pm.PackageManager
22-
import io.sentry.Sentry
2322

2423
object SaveOnKDriveUtils {
2524
const val DRIVE_PACKAGE = "com.infomaniak.drive"
@@ -29,7 +28,6 @@ object SaveOnKDriveUtils {
2928
val packageInfo = context.packageManager.getPackageInfo(DRIVE_PACKAGE, PackageManager.GET_ACTIVITIES)
3029
packageInfo.activities.any { it.name == SAVE_EXTERNAL_ACTIVITY_CLASS }
3130
}.getOrElse {
32-
Sentry.captureException(it)
3331
false
3432
}
3533
}

0 commit comments

Comments
 (0)