Skip to content

Linux + iPhone Continuity / iMessage / SMS

feat: airpod handoff

Zack Bartele4461e6062c5
diff --git a/docs/BLUETOOTH.md b/docs/BLUETOOTH.md
index dfb2c9b..75cc434 100644
--- a/docs/BLUETOOTH.md
+++ b/docs/BLUETOOTH.md
@@ -571,6 +571,55 @@ because a bus name can be *activatable* rather than running -- `playerctld` usua
and neither starting a media player to interrogate it nor blocking the Bluetooth reader
thread on one is acceptable.
+### Handing the buds to the phone for a call
+
+Off by default. `tether --bt-airpods-handoff on`, or the checkbox on the AirPods page.
+
+When the iPhone has a call and the AirPods are connected to *this machine*, Tether pauses
+local playback and disconnects them, so the phone can take them. When the call ends it
+reconnects them and resumes what it paused.
+
+**It needs call control**, because the trigger is the iPhone's call state, which comes
+from `org.bluez.Telephony1` or `org.pipewire.Telephony`. With calls off there is no
+gateway and nothing to trigger on, so the checkbox is disabled. See "Calls".
+
+`handoff_action()` is pure and tested. What it refuses to do matters more than what it
+does:
+
+- **Only buds this code disconnected are reconnected.** Buds the user took away by hand
+ stay away.
+- A call while the buds are already on the phone does nothing: there is nothing here to
+ hand over.
+- It never releases twice, which would lose track of what to give back.
+- Playback resumes **only if the buds came back**. Resuming onto the machine's own
+ speakers is not what handing them over asked for.
+
+Handoff and "pause when a bud comes out" both act on the same paused players, and they
+disagree about what a disconnect means. Buds that vanish on their own leave the pause in
+place, because resuming would move the audio to the machine's speakers -- but buds handed
+to the phone are coming back, and their pause has to survive until they do. So the ear
+watcher only drops the pause when handoff is not the one holding them, and handoff claims
+them *before* the disconnect rather than after: the buds go away between those two points,
+and the watcher runs in that gap. Both halves were found on a live call, not in review.
+
+**Handing the buds over gives up the AAP channel, and something else may take it.**
+Observed 2026-09-08: after a call, the buds came back and playback resumed, but battery
+and listening mode stayed empty and the status went to `busy` -- a competing AAP client on
+the same machine had claimed the single-client channel during the window when Tether had
+disconnected them. Nothing is wrong with the buds or the handoff; it is the conflict
+described above, made more likely by the disconnect. Tether keeps retrying and gets the
+channel back whenever the other program lets go.
+
+Reclaim is bounded: a settle delay, then three attempts, then it gives up and forgets
+them. The phone does not drop the buds the instant a call ends, and retrying forever
+would fight it for them. Releasing is synchronous because the phone is ringing now;
+reclaiming runs on its own thread because it has to wait.
+
+**What it does not cover.** Music or video playing on the iPhone is not a call, so
+nothing here reacts to it. Seeing that would mean the machine acting as an A2DP sink for
+the phone and reading `org.bluez.MediaPlayer1`, which is the opposite of "Keeping the
+phone's audio on the phone" below. Not attempted.
+
The constants come from librepods `linux/airpods_packets.h`. The prose
`docs/AAP Definitions.md` in the same repository disagrees with the header and is wrong.
@@ -656,6 +705,10 @@ checks the daemon does not make.
| `tether --bt-calls` reports call control off | PipeWire took the profile *and* its telephony D-Bus service is off, the iPhone reconnected on its own and never opened hands-free, or `bluetoothd` is running without `--experimental` | Either give BlueZ the profile by dropping `hfp_hf` from `bluez5.roles`, or set `bluez5.telephony-dbus-service = true` and let Tether drive PipeWire's gateway -- see "Calls". The daemon cycles the BR/EDR bearer once per outage for the second cause; confirm with `busctl --system tree org.bluez \| grep telephony` and `busctl --user tree org.pipewire.Telephony` |
| AirPods are listed but the battery stays blank, and the row says another program is using the channel | The AAP channel takes one client, and something else has it | Stop the other AirPods program (LibrePods, AirPods Center, a status-bar widget that reads battery). Nothing else releases it |
| Setting the AirPods listening mode to `off` does nothing, while the other three work | The buds declined it. Apple leaves Off out of the noise-control rotation by default on Pro models, and there is no refusal to report | Add Off to the rotation on the phone, under Settings > Bluetooth > (i) > Noise Control. Tether keeps showing the mode the buds are actually in |
+| The AirPods handoff checkbox is greyed out | Handoff triggers on the iPhone's call state, and call control is off | Turn on calls first: `tether --bt-calls-enable on`, or the Calls page |
+| A call started but the AirPods stayed on this computer | They were not connected here when it started, or handoff is off | Nothing to do in the first case. Otherwise `tether --bt-airpods-handoff on` |
+| The AirPods came back after a call but playback did not resume | Fixed. Disconnecting the buds for the call used to clear the remembered players, so there was nothing left to resume | Nothing. Press play on an older build |
+| The AirPods did not come back after a call | The phone still had them after three attempts, so Tether gave up rather than fight it | Reconnect them from the phone or the Devices list. Playback is deliberately left paused |
| Playback does not pause when a bud comes out | Pause on removal is off, which is the default | Set it on the AirPods page, or `tether --bt-airpods-pause one-removed` |
| Playback pauses on removal but never resumes | Something else paused or stopped it in between, so the pause is no longer Tether's to undo. Or the buds disconnected, which deliberately leaves it paused | Press play. Both are working as designed |
| AirPods do not appear in the Devices list at all | They are not connected, or BlueZ has never read their SDP record so there is no Modalias and the name does not contain "airpod" | Connect them, then `tether --bt-devices` -- the row carries an `airpods` flag when Tether recognizes them |
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 04840b0..f3eada4 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -380,6 +380,12 @@ them, so `in_ear` carries the count and nothing names a side.
Whether removing a bud pauses local playback: `never` (the default), `one-removed` or
`both-removed`. Persisted, and reported back as `airpods_pause` in `bt_status`.
+#### `bt_airpods_handoff` (Client -> Daemon)
+**Payload**: `{"command": "bt_airpods_handoff", "enabled": true}`
+
+Whether an iPhone call hands the AirPods to the phone and takes them back after. Off by
+default, needs call control, and reported as `airpods_handoff` in `bt_status`.
+
#### `bt_airpods_mode` (Client -> Daemon, answered directly)
**Payload**: `{"command": "bt_airpods_mode", "mode": "transparency"}`
**Response**: `{"command": "bt_airpods_mode_result", "success": true}`, or `success` false
diff --git a/docs/man/man1/tether.1.in b/docs/man/man1/tether.1.in
index 2431991..c1e1b3b 100644
--- a/docs/man/man1/tether.1.in
+++ b/docs/man/man1/tether.1.in
@@ -98,6 +98,10 @@ without reporting an error, so check the result with \fB\-\-bt-airpods\fR.
Pause whatever is playing on this computer when an AirPod is removed, and start it again
when the buds go back in. Off by default. Only playback Tether paused is resumed.
.TP
+\fB\-\-bt-airpods-handoff\fR \fIon\fR|\fIoff\fR
+Hand the AirPods to the iPhone when it has a call and take them back afterwards. Off by
+default. Requires call control (\fB\-\-bt-calls-enable on\fR).
+.TP
\fB\-\-bt-pair\fR \fIADDRESS\fR
Pair with an iPhone over Bluetooth.
.TP
diff --git a/po/cs.po b/po/cs.po
index 74f3a39..e353085 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Czech\n"
@@ -96,8 +96,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "Nastavit režim poslechu AirPods: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Pozastavit místní přehrávání při vyjmutí AirPodu: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Pozastavit místní přehrávání při vyjmutí AirPodu: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Předat AirPods iPhonu během hovoru: on nebo off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -488,9 +496,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Použijte never, one-removed nebo both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pozastavení při vyjmutí nastaveno na %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Použijte on nebo off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Hovor na iPhonu předá AirPods telefonu a po skončení je vrátí zpět."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Předávání AirPods je vypnuto."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Démon uzavřel spojení dříve, než operace skončila.\n"
@@ -1836,8 +1857,24 @@ msgid "Both buds are removed"
msgstr "Jsou vyjmuta obě sluchátka"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pozastaví vše, co se na tomto počítači přehrává, a znovu to spustí, jakmile si sluchátka nasadíte. Obnoví se pouze přehrávání, které pozastavil Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pozastaví vše, co se na tomto počítači přehrává, a znovu to spustí, jakmile "
+"si sluchátka nasadíte. Obnoví se pouze přehrávání, které pozastavil Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Hovory"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Předat AirPods iPhonu během hovoru"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pozastaví přehrávání a odpojí AirPods, aby si je mohl převzít iPhone, a po skončení hovoru je znovu připojí. Vyžaduje ovládání hovorů a platí jen, když jsou sluchátka připojena k tomuto počítači."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1925,10 +1962,6 @@ msgstr "Ukončit"
msgid "Devices"
msgstr "Zařízení"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Hovory"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Spouštět skrytě v oznamovací oblasti"
diff --git a/po/de.po b/po/de.po
index 3cf92f8..8b5522c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: German\n"
@@ -96,8 +96,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "AirPods-Hörmodus setzen: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Lokale Wiedergabe pausieren, wenn ein AirPod herausgenommen wird: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Lokale Wiedergabe pausieren, wenn ein AirPod herausgenommen wird: never, one-"
+"removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "AirPods während eines Anrufs an das iPhone übergeben: on oder off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -486,9 +494,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Verwenden Sie never, one-removed oder both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pause beim Herausnehmen auf %s gesetzt.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Verwenden Sie on oder off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Ein iPhone-Anruf übergibt die AirPods an das Telefon und holt sie danach zurück."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Die AirPods-Übergabe ist aus."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr ""
@@ -1871,8 +1892,25 @@ msgid "Both buds are removed"
msgstr "Beide Hörer herausgenommen werden"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pausiert alles, was auf diesem Computer läuft, und setzt es fort, sobald die Hörer wieder eingesetzt sind. Nur von Tether pausierte Wiedergabe wird fortgesetzt."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pausiert alles, was auf diesem Computer läuft, und setzt es fort, sobald die "
+"Hörer wieder eingesetzt sind. Nur von Tether pausierte Wiedergabe wird "
+"fortgesetzt."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Anrufe"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "AirPods während eines Anrufs an das iPhone übergeben"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pausiert die Wiedergabe und trennt die AirPods, damit das iPhone sie übernehmen kann, und verbindet sie nach dem Anruf wieder. Erfordert Anrufsteuerung und gilt nur, solange die Hörer mit diesem Computer verbunden sind."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1961,10 +1999,6 @@ msgstr "Beenden"
msgid "Devices"
msgstr "Geräte"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Anrufe"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Versteckt im Benachrichtigungsfeld starten"
diff --git a/po/es.po b/po/es.po
index e8e7891..b3a044b 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: Spanish\n"
@@ -99,8 +99,16 @@ msgstr ""
"adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Pausar la reproducción local al quitar un AirPod: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Pausar la reproducción local al quitar un AirPod: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Pasar los AirPods al iPhone durante una llamada: on u off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -490,9 +498,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Use never, one-removed o both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pausa al quitarlos establecida en %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Use on u off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Una llamada en el iPhone pasará los AirPods al teléfono y los recuperará al terminar."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "El traspaso de los AirPods está desactivado."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "El daemon cerró la conexión antes de terminar la operación.\n"
@@ -1863,8 +1884,25 @@ msgid "Both buds are removed"
msgstr "Se quiten ambos auriculares"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pausa lo que se esté reproduciendo en este equipo y lo reanuda cuando vuelvas a ponerte los auriculares. Solo se reanuda la reproducción que pausó Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pausa lo que se esté reproduciendo en este equipo y lo reanuda cuando "
+"vuelvas a ponerte los auriculares. Solo se reanuda la reproducción que pausó "
+"Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Llamadas"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Pasar los AirPods al iPhone durante una llamada"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pausa la reproducción y desconecta los AirPods para que el iPhone pueda tomarlos, y los vuelve a conectar cuando termina la llamada. Requiere control de llamadas y solo se aplica mientras los auriculares están conectados a este equipo."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1953,10 +1991,6 @@ msgstr "Salir"
msgid "Devices"
msgstr "Dispositivos"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Llamadas"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Iniciar oculto en la bandeja del sistema"
diff --git a/po/fr.po b/po/fr.po
index 7c2bf50..3e1e2ec 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: French\n"
@@ -99,8 +99,16 @@ msgstr ""
"Définir le mode d'écoute des AirPods : off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Mettre en pause la lecture locale au retrait d'un AirPods : never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Mettre en pause la lecture locale au retrait d'un AirPods : never, one-"
+"removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Confier les AirPods à l'iPhone pendant un appel : on ou off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -493,9 +501,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Utilisez never, one-removed ou both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pause au retrait réglée sur %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Utilisez on ou off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Un appel sur l'iPhone lui confiera les AirPods et les récupérera ensuite."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Le transfert des AirPods est désactivé."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Le démon a fermé la connexion avant la fin de l'opération.\n"
@@ -1870,8 +1891,25 @@ msgid "Both buds are removed"
msgstr "Les deux écouteurs sont retirés"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Met en pause ce qui est lu sur cet ordinateur et le relance quand les écouteurs sont remis en place. Seule la lecture mise en pause par Tether est relancée."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Met en pause ce qui est lu sur cet ordinateur et le relance quand les "
+"écouteurs sont remis en place. Seule la lecture mise en pause par Tether est "
+"relancée."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Appels"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Confier les AirPods à l'iPhone pendant un appel"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Met la lecture en pause et déconnecte les AirPods pour que l'iPhone puisse les prendre, puis les reconnecte à la fin de l'appel. Nécessite la gestion des appels et ne s'applique que tant que les écouteurs sont connectés à cet ordinateur."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1960,10 +1998,6 @@ msgstr "Quitter"
msgid "Devices"
msgstr "Appareils"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Appels"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Démarrer masqué dans la zone de notification"
diff --git a/po/it.po b/po/it.po
index 94c6f8e..0067f87 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Italian\n"
@@ -100,8 +100,16 @@ msgstr ""
"adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Metti in pausa la riproduzione locale quando un AirPod viene rimosso: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Metti in pausa la riproduzione locale quando un AirPod viene rimosso: never, "
+"one-removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Passa gli AirPods all'iPhone durante una chiamata: on oppure off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -490,9 +498,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Usa never, one-removed o both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pausa alla rimozione impostata su %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Usa on oppure off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Una chiamata sull'iPhone gli passerà gli AirPods e li riprenderà al termine."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Il passaggio degli AirPods è disattivato."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Il daemon ha chiuso la connessione prima che l'operazione finisse.\n"
@@ -1863,8 +1884,25 @@ msgid "Both buds are removed"
msgstr "Entrambi gli auricolari vengono rimossi"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Mette in pausa ciò che è in riproduzione su questo computer e lo riavvia quando gli auricolari vengono rimessi. Viene ripresa solo la riproduzione messa in pausa da Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Mette in pausa ciò che è in riproduzione su questo computer e lo riavvia "
+"quando gli auricolari vengono rimessi. Viene ripresa solo la riproduzione "
+"messa in pausa da Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Chiamate"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Passa gli AirPods all'iPhone durante una chiamata"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Mette in pausa la riproduzione e disconnette gli AirPods perché l'iPhone possa prenderli, poi li riconnette al termine della chiamata. Richiede il controllo delle chiamate e si applica solo mentre gli auricolari sono connessi a questo computer."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1952,10 +1990,6 @@ msgstr "Esci"
msgid "Devices"
msgstr "Dispositivi"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Chiamate"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Avvia nascosto nella tray di sistema"
diff --git a/po/ja.po b/po/ja.po
index 4ba4749..fa207a1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Japanese\n"
@@ -97,8 +97,16 @@ msgstr ""
"AirPods のリスニングモードを設定します: off, anc, transparency, adaptive。"
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "AirPod を外したときにローカル再生を一時停止します: never, one-removed, both-removed。"
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"AirPod を外したときにローカル再生を一時停止します: never, one-removed, both-"
+"removed。"
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "通話中に AirPods を iPhone へ渡します: on または off。"
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -479,9 +487,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "never、one-removed、both-removed のいずれかを指定してください。\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "取り外し時の一時停止を %s に設定しました。\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "on または off を指定してください。\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "iPhone の通話で AirPods を iPhone に渡し、終了後に戻します。"
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "AirPods の受け渡しはオフです。"
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "操作が完了する前にデーモンが接続を閉じました。\n"
@@ -1829,8 +1850,24 @@ msgid "Both buds are removed"
msgstr "両方を外したとき"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "このコンピュータで再生中のものを一時停止し、イヤホンを装着し直すと再開します。Tether が一時停止した再生のみを再開します。"
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"このコンピュータで再生中のものを一時停止し、イヤホンを装着し直すと再開しま"
+"す。Tether が一時停止した再生のみを再開します。"
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "通話"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "通話中に AirPods を iPhone へ渡す"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "再生を一時停止して AirPods を切断し、iPhone が使えるようにします。通話が終わると再接続します。通話制御が必要で、イヤホンがこのコンピュータに接続されている間だけ適用されます。"
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1918,10 +1955,6 @@ msgstr "終了"
msgid "Devices"
msgstr "デバイス"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "通話"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "システムトレイに隠して起動"
diff --git a/po/ko.po b/po/ko.po
index 37071e1..fdbcf27 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Korean\n"
@@ -95,8 +95,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "AirPods 청취 모드를 설정합니다: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "AirPod을 뺐을 때 로컬 재생을 일시정지합니다: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"AirPod을 뺐을 때 로컬 재생을 일시정지합니다: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "통화 중에 AirPods를 iPhone에 넘깁니다: on 또는 off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -476,9 +484,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "never, one-removed 또는 both-removed 중에서 선택하세요.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "제거 시 일시정지를 %s(으)로 설정했습니다.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "on 또는 off를 사용하세요.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "iPhone 통화 시 AirPods를 전화기에 넘기고 통화가 끝나면 다시 가져옵니다."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "AirPods 전환이 꺼져 있습니다."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "작업이 끝나기 전에 데몬이 연결을 닫았습니다.\n"
@@ -1807,8 +1828,24 @@ msgid "Both buds are removed"
msgstr "양쪽을 뺐을 때"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "이 컴퓨터에서 재생 중인 것을 일시정지하고, 이어버드를 다시 착용하면 재생을 재개합니다. Tether가 일시정지한 재생만 재개됩니다."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"이 컴퓨터에서 재생 중인 것을 일시정지하고, 이어버드를 다시 착용하면 재생을 재"
+"개합니다. Tether가 일시정지한 재생만 재개됩니다."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "통화"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "통화 중에 AirPods를 iPhone에 넘기기"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "재생을 일시정지하고 AirPods 연결을 끊어 iPhone이 사용할 수 있게 한 뒤, 통화가 끝나면 다시 연결합니다. 통화 제어가 필요하며 이어버드가 이 컴퓨터에 연결되어 있을 때만 적용됩니다."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1895,10 +1932,6 @@ msgstr "종료"
msgid "Devices"
msgstr "기기"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "통화"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "시스템 트레이에 숨겨서 시작"
diff --git a/po/nl.po b/po/nl.po
index 51c4346..441077d 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Dutch\n"
@@ -97,8 +97,16 @@ msgstr ""
"De luistermodus van de AirPods instellen: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Lokale weergave pauzeren wanneer een AirPod wordt uitgenomen: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Lokale weergave pauzeren wanneer een AirPod wordt uitgenomen: never, one-"
+"removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "De AirPods tijdens een gesprek aan de iPhone geven: on of off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -487,9 +495,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Gebruik never, one-removed of both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pauzeren bij uitnemen ingesteld op %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Gebruik on of off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Een gesprek op de iPhone geeft de AirPods aan de telefoon en haalt ze daarna terug."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "AirPods-overdracht staat uit."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "De daemon sloot de verbinding voordat de bewerking klaar was.\n"
@@ -1851,8 +1872,24 @@ msgid "Both buds are removed"
msgstr "Beide oordopjes worden uitgenomen"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pauzeert wat er op deze computer speelt en start het weer wanneer de oordopjes terug in gaan. Alleen weergave die Tether pauzeerde wordt hervat."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pauzeert wat er op deze computer speelt en start het weer wanneer de "
+"oordopjes terug in gaan. Alleen weergave die Tether pauzeerde wordt hervat."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Oproepen"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "De AirPods tijdens een gesprek aan de iPhone geven"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pauzeert de weergave en verbreekt de verbinding met de AirPods zodat de iPhone ze kan overnemen, en verbindt ze na het gesprek weer. Vereist gespreksbediening en geldt alleen zolang de oordopjes met deze computer verbonden zijn."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1940,10 +1977,6 @@ msgstr "Afsluiten"
msgid "Devices"
msgstr "Apparaten"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Oproepen"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Verborgen starten in het systeemvak"
diff --git a/po/pl.po b/po/pl.po
index b4fbb7c..58aec1b 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Polish\n"
@@ -97,8 +97,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "Ustaw tryb słuchania AirPods: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Wstrzymaj lokalne odtwarzanie po wyjęciu AirPoda: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Wstrzymaj lokalne odtwarzanie po wyjęciu AirPoda: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Przekaż AirPods do iPhone’a na czas rozmowy: on lub off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -491,9 +499,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Użyj never, one-removed lub both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Wstrzymanie przy wyjęciu ustawione na %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Użyj on lub off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Rozmowa na iPhonie przekaże mu AirPods, a po jej zakończeniu odbierze je z powrotem."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Przekazywanie AirPods jest wyłączone."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Demon zamknął połączenie, zanim operacja się zakończyła.\n"
@@ -1851,8 +1872,25 @@ msgid "Both buds are removed"
msgstr "Wyjęte zostaną obie słuchawki"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Wstrzymuje to, co jest odtwarzane na tym komputerze, i uruchamia ponownie, gdy słuchawki wrócą do uszu. Wznawiane jest tylko odtwarzanie wstrzymane przez Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Wstrzymuje to, co jest odtwarzane na tym komputerze, i uruchamia ponownie, "
+"gdy słuchawki wrócą do uszu. Wznawiane jest tylko odtwarzanie wstrzymane "
+"przez Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Połączenia"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Przekaż AirPods do iPhone’a na czas rozmowy"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Wstrzymuje odtwarzanie i rozłącza AirPods, aby iPhone mógł je przejąć, a po zakończeniu rozmowy łączy je ponownie. Wymaga obsługi połączeń i działa tylko wtedy, gdy słuchawki są połączone z tym komputerem."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1940,10 +1978,6 @@ msgstr "Zakończ"
msgid "Devices"
msgstr "Urządzenia"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Połączenia"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Uruchamiaj ukryte w zasobniku systemowym"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index e07aa68..d1ada57 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Brazilian Portuguese\n"
@@ -98,8 +98,16 @@ msgstr ""
"Definir o modo de escuta dos AirPods: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Pausar a reprodução local ao remover um AirPod: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Pausar a reprodução local ao remover um AirPod: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Passar os AirPods para o iPhone durante uma chamada: on ou off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -487,9 +495,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Use never, one-removed ou both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Pausa ao remover definida como %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Use on ou off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Uma chamada no iPhone passará os AirPods para o telefone e os trará de volta depois."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "A transferência dos AirPods está desativada."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "O daemon fechou a conexão antes de a operação terminar.\n"
@@ -1854,8 +1875,24 @@ msgid "Both buds are removed"
msgstr "Os dois fones forem removidos"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pausa o que estiver tocando neste computador e retoma quando os fones voltarem aos ouvidos. Só é retomada a reprodução que o Tether pausou."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pausa o que estiver tocando neste computador e retoma quando os fones "
+"voltarem aos ouvidos. Só é retomada a reprodução que o Tether pausou."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Chamadas"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Passar os AirPods para o iPhone durante uma chamada"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pausa a reprodução e desconecta os AirPods para que o iPhone possa assumi-los, e os reconecta quando a chamada termina. Requer controle de chamadas e só se aplica enquanto os fones estiverem conectados a este computador."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1943,10 +1980,6 @@ msgstr "Sair"
msgid "Devices"
msgstr "Dispositivos"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Chamadas"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Iniciar oculto na bandeja do sistema"
diff --git a/po/ru.po b/po/ru.po
index e47d37e..eeeda7a 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Russian\n"
@@ -97,8 +97,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "Задать режим прослушивания AirPods: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Ставить локальное воспроизведение на паузу при извлечении AirPod: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Ставить локальное воспроизведение на паузу при извлечении AirPod: never, one-"
+"removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Передавать AirPods на iPhone во время звонка: on или off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -491,9 +499,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Используйте never, one-removed или both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Пауза при извлечении установлена на %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Используйте on или off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Звонок на iPhone передаст AirPods телефону и вернёт их обратно после завершения."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Передача AirPods выключена."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Демон закрыл соединение до завершения операции.\n"
@@ -1852,8 +1873,25 @@ msgid "Both buds are removed"
msgstr "Извлечены оба наушника"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Ставит на паузу то, что воспроизводится на этом компьютере, и запускает снова, когда наушники возвращаются в уши. Возобновляется только воспроизведение, поставленное на паузу Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Ставит на паузу то, что воспроизводится на этом компьютере, и запускает "
+"снова, когда наушники возвращаются в уши. Возобновляется только "
+"воспроизведение, поставленное на паузу Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Вызовы"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Передавать AirPods на iPhone во время звонка"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Ставит воспроизведение на паузу и отключает AirPods, чтобы их мог забрать iPhone, а после звонка подключает их обратно. Требуется управление звонками; действует, только пока наушники подключены к этому компьютеру."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1941,10 +1979,6 @@ msgstr "Выйти"
msgid "Devices"
msgstr "Устройства"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Вызовы"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Запускаться скрыто в системном лотке"
diff --git a/po/sv.po b/po/sv.po
index 6171a9f..d0bbf67 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Swedish\n"
@@ -97,8 +97,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "Ställ in AirPods lyssningsläge: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Pausa lokal uppspelning när en AirPod tas ur: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Pausa lokal uppspelning när en AirPod tas ur: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Lämna över AirPods till iPhone under ett samtal: on eller off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -484,9 +492,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Använd never, one-removed eller both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Paus vid urtagning inställd på %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Använd on eller off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Ett samtal på iPhone lämnar över AirPods till telefonen och tar tillbaka dem efteråt."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Överlämning av AirPods är av."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Demonen stängde anslutningen innan åtgärden var klar.\n"
@@ -1833,8 +1854,24 @@ msgid "Both buds are removed"
msgstr "Båda propparna tas ur"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Pausar det som spelas på den här datorn och startar det igen när propparna sätts i. Endast uppspelning som Tether pausat återupptas."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Pausar det som spelas på den här datorn och startar det igen när propparna "
+"sätts i. Endast uppspelning som Tether pausat återupptas."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Samtal"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Lämna över AirPods till iPhone under ett samtal"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Pausar uppspelningen och kopplar från AirPods så att iPhone kan ta över dem, och ansluter dem igen när samtalet är slut. Kräver samtalsstyrning och gäller bara medan propparna är anslutna till den här datorn."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1923,10 +1960,6 @@ msgstr "Avsluta"
msgid "Devices"
msgstr "Enheter"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Samtal"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Starta dold i systemfältet"
diff --git a/po/tether.pot b/po/tether.pot
index 95442e3..6a11d62 100644
--- a/po/tether.pot
+++ b/po/tether.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether 0.2.27\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -100,6 +100,10 @@ msgid ""
"removed."
msgstr ""
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr ""
+
#: src/cli/main.cpp
msgid "List iPhone message conversations."
msgstr ""
@@ -451,6 +455,19 @@ msgstr ""
msgid "Pause on removal set to %s.\n"
msgstr ""
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr ""
+
+#: src/cli/main.cpp
+msgid ""
+"An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr ""
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr ""
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr ""
@@ -1683,6 +1700,21 @@ msgid ""
"buds go back in. Only playback Tether paused is resumed."
msgstr ""
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr ""
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr ""
+
+#: src/gtk/devices_view.cpp
+msgid ""
+"Pauses playback and disconnects the AirPods so the iPhone can take them, "
+"then reconnects them when the call ends. Needs call control, and only "
+"applies while the buds are connected to this computer."
+msgstr ""
+
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
msgstr ""
@@ -1762,10 +1794,6 @@ msgstr ""
msgid "Devices"
msgstr ""
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr ""
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index e06aefa..dadabf5 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Turkish\n"
@@ -95,8 +95,16 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "AirPods dinleme modunu ayarla: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Bir AirPod çıkarıldığında yerel oynatmayı duraklat: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Bir AirPod çıkarıldığında yerel oynatmayı duraklat: never, one-removed, both-"
+"removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Görüşme sırasında AirPods’u iPhone’a devret: on veya off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -485,9 +493,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "never, one-removed veya both-removed kullanın.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Çıkarınca duraklatma %s olarak ayarlandı.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "on veya off kullanın.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "iPhone’daki bir çağrı AirPods’u telefona devreder ve görüşme bitince geri alır."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "AirPods devri kapalı."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Arka plan hizmeti, işlem bitmeden bağlantıyı kapattı.\n"
@@ -1829,8 +1850,24 @@ msgid "Both buds are removed"
msgstr "Her iki kulaklık da çıkarıldığında"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Bu bilgisayarda çalan her şeyi duraklatır ve kulaklıklar geri takıldığında yeniden başlatır. Yalnızca Tether tarafından duraklatılan oynatma sürdürülür."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Bu bilgisayarda çalan her şeyi duraklatır ve kulaklıklar geri takıldığında "
+"yeniden başlatır. Yalnızca Tether tarafından duraklatılan oynatma sürdürülür."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Çağrılar"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Görüşme sırasında AirPods’u iPhone’a devret"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Oynatmayı duraklatır ve iPhone alabilsin diye AirPods bağlantısını keser, görüşme bitince yeniden bağlar. Çağrı denetimi gerektirir ve yalnızca kulaklıklar bu bilgisayara bağlıyken geçerlidir."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1919,10 +1956,6 @@ msgstr "Çık"
msgid "Devices"
msgstr "Aygıtlar"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Çağrılar"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Sistem tepsisinde gizli başlat"
diff --git a/po/uk.po b/po/uk.po
index 0f1f44b..9699c46 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Ukrainian\n"
@@ -99,8 +99,16 @@ msgstr ""
"Задати режим прослуховування AirPods: off, anc, transparency, adaptive."
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
-msgstr "Ставити локальне відтворення на паузу при вийманні AirPod: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
+msgstr ""
+"Ставити локальне відтворення на паузу при вийманні AirPod: never, one-"
+"removed, both-removed."
+
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "Передавати AirPods на iPhone під час дзвінка: on або off."
#: src/cli/main.cpp
msgid "List iPhone message conversations."
@@ -492,9 +500,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "Використовуйте never, one-removed або both-removed.\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "Паузу при вийманні встановлено на %s.\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "Використовуйте on або off.\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "Дзвінок на iPhone передасть йому AirPods і поверне їх після завершення."
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "Передавання AirPods вимкнено."
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "Демон закрив з'єднання до завершення операції.\n"
@@ -1850,8 +1871,25 @@ msgid "Both buds are removed"
msgstr "Вийнято обидва навушники"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "Ставить на паузу те, що відтворюється на цьому комп’ютері, і запускає знову, коли навушники повертаються у вуха. Відновлюється лише відтворення, поставлене на паузу Tether."
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"Ставить на паузу те, що відтворюється на цьому комп’ютері, і запускає знову, "
+"коли навушники повертаються у вуха. Відновлюється лише відтворення, "
+"поставлене на паузу Tether."
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "Виклики"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "Передавати AirPods на iPhone під час дзвінка"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "Ставить відтворення на паузу й від’єднує AirPods, щоб їх міг забрати iPhone, а після дзвінка під’єднує знову. Потрібне керування дзвінками; діє, лише поки навушники під’єднані до цього комп’ютера."
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1939,10 +1977,6 @@ msgstr "Вийти"
msgid "Devices"
msgstr "Пристрої"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "Виклики"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "Запускатися прихованим у системному лотку"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b550548..bf67f2f 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-09-08 16:56-0700\n"
+"POT-Creation-Date: 2026-09-08 17:21-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Simplified Chinese\n"
@@ -95,9 +95,15 @@ msgid "Set the AirPods listening mode: off, anc, transparency, adaptive."
msgstr "设置 AirPods 聆听模式:off、anc、transparency、adaptive。"
#: src/cli/main.cpp
-msgid "Pause local playback when an AirPod is removed: never, one-removed, both-removed."
+msgid ""
+"Pause local playback when an AirPod is removed: never, one-removed, both-"
+"removed."
msgstr "取下 AirPod 时暂停本机播放:never、one-removed、both-removed。"
+#: src/cli/main.cpp
+msgid "Hand the AirPods to the iPhone during a call: on or off."
+msgstr "通话期间将 AirPods 交给 iPhone:on 或 off。"
+
#: src/cli/main.cpp
msgid "List iPhone message conversations."
msgstr "列出 iPhone 的信息会话。"
@@ -468,9 +474,22 @@ msgid "Use never, one-removed or both-removed.\n"
msgstr "请使用 never、one-removed 或 both-removed。\n"
#: src/cli/main.cpp
+#, c-format
msgid "Pause on removal set to %s.\n"
msgstr "取下时暂停已设为 %s。\n"
+#: src/cli/main.cpp
+msgid "Use on or off.\n"
+msgstr "请使用 on 或 off。\n"
+
+#: src/cli/main.cpp
+msgid "An iPhone call will hand the AirPods to the phone and take them back after."
+msgstr "iPhone 来电时会将 AirPods 交给手机,通话结束后再取回。"
+
+#: src/cli/main.cpp
+msgid "AirPods handoff is off."
+msgstr "AirPods 交接已关闭。"
+
#: src/cli/main.cpp
msgid "Daemon closed the connection before the operation finished.\n"
msgstr "操作完成前守护进程已关闭连接。\n"
@@ -1769,8 +1788,24 @@ msgid "Both buds are removed"
msgstr "取下两只耳机时"
#: src/gtk/devices_view.cpp
-msgid "Pauses whatever is playing on this computer, and starts it again when the buds go back in. Only playback Tether paused is resumed."
-msgstr "暂停本机正在播放的内容,并在耳机重新戴上时继续播放。仅恢复由 Tether 暂停的播放。"
+msgid ""
+"Pauses whatever is playing on this computer, and starts it again when the "
+"buds go back in. Only playback Tether paused is resumed."
+msgstr ""
+"暂停本机正在播放的内容,并在耳机重新戴上时继续播放。仅恢复由 Tether 暂停的播"
+"放。"
+
+#: src/gtk/devices_view.cpp src/gtk/main.cpp
+msgid "Calls"
+msgstr "通话"
+
+#: src/gtk/devices_view.cpp
+msgid "Hand the AirPods to the iPhone during a call"
+msgstr "通话期间将 AirPods 交给 iPhone"
+
+#: src/gtk/devices_view.cpp
+msgid "Pauses playback and disconnects the AirPods so the iPhone can take them, then reconnects them when the call ends. Needs call control, and only applies while the buds are connected to this computer."
+msgstr "暂停播放并断开 AirPods,让 iPhone 可以接管,通话结束后再重新连接。需要通话控制,且仅在耳机连接到本机时生效。"
#: src/gtk/devices_view.cpp
msgid "Bluetooth needs one-time system setup"
@@ -1856,10 +1891,6 @@ msgstr "退出"
msgid "Devices"
msgstr "设备"
-#: src/gtk/main.cpp
-msgid "Calls"
-msgstr "通话"
-
#: src/gtk/main.cpp
msgid "Start hidden in the system tray"
msgstr "启动时隐藏到系统托盘"
diff --git a/src/cli/main.cpp b/src/cli/main.cpp
index a09a8e0..4d684b2 100644
--- a/src/cli/main.cpp
+++ b/src/cli/main.cpp
@@ -194,6 +194,7 @@ static const Opt kOptions[] = {
{"--bt-airpods", N_("Show AirPods and case battery.")},
{"--bt-airpods-mode", N_("Set the AirPods listening mode: off, anc, transparency, adaptive.")},
{"--bt-airpods-pause", N_("Pause local playback when an AirPod is removed: never, one-removed, both-removed.")},
+ {"--bt-airpods-handoff", N_("Hand the AirPods to the iPhone during a call: on or off.")},
{"--bt-threads", N_("List iPhone message conversations.")},
{"--bt-messages <thread>", N_("Show messages in one conversation.")},
{"--bt-send <thread> <text>", N_("Reply in one conversation.")},
@@ -578,6 +579,22 @@ static int set_bt_airpods_pause(tether::Client& client, const std::string& mode)
return 0;
}
+static int set_bt_airpods_handoff(tether::Client& client, const std::string& value) {
+ if (value != "on" && value != "off") {
+ debug::log(ERR, _("Use on or off.\n"));
+ return 1;
+ }
+ if (!client.send(nlohmann::json{{"command", "bt_airpods_handoff"}, {"enabled", value == "on"}}.dump() + "\n")) {
+ debug::log(ERR, _("Could not reach the daemon.\n"));
+ return 1;
+ }
+ fprintf(stdout,
+ "%s\n",
+ value == "on" ? _("An iPhone call will hand the AirPods to the phone and take them back after.")
+ : _("AirPods handoff is off."));
+ return 0;
+}
+
// Pairing takes tens of seconds and reports progress as it goes, so this
// subscribes and streams events until the terminal result arrives.
static int run_bt_transaction(tether::Client& client,
@@ -1035,6 +1052,10 @@ int main(int argc, char* argv[]) {
action = "bt_airpods_pause";
if (i + 1 < argc && argv[i + 1][0] != '-')
arg_val = argv[++i];
+ } else if (arg == "--bt-airpods-handoff") {
+ action = "bt_airpods_handoff";
+ if (i + 1 < argc && argv[i + 1][0] != '-')
+ arg_val = argv[++i];
} else if (arg == "--bt-diagnostics") {
action = "bt_diagnostics";
} else if (arg == "--bt-threads") {
@@ -1276,6 +1297,8 @@ int main(int argc, char* argv[]) {
return set_bt_airpods_mode(client, arg_val);
} else if (action == "bt_airpods_pause") {
return set_bt_airpods_pause(client, arg_val);
+ } else if (action == "bt_airpods_handoff") {
+ return set_bt_airpods_handoff(client, arg_val);
} else if (action == "bt_diagnostics") {
return print_bt_diagnostics(client);
} else if (action == "bt_threads") {
diff --git a/src/core/include/tether/bluetooth/airpods.hpp b/src/core/include/tether/bluetooth/airpods.hpp
index 4ff060b..9665f65 100644
--- a/src/core/include/tether/bluetooth/airpods.hpp
+++ b/src/core/include/tether/bluetooth/airpods.hpp
@@ -120,6 +120,16 @@ namespace tether::bluetooth {
// `holding` is whether the caller has a pause outstanding.
MediaAction ear_media_action(const EarState& before, const EarState& after, PauseMode mode, bool holding);
+ // What an iPhone call should do to AirPods that are connected to this machine.
+ enum class HandoffAction { None, Release, Reclaim };
+
+ // `released` is whether this code is what disconnected them: buds the user
+ // took away by hand are never reclaimed.
+ HandoffAction handoff_action(bool call_active, bool buds_on_linux, bool released, bool enabled);
+
+ // Whether a bt_calls payload describes a call worth handing the buds over for.
+ bool call_wants_audio(const nlohmann::json& calls);
+
// The connected AirPods worth opening a channel to, or null. Only one is
// returned: the channel is single-client and so is the watcher.
const Device* find_airpods(const BluezObjects& objects);
diff --git a/src/core/include/tether/bluetooth/config.hpp b/src/core/include/tether/bluetooth/config.hpp
index 02accc2..b1d1fb9 100644
--- a/src/core/include/tether/bluetooth/config.hpp
+++ b/src/core/include/tether/bluetooth/config.hpp
@@ -50,6 +50,8 @@ namespace tether::bluetooth {
bool desktop_popups_enabled = true;
// Whether removing an AirPod pauses local playback.
PauseMode airpods_pause = PauseMode::Never;
+ // Whether an iPhone call hands the AirPods to the phone and takes them back after.
+ bool airpods_handoff = false;
bool operator==(const Config&) const = default;
};
diff --git a/src/core/include/tether/bluetooth/pairing.hpp b/src/core/include/tether/bluetooth/pairing.hpp
index eeb536d..d470c36 100644
--- a/src/core/include/tether/bluetooth/pairing.hpp
+++ b/src/core/include/tether/bluetooth/pairing.hpp
@@ -64,6 +64,10 @@ namespace tether::bluetooth {
// so a caller can publish the growing device list.
bool scan_devices(BluezMonitor& monitor, int seconds, const std::function<void()>& on_tick, std::string& err);
+ // Device1.Connect / Device1.Disconnect on a bonded device, by address.
+ bool connect_device(BluezMonitor& monitor, const std::string& address, std::string& err);
+ bool disconnect_device(BluezMonitor& monitor, const std::string& address, std::string& err);
+
// Puts the ANCS solicitation advertisement back on air without re-pairing.
// This is what makes iOS reveal its "Show Message Notifications" and
// "Sync Contacts" toggles, and it expires a few minutes after pairing, so
diff --git a/src/core/include/tether/mpris.hpp b/src/core/include/tether/mpris.hpp
index 0a80866..20bd75e 100644
--- a/src/core/include/tether/mpris.hpp
+++ b/src/core/include/tether/mpris.hpp
@@ -37,4 +37,7 @@ namespace tether {
std::unique_ptr<Impl> impl_;
};
+ // Set for the daemon's lifetime
+ extern MediaControl* g_media;
+
} // namespace tether
diff --git a/src/core/src/bluetooth/airpods.cpp b/src/core/src/bluetooth/airpods.cpp
index 1e21f20..a0bfd45 100644
--- a/src/core/src/bluetooth/airpods.cpp
+++ b/src/core/src/bluetooth/airpods.cpp
@@ -286,6 +286,28 @@ namespace tether::bluetooth {
return MediaAction::None;
}
+ bool call_wants_audio(const nlohmann::json& calls) {
+ if (!calls.is_array())
+ return false;
+ for (const auto& call : calls) {
+ // Ringing counts: the buds have to be on the phone before it is answered.
+ if (call.value("ringing", false) || call.value("outgoing", false) || call.value("connected", false))
+ return true;
+ }
+ return false;
+ }
+
+ HandoffAction handoff_action(bool call_active, bool buds_on_linux, bool released, bool enabled) {
+ if (!enabled)
+ return HandoffAction::None;
+ if (call_active && buds_on_linux && !released)
+ return HandoffAction::Release;
+ // Only after the call, and only buds this code took away.
+ if (!call_active && released)
+ return HandoffAction::Reclaim;
+ return HandoffAction::None;
+ }
+
const Device* find_airpods(const BluezObjects& objects) {
for (const auto& device : objects.devices)
if (device.connected && device.looks_like_airpods())
diff --git a/src/core/src/bluetooth/config.cpp b/src/core/src/bluetooth/config.cpp
index 501aa2e..0b0c53a 100644
--- a/src/core/src/bluetooth/config.cpp
+++ b/src/core/src/bluetooth/config.cpp
@@ -64,6 +64,7 @@ namespace tether::bluetooth {
j["retention"] = to_string(config.retention);
j["desktop_popups_enabled"] = config.desktop_popups_enabled;
j["airpods_pause"] = to_string(config.airpods_pause);
+ j["airpods_handoff"] = config.airpods_handoff;
return j.dump(2);
}
@@ -85,6 +86,7 @@ namespace tether::bluetooth {
config.retention = retention_from_string(j.value("retention", "encrypted"));
config.desktop_popups_enabled = j.value("desktop_popups_enabled", true);
config.airpods_pause = pause_mode_from_string(j.value("airpods_pause", ""));
+ config.airpods_handoff = j.value("airpods_handoff", false);
} catch (const std::exception&) {
// A corrupt file must not stop the daemon; defaults are safe.
}
diff --git a/src/core/src/bluetooth/pairing.cpp b/src/core/src/bluetooth/pairing.cpp
index dd95eb9..c200390 100644
--- a/src/core/src/bluetooth/pairing.cpp
+++ b/src/core/src/bluetooth/pairing.cpp
@@ -788,6 +788,36 @@ namespace tether::bluetooth {
return result;
}
+ namespace {
+ constexpr int DEVICE_CALL_TIMEOUT_MS = 15000;
+
+ bool call_device_by_address(BluezMonitor& monitor,
+ const std::string& address,
+ const char* method,
+ std::string& err) {
+ GDBusConnection* conn = monitor.connection();
+ if (!conn) {
+ err = "no system bus";
+ return false;
+ }
+ const auto objects = monitor.snapshot();
+ const Device* device = find_by_address(objects, normalize_address(address));
+ if (!device) {
+ err = "no such device";
+ return false;
+ }
+ return call_device(conn, device->path, method, DEVICE_CALL_TIMEOUT_MS, err);
+ }
+ } // namespace
+
+ bool connect_device(BluezMonitor& monitor, const std::string& address, std::string& err) {
+ return call_device_by_address(monitor, address, "Connect", err);
+ }
+
+ bool disconnect_device(BluezMonitor& monitor, const std::string& address, std::string& err) {
+ return call_device_by_address(monitor, address, "Disconnect", err);
+ }
+
bool scan_devices(BluezMonitor& monitor, int seconds, const std::function<void()>& on_tick, std::string& err) {
GDBusConnection* conn = monitor.connection();
if (!conn) {
diff --git a/src/core/src/mpris.cpp b/src/core/src/mpris.cpp
index 154f918..f3f26a6 100644
--- a/src/core/src/mpris.cpp
+++ b/src/core/src/mpris.cpp
@@ -7,6 +7,8 @@
namespace tether {
+ MediaControl* g_media = nullptr;
+
namespace {
constexpr const char* MPRIS_PREFIX = "org.mpris.MediaPlayer2.";
diff --git a/src/core/src/net.cpp b/src/core/src/net.cpp
index 36ae9dd..ac1c9c3 100644
--- a/src/core/src/net.cpp
+++ b/src/core/src/net.cpp
@@ -311,6 +311,7 @@ namespace tether {
status["retention_ready"] = secret::have_key();
status["desktop_popups_enabled"] = config.desktop_popups_enabled;
status["airpods_pause"] = to_string(config.airpods_pause);
+ status["airpods_handoff"] = config.airpods_handoff;
status["version"] = TETHER_VERSION;
if (!bluetooth::g_bluez) {
status["capability"] = nullptr;
@@ -959,6 +960,12 @@ namespace tether {
std::string payload = build_bt_airpods().dump() + "\n";
write_plain_packet(client_fd, payload);
continue;
+ } else if (j.contains("command") && j["command"] == "bt_airpods_handoff" && j.contains("enabled")) {
+ auto config = bluetooth::load_config();
+ config.airpods_handoff = j.value("enabled", false);
+ bluetooth::save_config(config);
+ broadcast_local_event(build_bt_status().dump());
+ continue;
} else if (j.contains("command") && j["command"] == "bt_airpods_pause" && j.contains("mode")) {
auto config = bluetooth::load_config();
config.airpods_pause = bluetooth::pause_mode_from_string(j["mode"]);
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 82b4f15..d5b054f 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -10,6 +10,7 @@
#include <tether/bluetooth/connection.hpp>
#include <tether/bluetooth/contacts.hpp>
#include <tether/bluetooth/monitor.hpp>
+#include <tether/bluetooth/pairing.hpp>
#include <tether/core.hpp>
#include <tether/crypto.hpp>
#include <tether/discovery.hpp>
@@ -49,6 +50,10 @@ static void redirect_output_to_log() {
}
}
+// How long to let the phone finish with the buds before reclaiming them.
+constexpr int HANDOFF_SETTLE_SECONDS = 2;
+constexpr int HANDOFF_RECLAIM_ATTEMPTS = 3;
+
int main(int argc, char** argv) {
redirect_output_to_log();
tether::init_locale();
@@ -248,29 +253,122 @@ int main(int argc, char** argv) {
// Pick the controller before the first capability, a second adapter never comes up bound to the wrong one.
bluez.set_preferred_adapter(bt_config.adapter);
+ // Handing the buds to the iPhone for a call and taking them back after.
+ struct Handoff {
+ mutable std::mutex mutex;
+ std::string released;
+ bool busy = false;
+
+ bool holding_buds() const {
+ std::lock_guard<std::mutex> lock(mutex);
+ return !released.empty();
+ }
+ };
+ auto handoff = std::make_shared<Handoff>();
+
// AirPods battery arrives on its own L2CAP channel, not through BlueZ.
tether::MediaControl media;
tether::bluetooth::EarState last_ear;
- tether::bluetooth::AirPodsWatcher airpods([&media, &last_ear](const tether::bluetooth::AirPodsState& state) {
- const auto mode = tether::bluetooth::load_config().airpods_pause;
- switch (tether::bluetooth::ear_media_action(last_ear, state.ear, mode, media.holding())) {
- case tether::bluetooth::MediaAction::Pause:
- if (const size_t paused = media.pause())
- debug::log(INFO, "airpods: paused {} player(s), a bud came out", paused);
- break;
- case tether::bluetooth::MediaAction::Resume:
- if (const size_t resumed = media.resume())
- debug::log(INFO, "airpods: resumed {} player(s), the buds went back in", resumed);
- break;
- case tether::bluetooth::MediaAction::None:
- break;
+ tether::bluetooth::AirPodsWatcher airpods(
+ [&media, &last_ear, handoff](const tether::bluetooth::AirPodsState& state) {
+ const auto mode = tether::bluetooth::load_config().airpods_pause;
+ switch (tether::bluetooth::ear_media_action(last_ear, state.ear, mode, media.holding())) {
+ case tether::bluetooth::MediaAction::Pause:
+ if (const size_t paused = media.pause())
+ debug::log(INFO, "airpods: paused {} player(s), a bud came out", paused);
+ break;
+ case tether::bluetooth::MediaAction::Resume:
+ if (const size_t resumed = media.resume())
+ debug::log(INFO, "airpods: resumed {} player(s), the buds went back in", resumed);
+ break;
+ case tether::bluetooth::MediaAction::None:
+ break;
+ }
+
+ if (state.address.empty() && !handoff->holding_buds())
+ media.forget();
+
+ last_ear = state.ear;
+
+ tether::broadcast_local_event(tether::bluetooth::to_json(state).dump());
+ });
+ const auto run_handoff = [&bluez, &media, handoff](const nlohmann::json& calls) {
+ const auto config = tether::bluetooth::load_config();
+ const bool active = tether::bluetooth::call_wants_audio(calls);
+
+ std::string target;
+ bool released_now = false;
+ {
+ std::lock_guard<std::mutex> lock(handoff->mutex);
+ if (handoff->busy)
+ return;
+ released_now = !handoff->released.empty();
+ target = handoff->released;
}
- if (state.address.empty())
- media.forget();
- last_ear = state.ear;
- tether::broadcast_local_event(tether::bluetooth::to_json(state).dump());
- });
+ // The snapshot has to outlive the pointer into it.
+ const auto snapshot = bluez.snapshot();
+ const auto* device = tether::bluetooth::find_airpods(snapshot);
+ if (!released_now && device)
+ target = device->address;
+
+ const auto action =
+ tether::bluetooth::handoff_action(active, device != nullptr, released_now, config.airpods_handoff);
+ if (action == tether::bluetooth::HandoffAction::None || target.empty())
+ return;
+
+ {
+ std::lock_guard<std::mutex> lock(handoff->mutex);
+ handoff->busy = true;
+ }
+
+ if (action == tether::bluetooth::HandoffAction::Release) {
+ media.pause();
+ {
+ std::lock_guard<std::mutex> lock(handoff->mutex);
+ handoff->released = target;
+ }
+ std::string err;
+ const bool ok = tether::bluetooth::disconnect_device(bluez, target, err);
+ std::lock_guard<std::mutex> lock(handoff->mutex);
+ handoff->busy = false;
+ if (ok) {
+ debug::log(INFO, "airpods: handed the buds to the iPhone for a call");
+ } else {
+ handoff->released.clear();
+ debug::log(WARN, "airpods: could not release the buds: {}", err);
+ }
+ return;
+ }
+
+ std::thread([handoff, target] {
+ // The phone does not drop them the instant the call ends.
+ std::this_thread::sleep_for(std::chrono::seconds(HANDOFF_SETTLE_SECONDS));
+ bool ok = false;
+ for (int attempt = 0; attempt < HANDOFF_RECLAIM_ATTEMPTS && !ok; ++attempt) {
+ std::string err;
+ ok = tether::bluetooth::g_bluez &&
+ tether::bluetooth::connect_device(*tether::bluetooth::g_bluez, target, err);
+ if (!ok) {
+ debug::log(DEBUG, "airpods: reclaim attempt {} failed: {}", attempt + 1, err);
+ std::this_thread::sleep_for(std::chrono::seconds(HANDOFF_SETTLE_SECONDS));
+ }
+ }
+ if (tether::g_media) {
+ if (ok)
+ tether::g_media->resume();
+ else
+ tether::g_media->forget();
+ }
+ debug::log(ok ? INFO : WARN,
+ ok ? "airpods: took the buds back after the call"
+ : "airpods: the buds did not come back; leaving them to the phone");
+ std::lock_guard<std::mutex> lock(handoff->mutex);
+ handoff->released.clear();
+ handoff->busy = false;
+ }).detach();
+ };
+
const auto follow_airpods = [&bluez, &airpods]() {
const auto snapshot = bluez.snapshot();
const auto* device = tether::bluetooth::find_airpods(snapshot);
@@ -280,6 +378,7 @@ int main(int argc, char** argv) {
if (bluez.start()) {
tether::bluetooth::g_bluez = &bluez;
tether::bluetooth::g_airpods = &airpods;
+ tether::g_media = &media;
loop.addFd(bluez.event_fd(), [&bluez, &follow_airpods](int) {
bluez.drain();
tether::broadcast_local_event(tether::build_bt_devices().dump());
@@ -346,7 +445,9 @@ int main(int argc, char** argv) {
});
}
- connections.set_call_handler([](const nlohmann::json& calls) {
+ connections.set_call_handler([&run_handoff](const nlohmann::json& calls) {
+ run_handoff(calls);
+
nlohmann::json event;
event["command"] = "bt_calls";
event["calls"] = calls;
diff --git a/src/gtk/devices_view.cpp b/src/gtk/devices_view.cpp
index d5daa9e..d9f3d2d 100644
--- a/src/gtk/devices_view.cpp
+++ b/src/gtk/devices_view.cpp
@@ -64,6 +64,7 @@ namespace tether::ui {
GtkWidget* lbl_airpods_reason = nullptr;
GtkWidget* lbl_airpods_worn = nullptr;
GtkWidget* cmb_airpods_pause = nullptr;
+ GtkWidget* chk_airpods_handoff = nullptr;
GtkWidget* airpods_mode_buttons[4] = {nullptr, nullptr, nullptr, nullptr};
bool airpods_syncing = false;
@@ -244,6 +245,13 @@ namespace tether::ui {
daemon_send({{"command", "bt_airpods_pause"}, {"mode", AIRPODS_PAUSE_MODES[index]}});
}
+ void on_airpods_handoff_toggled(GtkWidget* button, gpointer) {
+ if (g_devices.airpods_syncing)
+ return;
+ daemon_send({{"command", "bt_airpods_handoff"},
+ {"enabled", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)) == TRUE}});
+ }
+
void on_airpods_mode_toggled(GtkWidget* button, gpointer data) {
if (g_devices.airpods_syncing || !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
return;
@@ -293,6 +301,11 @@ namespace tether::ui {
gtk_combo_box_set_active(GTK_COMBO_BOX(g_devices.cmb_airpods_pause), i);
}
gtk_widget_set_sensitive(g_devices.cmb_airpods_pause, ear_known);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_devices.chk_airpods_handoff),
+ g_devices.bt_status.value("airpods_handoff", false));
+ const bool calls_on = g_devices.bt_status.value("calls_enabled", false);
+ gtk_widget_set_sensitive(g_devices.chk_airpods_handoff, calls_on);
g_devices.airpods_syncing = false;
}
@@ -1494,6 +1507,20 @@ namespace tether::ui {
gtk_box_pack_start(GTK_BOX(pause_row), g_devices.cmb_airpods_pause, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(airpods_box), pause_row, FALSE, FALSE, 0);
+ GtkWidget* lbl_handoff_title = gtk_label_new(nullptr);
+ gtk_label_set_xalign(GTK_LABEL(lbl_handoff_title), 0.0);
+ set_markup(lbl_handoff_title, "<b>" + escape_markup(_("Calls")) + "</b>");
+ gtk_box_pack_start(GTK_BOX(airpods_box), lbl_handoff_title, FALSE, FALSE, 0);
+
+ g_devices.chk_airpods_handoff =
+ gtk_check_button_new_with_label(_("Hand the AirPods to the iPhone during a call"));
+ gtk_widget_set_tooltip_text(g_devices.chk_airpods_handoff,
+ _("Pauses playback and disconnects the AirPods so the iPhone can take them, "
+ "then reconnects them when the call ends. Needs call control, and only "
+ "applies while the buds are connected to this computer."));
+ g_signal_connect(g_devices.chk_airpods_handoff, "toggled", G_CALLBACK(on_airpods_handoff_toggled), nullptr);
+ gtk_box_pack_start(GTK_BOX(airpods_box), g_devices.chk_airpods_handoff, FALSE, FALSE, 0);
+
gtk_stack_add_named(GTK_STACK(g_devices.right_pane_stack), airpods_box, "airpods");
// Bluetooth
diff --git a/test/test_airpods.cpp b/test/test_airpods.cpp
index 4f0f8d4..6063c15 100644
--- a/test/test_airpods.cpp
+++ b/test/test_airpods.cpp
@@ -181,6 +181,49 @@ TEST(AirPods, PutsABudInTheCaseTheSameAsOutOfTheEar) {
EXPECT_EQ(ear_media_action(in_case, in_case, PauseMode::OneRemoved, false), MediaAction::None);
}
+TEST(AirPods, HandoffIsOffUnlessEnabled) {
+ EXPECT_EQ(handoff_action(true, true, false, false), HandoffAction::None);
+ EXPECT_EQ(handoff_action(false, false, true, false), HandoffAction::None);
+}
+
+TEST(AirPods, HandsBudsOverForACallAndTakesThemBack) {
+ EXPECT_EQ(handoff_action(true, true, false, true), HandoffAction::Release);
+ // Released, so the buds are no longer on this machine; the call ending is the trigger.
+ EXPECT_EQ(handoff_action(true, false, true, true), HandoffAction::None);
+ EXPECT_EQ(handoff_action(false, false, true, true), HandoffAction::Reclaim);
+}
+
+// Buds the user disconnected themselves are not ours to take back.
+TEST(AirPods, DoesNotReclaimBudsItDidNotRelease) {
+ EXPECT_EQ(handoff_action(false, false, false, true), HandoffAction::None);
+ EXPECT_EQ(handoff_action(false, true, false, true), HandoffAction::None);
+}
+
+// A call while the buds are already on the phone has nothing to hand over.
+TEST(AirPods, DoesNothingWhenTheBudsAreNotOnThisMachine) {
+ EXPECT_EQ(handoff_action(true, false, false, true), HandoffAction::None);
+}
+
+// Releasing twice would lose track of what to give back.
+TEST(AirPods, DoesNotReleaseTwice) { EXPECT_EQ(handoff_action(true, true, true, true), HandoffAction::None); }
+
+TEST(AirPods, RecognisesCallsThatWantTheBuds) {
+ const auto calls = [](const char* text) { return nlohmann::json::parse(text); };
+ EXPECT_TRUE(call_wants_audio(calls(R"([{"state":"incoming","ringing":true}])")));
+ EXPECT_TRUE(call_wants_audio(calls(R"([{"state":"active","connected":true}])")));
+ EXPECT_TRUE(call_wants_audio(calls(R"([{"state":"dialing","outgoing":true}])")));
+ // A held call still has the buds' attention.
+ EXPECT_TRUE(call_wants_audio(calls(R"([{"state":"held","connected":true}])")));
+
+ EXPECT_FALSE(call_wants_audio(calls("[]")));
+ EXPECT_FALSE(call_wants_audio(calls(R"([{"state":"disconnected"}])")));
+ EXPECT_FALSE(call_wants_audio(nlohmann::json()));
+ EXPECT_FALSE(call_wants_audio(calls(R"({"not":"an array"})")));
+
+ // One live call among finished ones still counts.
+ EXPECT_TRUE(call_wants_audio(calls(R"([{"state":"disconnected"},{"state":"active","connected":true}])")));
+}
+
TEST(AirPods, DistinguishesAirPodsFromAnIPhone) {
Device buds;
buds.name = "ZBZ AirPros";