OSDN Git Service

Fix launch of activities into VR Virtual display
authorKarthik Ravi Shankar <karthikrs@google.com>
Tue, 26 Sep 2017 20:40:58 +0000 (13:40 -0700)
committerKarthik Ravi Shankar <karthikrs@google.com>
Thu, 28 Sep 2017 18:11:49 +0000 (11:11 -0700)
commit4c6573889567dbe2dc0fad6217818aab6b7a7a1f
treee348e24f1dae94b831958310a76f4ecae2a35a89
parentaace655509795861986aefd4f910d9bb439ff00e
Fix launch of activities into VR Virtual display

When launching a 2D activity in VR mode by the VR app, we want to launch
it in the virtual display created by VR. But, this fails since the
virtual display owner is system and the calling UID doesn't have
ACTIVITY_EMBED permission.

We address this by making the virtual display public since it's lifetime
is only VR mode and we want to allow all apps to launch 2D activities
and route them to the vr virtual display.

Bug: 66475142
Test: Launch VrSettingsActivity by clicking on gear and check "adb shell
am stack list" to verify it launched on the virtual display

Change-Id: Idde63ea63c953c6cf3d4ea46989a963a5651ce8a
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
services/core/java/com/android/server/vr/Vr2dDisplay.java