Show the local client's state in the Android connection notification, like the tray icon

The notification follows the server holding the microphone, as the desktop tray
does, and draws its state: the Material glyph in the status bar, the chosen
pack's art as the large icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 23:21:42 +00:00
parent 2d83eafffd
commit 5fd2a612b9
4 changed files with 88 additions and 18 deletions

View File

@@ -7,23 +7,30 @@ package com.ts3client.session;
*/
public enum SelfState {
DISCONNECTED("Not connected"),
DEAFENED("Speakers muted"),
MIC_MUTED("Microphone muted"),
MIC_LOCAL_MUTED("Microphone locally muted"),
AWAY("Away"),
COMMANDER_TALKING("Talking (channel commander)"),
COMMANDER("Channel commander"),
TALKING("Talking"),
IDLE("Connected");
DISCONNECTED("Not connected", null),
DEAFENED("Speakers muted", "OUTPUT_MUTED"),
MIC_MUTED("Microphone muted", "INPUT_MUTED"),
MIC_LOCAL_MUTED("Microphone locally muted", "INPUT_MUTED_LOCAL"),
AWAY("Away", "AWAY"),
COMMANDER_TALKING("Talking (channel commander)", "PLAYER_COMMANDER_ON"),
COMMANDER("Channel commander", "PLAYER_COMMANDER_OFF"),
TALKING("Talking", "PLAYER_ON"),
IDLE("Connected", "PLAYER_OFF");
private final String label;
private final String iconKey;
SelfState(String label) {
SelfState(String label, String iconKey) {
this.label = label;
this.iconKey = iconKey;
}
public String label() {
return label;
}
/** The icon pack key the state is drawn with, or {@code null} for the app's own icon. */
public String iconKey() {
return iconKey;
}
}