Skip to content

refactor: Use device address to manage service lifecycle#4251

Merged
jamesarich merged 1 commit into
mainfrom
fix/lifecycle
Jan 18, 2026
Merged

refactor: Use device address to manage service lifecycle#4251
jamesarich merged 1 commit into
mainfrom
fix/lifecycle

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit updates MeshService to use the current device address (getDeviceAddress) instead of the bonded device address (getBondedDeviceAddress) to determine if it should run in the foreground.

This ensures the service correctly stops itself when no device is actively selected, improving lifecycle management. Logging has also been added to clarify when the service is stopped for this reason and to note when the task is removed.

This commit updates `MeshService` to use the current device address (`getDeviceAddress`) instead of the bonded device address (`getBondedDeviceAddress`) to determine if it should run in the foreground.

This ensures the service correctly stops itself when no device is actively selected, improving lifecycle management. Logging has also been added to clarify when the service is stopped for this reason and to note when the task is removed.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the bugfix PR tag label Jan 17, 2026
@codecov

codecov Bot commented Jan 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (46a2c68) to head (8e781df).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4251   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         23      23           
  Branches       7       7           
=====================================
  Misses        23      23           

☔ 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 Jan 18, 2026
Merged via the queue into main with commit a418563 Jan 18, 2026
8 checks passed
@jamesarich jamesarich deleted the fix/lifecycle branch January 18, 2026 02:23
jamesarich added a commit to jamesarich/Meshtastic-Android that referenced this pull request Jan 21, 2026
…4251)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
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