Phone UI: show the glasses, charging case and R1 battery levels

A line under the mirror lists each device whose level is known, e.g.
"G2 100% · Case 98% ⚡ · R1 72%" (⚡ = charging), in portrait and
landscape. The case level joins the shell's battery state beside the
glasses and R1 (it is not drawn in the glasses' top bar) and reaches the
page through the dashboard snapshot. Like the glasses level it is kept
across disconnects: the case only reports while the glasses are docked
and only drains while charging them.
This commit is contained in:
Om Alve committed 2026-11-01 21:29:32 +05:30
1 parent acfcf79787
commit 9c0535014a
6 files changed
+70 -6

No files matched your search

+6
View File
@@ -486,6 +486,12 @@ export type ShellChromeState = {
/** The Wear OS watch (app/g2/wear-remote.ts); null when no watch is reachable. */
watch: number | null;
watchCharging: boolean | null;
/**
* The glasses' charging case, last known (it only reports while the
* glasses are docked); null until it does. Shown on the phone, not here.
*/
case: number | null;
caseCharging: boolean | null;
};
/** App-provided tray images, drawn between notification icons and batteries. */
trayIcons: ShellChromeTrayIcon[];
+1
View File
@@ -452,6 +452,7 @@ class Shell {
private lastInput: InputEvent | null = null;
private battery: ShellChromeState["battery"] = {
headset: null, headsetCharging: null, ring: null, ringCharging: null, watch: null, watchCharging: null,
case: null, caseCharging: null,
};
private readonly batteryListeners = new Set<() => void>();
private attention = new Map<string, boolean>();