Copy InputDeviceIdentifier instead of taking a reference

This line appears to be causing hwasan failures in the lab (see bug).
While a const& should extend the lifetime of the thing it's referring
to, that doesn't seem to be happening in this case, possibly because
getDeviceIdentifier isn't a simple getter. InputDeviceIdentifier isn't a
particularly large struct, and we intend to replace this code with an
IDC property anyway, so just take a copy of it.

Bug: 266534706, 251196347
Test: atest inputflinger_tests
Test: connect Sony gamepads, check old stack is used
Test: connect Apple Magic Trackpad 2, check new stack is used
Change-Id: I98f09f8226bc5e42082b07f9795eccc6de890879
1 file changed