Merge "Pull showStrictModeViolation off of local threads." into jb-dev

This commit is contained in:
Craig Mautner
2012-05-22 16:54:09 -07:00
committed by Android (Google) Code Review

View File

@ -5248,9 +5248,14 @@ public class WindowManagerService extends IWindowManager.Stub
// TODO: more accounting of which pid(s) turned it on, keep count,
// only allow disables from pids which have count on, etc.
@Override
public void showStrictModeViolation(boolean on) {
if (mHeadless) return;
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, 0));
}
private void showStrictModeViolation(int arg) {
final boolean on = arg != 0;
int pid = Binder.getCallingPid();
synchronized(mWindowMap) {
// Ignoring requests to enable the red border from clients
@ -6714,6 +6719,7 @@ public class WindowManagerService extends IWindowManager.Stub
public static final int BOOT_TIMEOUT = 23;
public static final int WAITING_FOR_DRAWN_TIMEOUT = 24;
public static final int BULK_UPDATE_PARAMETERS = 25;
public static final int SHOW_STRICT_MODE_VIOLATION = 26;
public static final int ANIMATOR_WHAT_OFFSET = 100000;
public static final int SET_TRANSPARENT_REGION = ANIMATOR_WHAT_OFFSET + 1;
@ -7179,6 +7185,11 @@ public class WindowManagerService extends IWindowManager.Stub
break;
}
case SHOW_STRICT_MODE_VIOLATION: {
showStrictModeViolation(msg.arg1);
break;
}
// Animation messages. Move to Window{State}Animator
case SET_TRANSPARENT_REGION: {
Pair<WindowStateAnimator, Region> pair =