OSDN Git Service

Fix AVRCP crash, position and state tracking
authorMarie Janssen <jamuraa@google.com>
Tue, 12 Jul 2016 14:53:54 +0000 (07:53 -0700)
committerMarie Janssen <jamuraa@google.com>
Fri, 15 Jul 2016 17:57:59 +0000 (10:57 -0700)
commit9b04e432dee914b685ea30a310d0626d85689f4a
treebccf8c42094c507121a873de0b5203e871d175c2
parent2be5946285b5956fc752f4e1fbbaf9a3f87e20e5
Fix AVRCP crash, position and state tracking

When the MediaController goes away (media stops) a NPE would cause a
crash.

Initialize the position so that an initial notification gets sent
when position is requested, send it when the music is paused, and
send play state whenever the app sends us a play state update.

Bug: 30039744
Bug: 29416450
Change-Id: I44397b3dc40d328fa75a2c15875fad298a5090dd
(cherry picked from commit 84d3f084d4d1a65eb7a481e5a7fe4a6ac827be7b)
src/com/android/bluetooth/avrcp/Avrcp.java