diff --git a/android/handsfree.c b/android/handsfree.c
index 62bb1cf..c8e5f8a 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
/* TODO better way for forcing indicator */
device.inds[IND_CALLHELD].val = 0;
update_indicator(IND_CALLHELD, 1);
+ } else if (num_active > 0 && device.num_active == 0) {
+ /* If number of active calls change but there was no
+ * call setup change this means that there were active
+ * calls present when headset was connected.
+ *
+ * TODO should we care about held calls here as well?
+ */
+ connect_audio();
} else {
update_indicator(IND_CALLHELD,
num_held ? (num_active ? 1 : 2) : 0);
update_indicator(IND_CALL, !!(num_active + num_held));
update_indicator(IND_CALLSETUP, 0);
-
- break;
- case HAL_HANDSFREE_CALL_STATE_ACTIVE:
- connect_audio();
break;
default:
DBG("unhandled state %u", device.setup_state);