Skip to content

refactor: Improve RSSI reading robustness in connection info#3798

Merged
jamesarich merged 1 commit into
mainfrom
fix/bonding-crash
Nov 24, 2025
Merged

refactor: Improve RSSI reading robustness in connection info#3798
jamesarich merged 1 commit into
mainfrom
fix/bonding-crash

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit adds a try-catch block around the readRssi() call within the CurrentlyConnectedInfo composable.

  • This prevents the application from crashing if reading the RSSI fails for any reason.
  • An error is now logged using Timber instead of crashing the coroutine.
  • Added @Suppress("TooGenericExceptionCaught") to acknowledge catching the generic Exception.

This commit adds a try-catch block around the `readRssi()` call within the `CurrentlyConnectedInfo` composable.

- This prevents the application from crashing if reading the RSSI fails for any reason.
- An error is now logged using `Timber` instead of crashing the coroutine.
- Added `@Suppress("TooGenericExceptionCaught")` to acknowledge catching the generic `Exception`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich enabled auto-merge November 24, 2025 18:52
@github-actions github-actions Bot added the bugfix PR tag label Nov 24, 2025
@codecov

codecov Bot commented Nov 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.55%. Comparing base (9aef9a2) to head (e6ad291).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...i/connections/components/CurrentlyConnectedInfo.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3798      +/-   ##
========================================
- Coverage   0.55%   0.55%   -0.01%     
========================================
  Files        381     381              
  Lines      21861   21862       +1     
  Branches    2708    2708              
========================================
  Hits         122     122              
- Misses     21719   21720       +1     
  Partials      20      20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 3e4e9d5 Nov 24, 2025
6 checks passed
@jamesarich jamesarich deleted the fix/bonding-crash branch November 24, 2025 19:03
@jamesarich jamesarich added this to the 2.7.8 milestone Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant