Skip to content

Commit 3198ef3

Browse files
committed
Use the original caller pid for computing visibility
bug:7325771 Make Strict mode violations flicker the screen for visible app correctly. Change-Id: I293dc9e945cb0366a1cd7b63a5b746159aab7c74
1 parent c0c0c0e commit 3198ef3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5651,12 +5651,12 @@ public void setInTouchMode(boolean mode) {
56515651
@Override
56525652
public void showStrictModeViolation(boolean on) {
56535653
if (mHeadless) return;
5654-
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, 0));
5654+
int pid = Binder.getCallingPid();
5655+
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, pid));
56555656
}
56565657

5657-
private void showStrictModeViolation(int arg) {
5658+
private void showStrictModeViolation(int arg, int pid) {
56585659
final boolean on = arg != 0;
5659-
int pid = Binder.getCallingPid();
56605660
synchronized(mWindowMap) {
56615661
// Ignoring requests to enable the red border from clients
56625662
// which aren't on screen. (e.g. Broadcast Receivers in
@@ -7646,7 +7646,7 @@ public void handleMessage(Message msg) {
76467646
}
76477647

76487648
case SHOW_STRICT_MODE_VIOLATION: {
7649-
showStrictModeViolation(msg.arg1);
7649+
showStrictModeViolation(msg.arg1, msg.arg2);
76507650
break;
76517651
}
76527652

0 commit comments

Comments
 (0)