Bangle.js: Fix location listener not being cleaned up when waiting for reconnect #3132

Merged
joserebelo merged 5 commits from halemmerich/Gadgetbridge:fixreconnect into master 2023-05-22 22:17:17 +00:00
Contributor

Currently a loss in BT connectivity while using the phones GPS for the Bangle causes the GBLocationManager not being stopped. This causes GadgetBridge show the Bangle as connected but no communication is possible until a manual reconnect. This pull request fixes that by cleaning up the location manager while handling GBDevice.ACTION_DEVICE_CHANGED when the state is GBDevice.State.WAITING_FOR_RECONNECT.

Currently a loss in BT connectivity while using the phones GPS for the Bangle causes the GBLocationManager not being stopped. This causes GadgetBridge show the Bangle as connected but no communication is possible until a manual reconnect. This pull request fixes that by cleaning up the location manager while handling `GBDevice.ACTION_DEVICE_CHANGED` when the state is `GBDevice.State.WAITING_FOR_RECONNECT`.
halemmerich added 4 commits 2023-05-18 13:28:11 +00:00
joserebelo reviewed 2023-05-18 20:47:22 +00:00
@ -8,3 +8,3 @@
android:title="Use phone gps data" />
<EditTextPreference
android:defaultValue="10000"
android:defaultValue="1000"
Member

Unintended change? The default in BangleJSDeviceSupport is 10000.

Unintended change? The default in BangleJSDeviceSupport is 10000.
Author
Contributor

Actually intended change to make the interval the same as Bangle internal GPS. Did not see the value exists in both the resource file and code.

Actually intended change to make the interval the same as Bangle internal GPS. Did not see the value exists in both the resource file and code.
joserebelo marked this conversation as resolved
halemmerich force-pushed fixreconnect from 77f4f35a8d to fa3b497718 2023-05-18 21:16:35 +00:00 Compare
Member

Would it be possible to get this merged? It looks good to me...

Would it be possible to get this merged? It looks good to me...
joserebelo merged commit fd9efdcb72 into master 2023-05-22 22:17:17 +00:00
halemmerich deleted branch fixreconnect 2023-05-24 16:48:48 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Freeyourgadget/Gadgetbridge#3132
No description provided.