YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.LauncherActivity Class Reference

Invisible entry point: holds the launcher, Android TV and share-target intent filters and starts the browser activity of the chosen layout. More...

Inheritance diagram for de.yaacc.LauncherActivity:
Inheritance graph
Collaboration diagram for de.yaacc.LauncherActivity:
Collaboration graph

Protected Member Functions

void onCreate (Bundle savedInstanceState)
 

Detailed Description

Invisible entry point: holds the launcher, Android TV and share-target intent filters and starts the browser activity of the chosen layout.

This component is exported and any app can start it with any intent, so the intent it forwards is always a fresh one, built from the allowlist in LauncherForwardPolicy: a plain launch, an ACTION_SEND of text/plain with a length-capped text, or ONE shared file.

The text forward carries no flags, data, categories, selector, URIs, EXTRA_STREAM, nested intents or other extras. The file forward is the one deliberate exception: ONE content: URI as the only item of a new ClipData plus FLAG_GRANT_READ_URI_PERMISSION, and nothing else (the system checks the grant for data and ClipData, never for EXTRA_STREAM, so the URI is not repeated there) except one single-use launch token (LaunchNonces): the browser activities are exported too and accept a file only with a token that this class mints after its checks passed. It is built only after LauncherForwardPolicy#decideStream agreed (URI in EXTRA_STREAM equals ClipData item 0, the incoming intent carried the read grant, a content: URI of another app), after the URI was found not to belong to ANY provider of this app. (From Android 15 on the initial caller is asked whether it holds read access, for the log only: via the system share sheet it is not the sending app and the answer is "denied".) A forward the system refuses (SecurityException) falls back to a plain launch. The incoming intent is never modified. Exactly one of the paths is taken per intent.

Extends the framework Activity, not AppCompat, because Theme.NoDisplay is a framework theme. An activity with that theme must call finish() before onResume completes (targetSdk > 22), hence finish() in finally.


The documentation for this class was generated from the following file: