OSDN Git Service

Create ActivityDisplay if its registered in DisplayManager
authorAndrii Kulian <akulian@google.com>
Wed, 31 May 2017 05:46:53 +0000 (22:46 -0700)
committerAndrii Kulian <akulian@google.com>
Wed, 31 May 2017 22:05:54 +0000 (15:05 -0700)
commit62e6f2517323a829af1a8b9ba2c5c20cb870075b
tree2f435d85864ff7bc28e523896baaf925f11e6127
parentd865c624bda8130bdb03238e875dec9df5491e25
Create ActivityDisplay if its registered in DisplayManager

Activity manager is notified asynchronously when new display is
created. Because of that someone may try to access or use it
before AM is aware of it, e.g. launch an activity to a just
create virtual display.
This CL guards the cases where we try to use a display by id in
AM and creates a new instance if needed.

Bug: 34262188
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testImmediateLaunchOnNewDisplay
Test: go/wm-smoke
Change-Id: Iab0871708145aa80ff252a0c764beb6a3b5dc42d
services/core/java/com/android/server/am/ActivityStackSupervisor.java