Loading
Use the same logic to launch home activity
The original logic of startDockOrHome is using the intent with CATEGORY_HOME to find the home activity, which is not guarantee to support secondary display. That may cause no response when tap the home key on secondary display. RootActivityContainer#startHomeOnDisplay already has a complete flow to find the proper secondary launcher for secondary display. So, let's expose startHomeOnDisplay through ActivityTaskManagerInternal and let PhoneWindowManager can use the same logic to launch home activity. One more change is to be consistent with InputDispatcher to fallback to top focused display if the specific display id is invalid. Bug: 127348870 Test: atest ActivityManagerMultiDisplayTests Test: atest ActivityManagerActivityVisibilityTests Test: atest ActivityManagerSplitScreenTests#testMinimizeAndUnminimizeThenGoingHome Test: atest ActivityMetricsLoggerTests#testAppHotLaunchSetsWaitResultDelayData Change-Id: Iebef462f244ef2457a2e7c9ad0a706aebe291fe8