isAutographEmbedded
Declares that the fragments in this view's subtree sit beside their Activity's content rather than replacing it — a mini-player, a banner, a widget slot — so the Activity stays a screen of its own while they are attached (#281).
installAutographNativeScreenCapture decides whether an Activity is a screen or a shell for its fragments from its structure, and the structure cannot tell the two shapes apart: a Compose mini-player added into a container of a native Activity looks exactly like the Compose content fragment of a fragment-based app. It therefore treats every view-bearing fragment as content, and an Activity with a mini-player up at its first resume, or at the first resume after a stop, becomes a shell: its own taps carry no screen and it reports no Screen Viewed for itself. Only the app knows which shape it built, so it says so here.
Set it on the container the fragment is added into — which covers every fragment added there later, the way a mini-player slot is reused — or on the fragment's own root view (in onCreateView / onViewCreated). Either is in place before the host's next resume for a fragment added in onCreate. While a fragment's view, or one of its ancestors, is marked:
it does not make its Activity a shell, and a Compose view inside a marked subtree does not make the Activity (or a fragment containing the mark) a Compose host;
it does not take its Activity's return: coming back to the Activity reports the Activity, not the marked fragment, even when that fragment is a screen of its own.
The marked fragment itself is classified as before. A capturable one still reports its own Screen Viewed and names its own taps, so it also becomes the next screen's previous_screen; return null for it from fragmentScreenName if a widget should not report. An excluded one (it hosts Compose) added beside an Activity still masks the taps inside it, so they carry no screen rather than the Activity's. One nested inside a fragment that the mark turns into a named screen is a section of that screen, like any excluded fragment nested in a named one: it does not mask, and its taps carry the parent's name.
Mark the slot, not something above the content: every fragment whose view is anywhere under a mark counts as embedded, so a mark on the layout root, android.R.id.content or the decor reaches the Activity's real content fragment too. A fragment that really is the Activity's content must not be covered by a mark: the Activity would then report its own name over it — wrong, not absent.
Without the mark nothing changes: an Activity with a mini-player still becomes a shell, as the install kdoc documents.
A settable property, not a one-way mark
Like isAutographIgnored, and for the same reason: containers are reused, and a container that once held a widget can later hold content. Write false to take the mark back. The capture reads it when it settles what the Activity is — at the first resume, and at the first resume after each stop — so a change takes effect at the next of those, not at once.
Main thread only, like every other View property. Stored as a view tag keyed by a resource id this library declares, so it does not disturb View.getTag or any other library's tags. Resource ids merge by name across the application, though: an app or dependency declaring its own autograph_embedded id shares this key.