Allow Java-land to request current track metadata through JNI
AVRCP Targets are not supposed to give image handles over with metadata until an AVRCP BIP client connects from a particular controller. Because this connection can happen any time and there's nothing forcing a target to send us a track changed notification to inform us of the new handle, the best thing we can do to work with all devices is to request it when we connect on BIP. Otherwise, we risk a race condition between the BIP connection and any amount of track changed notifications that might happen organically. Our JNI doesn't current support requesting current track metadata. This change adds/implements a get_current_track_metadata() method to the JNI. This, paired with a change in /packages/apps/Bluetooth/, fixes the above mentioned race condition and keeps us from missing out on possible cover art image handles. Bug: 152655644 Test: Build, flash, test with AVRCP target cover art devices Change-Id: I9d1f28068b4fded61d5336da8d864fbd9ef34f98 Merged-In: I9d1f28068b4fded61d5336da8d864fbd9ef34f98
Loading
Please register or sign in to comment