~/talk

14 State Machines That Must Agree for Bluetooth to Work

Talkat droidCon USA 2026 · on Thursday, 2026-07-16· at 16:10· W224 A· [android, concurrency]
slides:none on file

Android Bluetooth requires 14 state machines to reach consistent states for simple connect/pair flows, not just one. The stack uses the state-machine base class plus a handler looper FIFO message model and a typical 10 second timeout to avoid phantom connected states; codecs negotiated are LDAC/AAC/SBC and LE Audio moves to LC3 with multi‑streaming. Debugging relies on Bluetooth dumps + HCI logs + logcat, unit/mock loopers, and CLI-driven end‑to‑end tests; these patterns cut false positives and codec deadlocks in practice.

AI-written summary · about

  1. 0:00Bluetooth state machines intro
  2. 2:08Android Bluetooth stack
  3. 3:57State machine basics
  4. 6:1014 state machines explained
  5. 6:55Foundation state machines
  6. 11:30Audio pipeline state machines
  7. 14:25LE audio and GATT state machine
  8. 17:20Thread safety patterns
  9. 19:49Observer pattern sync
  10. 21:40Registry pattern coordination
  11. 22:42Bluetooth failure modes
  12. 26:16Debugging with dumps
  13. 28:04Key takeaways
  14. 29:32Q&A
  15. 32:26Timeout strategies
  16. 34:56Resources and future
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.