Commit ad7010a
committed
feat(android): implement connection watchdog, optimize autoconnect, and refine socket ping interval
- Enable OkHttp pingInterval (10 seconds) on the client WebSocket to automatically detect half-open sockets and lost connections faster.
- Introduce a connection watchdog in WebSocketUtil to monitor connection health and coordinate with the macOS server's reconnect grace timer.
- Refactor AirSyncService and WakeupHandler to improve auto-start and connection reliability after reboot.
- Enable directBootAware for MediaNotificationListener and AirSyncService.
- Optimize network state validation and simplify network state tracking by cleaning up dead code.
- Send manual disconnect signals over BLE before terminating connection to prevent ghost sessions on Mac.1 parent 4da51ab commit ad7010a
12 files changed
Lines changed: 814 additions & 446 deletions
File tree
- app/src/main
- java/com/sameerasw/airsync
- presentation/viewmodel
- service
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | 182 | | |
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
| 186 | + | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
| |||
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
222 | 233 | | |
223 | 234 | | |
224 | 235 | | |
| |||
749 | 760 | | |
750 | 761 | | |
751 | 762 | | |
752 | | - | |
| 763 | + | |
753 | 764 | | |
754 | 765 | | |
755 | 766 | | |
| |||
780 | 791 | | |
781 | 792 | | |
782 | 793 | | |
783 | | - | |
| 794 | + | |
784 | 795 | | |
785 | 796 | | |
786 | 797 | | |
| |||
803 | 814 | | |
804 | 815 | | |
805 | 816 | | |
806 | | - | |
| 817 | + | |
807 | 818 | | |
808 | 819 | | |
809 | 820 | | |
| |||
862 | 873 | | |
863 | 874 | | |
864 | 875 | | |
865 | | - | |
| 876 | + | |
866 | 877 | | |
867 | 878 | | |
868 | 879 | | |
| |||
0 commit comments