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)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Thu, 29 Jun 2017 04:38:14 +0000 (04:38 +0000)
commited115cd696309ae9d164c603fcf7417e9f6c079f
tree61d96f42382ea14297f3033538e20601ca870b0b
parent1382fd7edb10a88915a59bedbc8897bed80e32d2
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
(cherry picked from commit 1cba31c3dc307a8629d32434bd5846a0097c240a)
services/core/java/com/android/server/am/ActivityStackSupervisor.java