In preparation for replacing the `InterfaceFactory` with an
injectable form we need to convert static methods that call
`InterfaceFactory` into non-static, injected forms.
Also:
- Updated kotlin `-Xopt-in` to `-opt-in` to remove build
time warnings.
- Removed some unused `RadioInterfaceService` code.
Extracts USB device management into a `UsbRepository`.
In order for `SerialInterface to gain access to this prior to
the `RadioInterfaceService` being fully natively dependency
injected, all `InterfaceFactory` implementations needed
to be modified to accept the `UsbRepository` via argument. This
will go away in a future PR.
Changed `assumePermission` constant to `false` as it was preventing
the request for permission from occurring, breaking serial connectivity.
Minor improvement: SerialInterface re-bonding by device name is
now supported.
Uses Hilt to get the database initialization off of the
main thread.
The initial introduction always has a disproportionate
fan-out of boilerplate. In this case, all entry points which
were using UIViewModel needed to be annotated in order to let
the code gen know that they needed to support it.
The PacketRepository is injected into things via the main
thread (e.g., the MeshService) but due to the lazy declaration,
the database isn't hydrated until the DAO is access while on an
IO thread.