am b88102f5: Input dispatcher ANR handling enhancements.
Merge commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1' into gingerbread-plus-aosp * commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1': Input dispatcher ANR handling enhancements.
This commit is contained in:
@@ -5098,8 +5098,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.
|
||||
*/
|
||||
@@ -5108,7 +5107,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 "
|
||||
@@ -5131,8 +5130,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.
|
||||
*/
|
||||
@@ -5158,7 +5156,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
} catch (RemoteException ex) {
|
||||
}
|
||||
}
|
||||
return -2; // abort dispatching
|
||||
return 0; // abort dispatching
|
||||
}
|
||||
|
||||
private WindowState getWindowStateForInputChannel(InputChannel inputChannel) {
|
||||
@@ -5272,15 +5270,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);
|
||||
|
||||
Reference in New Issue
Block a user