ExternalInputLogging: refine the logic of getting the input id used for
logging

This is a followup for ag/25601007

Bug: 313721434, 313710434
Test: manual
Change-Id: I0db4f4557afa6c60431558c505b62296274e23db
1 file changed