Create InputTarget in a separate function

To make the code more readable and reusable, move the creation of
InputTarget into a separate function.

In a future commit, the new function ' createInputTargetLocked' will be
needed in other places of InputDispatcher, too.

Bug: 263319225
Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests
Change-Id: Iae78c7c812afe5bb059c56669a3de00fdfc496ef
3 files changed