Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e5197286 authored by Jack He's avatar Jack He Committed by Andre Eisenbach
Browse files

Fix Bluetooth pairing dialogue crash

When pairing passkey is invalid, onCreate() should return early to
prevent any dialog from displaying, which will then call onDestroy()
to destroy the activity. However mReceiver should be registered before
onDestroy() is called as onDestroy() will call unregisterReceiver(mReceiver)
that will throw an IllegalArgumentException when mReceiver was not registered.

This fix adds a flag that tracks whether mReceiver has been registered.
In addition, this fix fails the passkey confirmation request upon invalid
passkey.

Bug: 32577328
Test: Test with PTS TC_SERVER_SA_BI_01_C
Change-Id: Ifc047bad6bd99abca04404af9cd54d2034cd35aa
(cherry picked from commit 6f8e9eda2d9ed830d47971d93327792906db2dc1)
parent 0446865d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment