This is a busy-wait with no timeout waiting for the SensorHub init and can block the UI thread or 'wait' indefinitely.
while (service.getSensorHub() == null) {
System.out.println("Waiting for BoundService Hub to start...");
}
while (service.getSensorHub().getEventBus() == null) {
System.out.println("Waiting for BoundService Hub EventBus to start...");
}
This is a busy-wait with no timeout waiting for the SensorHub init and can block the UI thread or 'wait' indefinitely.