am 0f0541e4: am b88102f5: Input dispatcher ANR handling enhancements.

Merge commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6'

* commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6':
  Input dispatcher ANR handling enhancements.
This commit is contained in:
Jeff Brown
2010-09-12 17:15:19 -07:00
committed by Android Git Automerger
15 changed files with 2589 additions and 1978 deletions

View File

@@ -5089,8 +5089,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
/* Notifies the window manager about an input channel that is not responding.
* The method can either cause dispatching to be aborted by returning -2 or
* return a new timeout in nanoseconds.
* Returns a new timeout to continue waiting in nanoseconds, or 0 to abort dispatch.
*
* Called by the InputManager.
*/
@@ -5099,7 +5098,7 @@ public class WindowManagerService extends IWindowManager.Stub
synchronized (mWindowMap) {
WindowState windowState = getWindowStateForInputChannelLocked(inputChannel);
if (windowState == null) {
return -2; // irrelevant, abort dispatching (-2)
return 0; // window is unknown, abort dispatching
}
Slog.i(TAG, "Input event dispatching timed out sending to "
@@ -5122,8 +5121,7 @@ public class WindowManagerService extends IWindowManager.Stub
/* Notifies the window manager about an application that is not responding
* in general rather than with respect to a particular input channel.
* The method can either cause dispatching to be aborted by returning -2 or
* return a new timeout in nanoseconds.
* Returns a new timeout to continue waiting in nanoseconds, or 0 to abort dispatch.
*
* Called by the InputManager.
*/
@@ -5149,7 +5147,7 @@ public class WindowManagerService extends IWindowManager.Stub
} catch (RemoteException ex) {
}
}
return -2; // abort dispatching
return 0; // abort dispatching
}
private WindowState getWindowStateForInputChannel(InputChannel inputChannel) {
@@ -5263,15 +5261,6 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
/* Notifies that an app switch key (BACK / HOME) has just been pressed.
* This essentially starts a .5 second timeout for the application to process
* subsequent input events while waiting for the app switch to occur. If it takes longer
* than this, the pending events will be dropped.
*/
public void notifyAppSwitchComing() {
// TODO Not implemented yet. Should go in the native side.
}
/* Notifies that the lid switch changed state. */
public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
mPolicy.notifyLidSwitchChanged(whenNanos, lidOpen);