OSDN Git Service

Allow modifiers to specify windowing mode and preferred display.
authorBryce Lee <brycelee@google.com>
Wed, 6 Dec 2017 04:51:27 +0000 (20:51 -0800)
committerBryce Lee <brycelee@google.com>
Wed, 10 Jan 2018 21:55:38 +0000 (13:55 -0800)
commitec55eb06eb4868ca593c4b16438b3c6121701c1a
tree18a3523c78a639b0c8482b69fb9599d6982e4780
parentd93d206cfe45f0ca4252995e781ec1137599ada9
Allow modifiers to specify windowing mode and preferred display.

This changelist extends the parameters that positioners can
provide to include the windowing mode and display for a stack to
launch into. These are provided via the LaunchingParams object, which
replaces the previous bounds Rect as the result. When the values are
provided when laying out a task, the Controller will apply the
result. In other cases, such as in ActivityStarter, the caller of
LaunchingBoundsController#calculate is responsible applying the
result.

Fixes: 70031444
Test: atest FrameworksServicesTests:LaunchingBoundsControllerTests#testLayoutTaskPreferredDisplayChange
Test: atest FrameworksServicesTests:LaunchingBoundsControllerTests#testLayoutTaskWindowingModeChange
Change-Id: I949e2b5047663bfc297aac654f365109f0b1feb1
12 files changed:
services/core/java/com/android/server/am/ActivityLaunchParamsModifier.java [moved from services/core/java/com/android/server/am/LaunchingActivityPositioner.java with 68% similarity]
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/am/ActivityStarter.java
services/core/java/com/android/server/am/LaunchParamsController.java [new file with mode: 0644]
services/core/java/com/android/server/am/LaunchingBoundsController.java [deleted file]
services/core/java/com/android/server/am/TaskLaunchParamsModifier.java [moved from services/core/java/com/android/server/am/LaunchingTaskPositioner.java with 93% similarity]
services/core/java/com/android/server/am/TaskRecord.java
services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java [moved from services/tests/servicestests/src/com/android/server/am/LaunchingActivityPositionerTests.java with 73% similarity]
services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/am/LaunchingBoundsControllerTests.java [deleted file]
services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java [moved from services/tests/servicestests/src/com/android/server/am/LaunchingTaskPositionerTests.java with 81% similarity]