OSDN Git Service

Pass BIP client status down and use it to decide to send image handles
authorSal Savage <salsavage@google.com>
Fri, 28 Feb 2020 21:33:22 +0000 (13:33 -0800)
committerSal Savage <salsavage@google.com>
Tue, 12 Jan 2021 21:51:41 +0000 (13:51 -0800)
commit8280f1c838e54464f4aaea705c48c05b0f1fd934
treed9058062f59476c088c9198f7b03d4d184c4ed10
parentaa8c8b5716cecc2e6133e484aad4d5bc41328df0
Pass BIP client status down and use it to decide to send image handles

The new avrcp architecture has the design such that all requests to Java
are agnostic of which device is asking for them. However, image handles
are not meant to be sent if there is no BIP connection with that device.

Rather than invalidate the previous design assumption, this patch sends
that status down to the connection handler and device objects to use
when building response packets. The image handles, if included, will be
automatically removed if there is no client connection. If no image
handles are sent, none will be included.

Tag: #feature
Bug: 153076316
Test: Build, flash, make sure existing metadata isn't impacted and is
still sent when requested. Make sure imge handles are sent, when they
exist, if and only if we've connected a client on the Java side BIP OBEX
server.

Change-Id: If252abe120188df2bcdabed22382fba070d17f32
btif/avrcp/avrcp_service.cc
btif/avrcp/avrcp_service.h
include/hardware/avrcp/avrcp.h
profile/avrcp/connection_handler.cc
profile/avrcp/connection_handler.h
profile/avrcp/device.cc
profile/avrcp/device.h