Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a4269d0b authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Intercept HOME intents for secondary home displays.

Compute (the likely) launch TaskDisplayArea early in ActivityStarter
before intercepting the intent and pass it to
ActiivtyStartInterceptor. If the launch display doesn't support
primary home but it supports secondary home, replace the intent with
the secondary home intent.

The existing RootWindowController#resolveSecondaryHomeActivity is
reused to consolidate the resolution logic into a single place. This
has the side effect that the ResolverActivity is skipped if there are
more than one CATEGORY_SECONDARY_HOME activities available but the
secondary home component that is started on new displays is the one
that is resolved, following the existing resolution logic. Note that
this is only the case if a CATEGORY_HOME intent is sent to the virtual
display. CATEGORY_SECONDARY_HOME intents are still resolved in the
old way. This is super nice as it complies with both the existing
intent handling logic and allows for a seamless home experience on VD

This also nicely allows for adding the display's custom home component
to the intent at a single place in the future.

Fix: 297168712
Test: atest ActivityStartInterceptorTest

Change-Id: I59e24f97b5df11372c17e50c9ea5751dbf973eb7
parent 9d287d85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment