Fix for MAP/PBAP: Race-condition when requesting authorization from Settings app
When MAP and PBAP requests authorization from the Settings app via Intents,
it also sets a state isWaitingForAuthorization to indicate
that it should handle incoming replies.
This is however done in the code after the intent have been sent
and in some cases the reply for the intent is returned
before the state has been update = no handling of the reply.
This only happens on the second connect with a paired device and
only when the user have selected the "do not ask again" checkmark
in the popup requesting access.
FIX:
Move the update of isWaitingAuthorization to before sending the intent to settings
bug: 11179645
Change-Id: I25b019e32a01caa8509c8f97195712120823afa9
2 files changed