Fix an event injection bug when the policy is bypassed.

Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
This commit is contained in:
Jeff Brown
2010-10-11 14:20:19 -07:00
parent b699726018
commit b931a1b418
8 changed files with 150 additions and 202 deletions

View File

@@ -5243,13 +5243,6 @@ public class WindowManagerService extends IWindowManager.Stub
mTempInputWindows.clear();
}
/* Provides feedback for a virtual key down. */
public void virtualKeyDownFeedback() {
synchronized (mWindowMap) {
mPolicy.performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
}
}
/* Notifies that the lid switch changed state. */
public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
mPolicy.notifyLidSwitchChanged(whenNanos, lidOpen);