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
Loading
Please register or sign in to comment