Delete skipCallbacks when Exception dispatchInputEvent beacuse calling finishInputEvent twice will cause 'Native Crash'
If there is an exception, finishInputEvent method will be called, then NativeInputEventReceiver also send finish signal,will cause a native crash,'Abort message: 'Could not find consume time for seq=xxxx' [1] https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/jni/android_view_InputEventReceiver.cpp;l=441?q=InputEventRe&ss=android%2Fplatform%2Fsuperproject:frameworks%2F [2] https://cs.android.com/android/platform/superproject/+/master:frameworks/native/libs/input/InputTransport.cpp;l=1259?q=InputTRAN&ss=android%2Fplatform%2Fsuperproject:frameworks%2F Signed-off-by: chenxinyu <chenxinyu7@xiaomi.com> Change-Id: Ib834e2a960741f7fa33a0661c67f305af0db517a Merged-In: Ib834e2a960741f7fa33a0661c67f305af0db517a
This commit is contained in:
@@ -447,10 +447,6 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
|
||||
skipCallbacks = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (skipCallbacks) {
|
||||
mInputConsumer.sendFinishedSignal(seq, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user