Skip to content
Commit d573db5b authored by Antony Sargent's avatar Antony Sargent
Browse files

Fix a race condition in the A2dpProfile constructor

When constructing A2dpProfile objects, we were creating an
A2dpServiceListener before initializing the mWrapperFactory instance
variable that it depended on. If the onServiceConnected callback happens
immediately after the listener is created, we'd get a null pointer
exception. The fix is to move initialization of mWrapperFactory up before
the construction of the A2dpServiceListener.

Bug: 38391718
Test: run boot tests
Change-Id: Ib0be947099862b19da7737b54b99b944241b605f
parent 95cf170c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment