Merge "Fix NPE in interceptKeyBeforeDispatching." into honeycomb
This commit is contained in:
@@ -5994,7 +5994,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
* ordinary dispatch. */
|
* ordinary dispatch. */
|
||||||
public boolean interceptKeyBeforeDispatching(
|
public boolean interceptKeyBeforeDispatching(
|
||||||
InputWindowHandle focus, KeyEvent event, int policyFlags) {
|
InputWindowHandle focus, KeyEvent event, int policyFlags) {
|
||||||
WindowState windowState = (WindowState) focus.windowState;
|
WindowState windowState = focus != null ? (WindowState) focus.windowState : null;
|
||||||
return mPolicy.interceptKeyBeforeDispatching(windowState, event, policyFlags);
|
return mPolicy.interceptKeyBeforeDispatching(windowState, event, policyFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6002,7 +6002,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
* the application did not handle. */
|
* the application did not handle. */
|
||||||
public KeyEvent dispatchUnhandledKey(
|
public KeyEvent dispatchUnhandledKey(
|
||||||
InputWindowHandle focus, KeyEvent event, int policyFlags) {
|
InputWindowHandle focus, KeyEvent event, int policyFlags) {
|
||||||
WindowState windowState = (WindowState) focus.windowState;
|
WindowState windowState = focus != null ? (WindowState) focus.windowState : null;
|
||||||
return mPolicy.dispatchUnhandledKey(windowState, event, policyFlags);
|
return mPolicy.dispatchUnhandledKey(windowState, event, policyFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user