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
This commit is contained in:
Dianne Hackborn
2009-12-08 15:51:43 -08:00
parent d59fb6e743
commit 00c1fc97c1

View File

@@ -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());
}
}