OverlayCoordinator

@Singleton
class OverlayCoordinator @Inject constructor(overlayConfigDao: OverlayConfigDao, keyRepository: KeyRepository, cryptoOperations: CryptoOperations, paddingTemplateDao: PaddingTemplateDao, settingsRepository: SettingsRepository, passphraseSession: OverlayPassphraseSession)

Singleton that mediates between the accessibility service and the overlay UI.

It holds the currently attached AccessibilityService, the active FocusTarget, and serializes overlay actions through a mutex with a minimum gap to avoid double-fires. All crypto runs off the main thread; cached passphrases are read from OverlayPassphraseSession and wiped after use.

Constructors

Link copied to clipboard
@Inject
constructor(overlayConfigDao: OverlayConfigDao, keyRepository: KeyRepository, cryptoOperations: CryptoOperations, paddingTemplateDao: PaddingTemplateDao, settingsRepository: SettingsRepository, passphraseSession: OverlayPassphraseSession)

Functions

Link copied to clipboard

Binds the live AccessibilityService used to render and act on the overlay.

Link copied to clipboard

Removes the overlay and detaches the service (e.g. on service destroy).

Link copied to clipboard

Returns true when there is a currently tracked editable focus target.

Link copied to clipboard
fun hideAll()

Removes the overlay window and releases the tracked focus node.

Link copied to clipboard

Records node as the active editable target (copying it defensively) so subsequent encrypt/decrypt actions operate on the right field.

Link copied to clipboard
fun onForegroundAppChanged(packageName: String)

Reacts to a foreground app change by showing or hiding the overlay based on the per-app configuration and global settings.

Link copied to clipboard

Handles a click that may be a "send" action; when auto-send is configured and node looks like a send control, encrypts the focused field first.

Link copied to clipboard

Rescans the accessibility tree from root to (re)locate the best editable field and update the tracked focus target.