Fix interface notification race

In one use case, I see that if we go straight from
wifi client mode to tethering operation, the interface change notifications
are reported in an order that causes to enter tethered state
without actually tethering through connectivity service.

It is because an interface down notification (from wifi going down) comes after
we have started soft ap and we think we have tethered after calling startTethering
and switch to Tethered state

Instead, we should make sure tethering has started before going to Tethered state.

Change-Id: Iba7e8fab0feeb5637d40938862a8638871df8b02
1 file changed