Merge "Fix NPE in notifyFocusChanged"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4665762004
@@ -1761,12 +1761,15 @@ public class InputManagerService extends IInputManager.Stub
|
||||
|
||||
// Native callback
|
||||
private void notifyFocusChanged(IBinder oldToken, IBinder newToken) {
|
||||
if (mFocusedWindow.asBinder() == newToken) {
|
||||
Log.w(TAG, "notifyFocusChanged called with unchanged mFocusedWindow=" + mFocusedWindow);
|
||||
return;
|
||||
if (mFocusedWindow != null) {
|
||||
if (mFocusedWindow.asBinder() == newToken) {
|
||||
Slog.w(TAG, "notifyFocusChanged called with unchanged mFocusedWindow="
|
||||
+ mFocusedWindow);
|
||||
return;
|
||||
}
|
||||
setPointerCapture(false);
|
||||
}
|
||||
|
||||
setPointerCapture(false);
|
||||
mFocusedWindow = IWindow.Stub.asInterface(newToken);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user