OSDN Git Service

Restrict launching activities on virtual displays
authorAndrii Kulian <akulian@google.com>
Wed, 28 Jun 2017 16:42:48 +0000 (09:42 -0700)
committerAndrii Kulian <akulian@google.com>
Wed, 28 Jun 2017 17:05:30 +0000 (10:05 -0700)
commit1cba31c3dc307a8629d32434bd5846a0097c240a
tree4764c1ca00fe723221a565e37d8f11fbbeead6b4
parentf36a995424b629bcd9bb1c0e65b8e572e01d0dfb
Restrict launching activities on virtual displays

If an app creates a Surface and a virtual display backed by that
Surface, it can then launch activities and hijack their content.
This CL restrict activities that can be launched to virtual displays
created by apps only to those who set "allowEmbedded" attribute.
If a virtual display was created by system, apps won't get access to
the surface, so we're not limiting in this case.

Bug: 63094482
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testLaunchNotEmbeddedOnVirtualDisplay
Change-Id: Ied216bdf33df4b5a6cc8cac0e006a4883a36f94f
services/core/java/com/android/server/am/ActivityStackSupervisor.java