Simplify the setA2dpService() implementation so it is less error prone
This fixes A2DP connectivity issue.
Previously, the setA2dpService() was checking whether the A2dpService
itself was available. However, setA2dpService() is called
during A2dpService.start(), hence at that time the service is not
ready yet.
In the past, setA2dpService() worked because ProfileService.isAvailable()
was returning true even before the corresponding service had finished
the start() execution.
Also, simplify the getA2dpService() error handling.
Fixes: 72574372
Test: Manual
Change-Id: I52f86f24bba2309e3ed979ba6bf64a9bf9e1fb78
1 file changed