From 05aab5810a5f0296c3650f104c58479b2765c0b7 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Fri, 6 Feb 2015 14:08:13 -0800 Subject: Stop active media projections on user switch. Bug: 19278080 Change-Id: I63cc8aa12954d4de257b793967d3845a6f86dc3f --- .../server/media/projection/MediaProjectionManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java index e9b3f8b..bfdc400 100644 --- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java +++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java @@ -98,6 +98,11 @@ public final class MediaProjectionManagerService extends SystemService @Override public void onSwitchUser(int userId) { mMediaRouter.rebindAsUser(userId); + synchronized (mLock) { + if (mProjectionGrant != null) { + mProjectionGrant.stop(); + } + } } @Override -- cgit v1.1