Use mapped UUIDs to identify handles and invalidate/delete on disconnect
By specification, image handles can be recycled and reused each time a device disconnects from BIP (if we/they are not database aware). Additionally, by specification, we MUST disconnect on successful change paths when either side is not database aware, or on UIDS_CHANGED when both sides aredatabase aware. This means anytime we disconnect we have no guarantees that a handle we're given will point to the same image we've seen before. It also means we'll be doing it often. Because we (and other consumers, likely) are caching images, we need a layer of indirection between the handles coming in and how we identify images. Using a specific UUID and a map will ollow us to uniquely identify an image for a point in time. This will also allow caching schemes that our consumers may have to actually work since we can use this UUID in the URI. This change implements the above described UUID map and makes sure images are deleted from storage when they are no longer used by the browse tree or current track. Tag: #compatibility Bug: 153461730 Test: atest BluetoothInstrumentationTests Merged-In: I757c9bae1327b255b83dd1d43624ec4ec8009501 Change-Id: I757c9bae1327b255b83dd1d43624ec4ec8009501
Loading
Please register or sign in to comment