Re-route to default display if the home activity doesn't support multi-display
If a user operates on secondary display to change the default home, system will launch the home activity on secondary display even if the home activity is not support multi-display. Add more conditions to re-route to default display if the home activity doesn't support multi-display when deciding the prefer task display area. Bug: 179329207 Test: atest ActivityStarterTests Change-Id: I32e3f369f03f60c6e8891f2876272c5e6b375eb5
This commit is contained in:
@@ -439,6 +439,13 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
|
||||
taskDisplayArea = mSupervisor.mRootWindowContainer.getDefaultTaskDisplayArea();
|
||||
}
|
||||
|
||||
// Re-route to default display if the home activity doesn't support multi-display
|
||||
if (taskDisplayArea != null && activityRecord.isActivityTypeHome()
|
||||
&& !mSupervisor.mRootWindowContainer.canStartHomeOnDisplayArea(activityRecord.info,
|
||||
taskDisplayArea, false /* allowInstrumenting */)) {
|
||||
taskDisplayArea = mSupervisor.mRootWindowContainer.getDefaultTaskDisplayArea();
|
||||
}
|
||||
|
||||
return (taskDisplayArea != null)
|
||||
? taskDisplayArea
|
||||
: getFallbackDisplayAreaForActivity(activityRecord, request);
|
||||
|
||||
Reference in New Issue
Block a user