From 00c1fc97c17950335c65c93d010c6107a129607f Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 8 Dec 2009 15:51:43 -0800 Subject: [PATCH] Fix #2313382: SECURITY: Live wallpapers get touch events through the lock screen. This is a quick and dirty hack to not deliver touch events to the wallpaper when they are being sent to the keyguard. Perhaps we should have a separate window flag for this, but... bleah. Maybe later. Or maybe I'll use that secure flag. Or something. Change-Id: Ifd95b9f5b10db24a0854a93b925a833b24331b4c --- services/java/com/android/server/WindowManagerService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 44c9f0f7544bf..cd74522f339a1 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -6014,7 +6014,9 @@ public class WindowManagerService extends IWindowManager.Stub if (res != null && returnWhat == RETURN_PENDING_POINTER) { synchronized (mWindowMap) { - if (mWallpaperTarget == win || mSendingPointersToWallpaper) { + if ((mWallpaperTarget == win && + win.mAttrs.type != WindowManager.LayoutParams.TYPE_KEYGUARD) + || mSendingPointersToWallpaper) { sendPointerToWallpaperLocked(win, res, res.getEventTime()); } }