The old code happened to work because this function only got called if
the app was already running, but the correct thing to do is to always
wait until we have first called back from C++ code, indicating that the
app is indeed fully initialized.
This way we only process the Intent in one place in the Java code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We want to be able to respond to a USB device being plugged in.
This simply logs the information we get from the device. Sadly the
really useful getProductName and getManufacturerName require API level
21 (so Android 5.0 or newer) and we still have a couple hundred users on
4.1-4.4.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>