From 3198ef3f971384cfb92f7d18b0fc8dae222bd58f Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Wed, 10 Oct 2012 14:52:30 -0700 Subject: [PATCH] Use the original caller pid for computing visibility bug:7325771 Make Strict mode violations flicker the screen for visible app correctly. Change-Id: I293dc9e945cb0366a1cd7b63a5b746159aab7c74 --- .../java/com/android/server/wm/WindowManagerService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 0db9f197506c2..4a0792dc7336a 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -5651,12 +5651,12 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void showStrictModeViolation(boolean on) { if (mHeadless) return; - mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, 0)); + int pid = Binder.getCallingPid(); + mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, pid)); } - private void showStrictModeViolation(int arg) { + private void showStrictModeViolation(int arg, int pid) { final boolean on = arg != 0; - int pid = Binder.getCallingPid(); synchronized(mWindowMap) { // Ignoring requests to enable the red border from clients // which aren't on screen. (e.g. Broadcast Receivers in @@ -7646,7 +7646,7 @@ public class WindowManagerService extends IWindowManager.Stub } case SHOW_STRICT_MODE_VIOLATION: { - showStrictModeViolation(msg.arg1); + showStrictModeViolation(msg.arg1, msg.arg2); break; }