Skip to content

Commit 208236d

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Pull showStrictModeViolation off of local threads." into jb-dev
2 parents 956f28e + 0447a81 commit 208236d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5248,9 +5248,14 @@ public void setInTouchMode(boolean mode) {
52485248

52495249
// TODO: more accounting of which pid(s) turned it on, keep count,
52505250
// only allow disables from pids which have count on, etc.
5251+
@Override
52515252
public void showStrictModeViolation(boolean on) {
52525253
if (mHeadless) return;
5254+
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, 0));
5255+
}
52535256

5257+
private void showStrictModeViolation(int arg) {
5258+
final boolean on = arg != 0;
52545259
int pid = Binder.getCallingPid();
52555260
synchronized(mWindowMap) {
52565261
// Ignoring requests to enable the red border from clients
@@ -6714,6 +6719,7 @@ final class H extends Handler {
67146719
public static final int BOOT_TIMEOUT = 23;
67156720
public static final int WAITING_FOR_DRAWN_TIMEOUT = 24;
67166721
public static final int BULK_UPDATE_PARAMETERS = 25;
6722+
public static final int SHOW_STRICT_MODE_VIOLATION = 26;
67176723

67186724
public static final int ANIMATOR_WHAT_OFFSET = 100000;
67196725
public static final int SET_TRANSPARENT_REGION = ANIMATOR_WHAT_OFFSET + 1;
@@ -7179,6 +7185,11 @@ public void handleMessage(Message msg) {
71797185
break;
71807186
}
71817187

7188+
case SHOW_STRICT_MODE_VIOLATION: {
7189+
showStrictModeViolation(msg.arg1);
7190+
break;
7191+
}
7192+
71827193
// Animation messages. Move to Window{State}Animator
71837194
case SET_TRANSPARENT_REGION: {
71847195
Pair<WindowStateAnimator, Region> pair =

0 commit comments

Comments
 (0)