Update generation when there is device connection state changed.

When there is device connection state changed, the available
input/output devices will change. If we don't update the generation, it
may cause the number of ports different with same generation, which may
cause crash in jni layer.

Bug: 73077399
Test: run com.android.bluetooth.hfp.HeadsetServiceTest
Change-Id: Ic2e477552a71582bcd38227b9a449eef5b82b18c
1 file changed