Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Fix warning
  • Loading branch information
Rawa committed Jan 25, 2024
1 parent 51adf54 commit 8d925bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import androidx.core.graphics.drawable.toBitmapOrNull
fun PackageManager.getApplicationIconBitmapOrNull(packageName: String): Bitmap? =
try {
getApplicationIcon(packageName).toBitmapOrNull()
} catch (e: Exception) {
} catch (e: PackageManager.NameNotFoundException) {
// Name not found is thrown if the application is not installed
null
} catch (e: IllegalArgumentException) {
// IllegalArgumentException is thrown if the application has an invalid icon
when (e) {
is PackageManager.NameNotFoundException,
is IllegalArgumentException -> null
else -> throw e
}
null
}
11 changes: 5 additions & 6 deletions android/config/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ console-reports:
output-reports:
active: true
exclude:
- 'TxtOutputReport'
- 'XmlOutputReport'
# - 'HtmlOutputReport'
- 'MdOutputReport'
- 'SarifOutputReport'
- 'sarif'
- 'TxtOutputReport'
- 'XmlOutputReport'
- 'MdOutputReport'
- 'SarifOutputReport'
- 'sarif'

comments:
active: true
Expand Down

0 comments on commit 8d925bd

Please sign in to comment.