OSDN Git Service

Allow destroying display content on removal
authorAndrii Kulian <akulian@google.com>
Thu, 9 Feb 2017 07:30:45 +0000 (23:30 -0800)
committerAndrii Kulian <akulian@google.com>
Fri, 10 Feb 2017 06:45:19 +0000 (22:45 -0800)
commit250d653325ffeeb8ef75e51e3a3d08d6abb8cf9c
tree933514d2f0bf7985be2e8735bb8eb5f3756fb7d6
parentf2ca8e030c4e65dcd9d7d021cca296fec85320b7
Allow destroying display content on removal

This CL sets the behavior for displays when they are removed.
For public displays by default all content will be moved to the
primary display and become focused. For private displays default
behavior is to destroy all content - first it moves stacks from
the secondary display to the primary display to the bottom, then
it destroys all activities in those stacks.

This CL adds two specified behaviors as modes, so in future these
rules might be altered if needed.

Bug: 34263289
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testContentDestroyOnDisplayRemoved
Change-Id: I3f89f06ff82cb4b487df58a86ba3b146a32cbd00
core/java/android/view/Display.java
core/java/android/view/DisplayInfo.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/display/LogicalDisplay.java