New hearing device pairing page: fix cannot re-connecting gatt issue

Should clear the `mConnectingGattList` when the gatts in the list are all disconnected in `OnStop()`. Otherwise, we can't re-connecting gatt for these devices after the page enter `onStart()` again.

Bug: 307890347
Test: manual test
Change-Id: I3b9fe05f894548887339011f5757c71e3a40eb5c
This commit is contained in:
Angela Wang
2024-01-18 06:52:59 +00:00
parent 3c71a5ff22
commit dc297afbe3

View File

@@ -149,6 +149,7 @@ public class HearingDevicePairingFragment extends RestrictedDashboardFragment im
for (BluetoothGatt gatt: mConnectingGattList) {
gatt.disconnect();
}
mConnectingGattList.clear();
mLocalManager.setForegroundActivity(null);
mLocalManager.getEventManager().unregisterCallback(this);
}