From 6b1251f817796232fc385ae06b10f53e94340a36 Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Wed, 17 May 2017 12:34:53 -0400 Subject: [PATCH] We notify VR Core when a 2D intent is running in VR in persistent mode. One of the paths that sends these notifications incorrectly indicated that a VR app was not running. Fix the callsite to include the current VR component instead of null. Bug: 38004624 Test: Launch VR app, verify null component is not sent to VR core while it's running. Change-Id: I0589ee51952a503bfddec214999ed5bce48715ba --- .../core/java/com/android/server/vr/VrManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java index fb7ccc7bc0b5f..4044fdb07b0d4 100644 --- a/services/core/java/com/android/server/vr/VrManagerService.java +++ b/services/core/java/com/android/server/vr/VrManagerService.java @@ -368,7 +368,7 @@ public class VrManagerService extends SystemService implements EnabledComponentC // There is an active service, update it if needed updateCurrentVrServiceLocked(mVrModeEnabled, mCurrentVrService.getComponent(), - mCurrentVrService.getUserId(), null); + mCurrentVrService.getUserId(), mCurrentVrModeComponent); } } @@ -675,7 +675,7 @@ public class VrManagerService extends SystemService implements EnabledComponentC * @param enabled new state for VR mode. * @param component new component to be bound as a VR listener. * @param userId user owning the component to be bound. - * @param calling the component currently using VR mode, or null to leave unchanged. + * @param calling the component currently using VR mode. * * @return {@code true} if the component/user combination specified is valid. */