CTS Verifier:Fix timing issue for Ble Client Connect
There's a timing issue to make the test case failure.
The pre-condition is:
1. First time to connect. (It means it never do pairing or it has been unpaired)
2. The GATT connection between the two phones is using BR/EDR and
using the the non-just work pairing approach.
(Sometime, it will popup a dialog to do pairing ...)
1. Run the apk to let client to connect to server
2. Each side starts to pair (Due to use non-just work pairing approach)
3. Client side must pull the notification bar to focus the pairing dialog.
4. Both side click the yes button to pair.
5. The pass icon in the client side is not enabled.
* Because the GATT connection callback is invoked when the client activity is paused,
the receiver is unregistered and lost the intent.
* Move the registeration/unregisteration of the receiver
from onResume/onPause to onCreate/onDestroy
* Although MTK's BT stack changes the pairing approach to pass the CTS Verifier,
it's highly recommended to apply our patch to make the CTS Verifier to have better compatibility.
Signed-off-by: Junjie Hu <email@example.com>
1 file changed