Most of the builtin apps had some padding between the window edge and
their content, because they expect to be displayed with a line border on
their edge. We added a customization option to remove the border, so,
that padding is not always necessary. Make the layouts dynamically
adjust, to omit the padding when it isn't needed.
The previous commit's comment and test said Android starts the app in the
background (a home-widget update, a notification-listener rebind) with
the glasses session running. A background start alone doesn't connect
the glasses; only the main page does. The state that breaks voice is
the Activity being destroyed afterwards: swiping the app away in Recents
destroys it while the foreground service keeps the process and session
running, and NativeScript then clears both foregroundActivity and
startActivity. On Android 12+ Back on the main page only moves the task
to the back, so the Activity survives it. Comment and test wording only.
ensurePermissions looked up the Activity before checking whether any
permission was missing, and getActivity() throws when there is none.
Android starts the app in the background with no Activity (a home-widget
update, a notification-listener rebind), and the glasses session runs
from there until the app is opened. So in that state every "Hey Even"
failed in ensureVoicePermissions even though the mic permission was
granted, and the voice dialog kept showing the idle "Voice control
stopped.". The same throw hit ensureBlePermissions.
The Activity is now only looked up when a permission actually has to be
requested. A capture that fails to start for any reason other than a
denied permission now says so in the dialog instead of leaving the idle
status up.
Review fixes for the charging-case battery:
- The case reports whether the glasses are docked. An empty caseInfo
(the reply out of the case) now parses as "not docked, no level"
instead of nothing, and undocking is reported even when the level and
charge state are unchanged. TS keeps the last level but clears
caseCharging while the glasses are out of the case.
- The phone line shows the charging mark only while it is live: G2 and
Case only with a link to the glasses (connected or charging), and Case
only while docked. Levels stay as the last known ones.
- The session-start case read waits until the layout is up, so a
firmware that ignored it could no longer hold up the first frame. When
the glasses are already charging at connect, the charging-mode read is
the only one; the old duplicate read and its "late ACK" log are gone.
- Case dedup state resets on every connect, as wearState does, so each
session's read reaches TS.
- caseCharging uses > 0 like the headset, and is normalized to 0/1.
- iOS now feeds the reading into the shell battery state, and the
assistant's describeState includes the case level.
- The batteryLine accessors move above connectionStatusLabel's doc
comment.
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.