Snap for 8399617 from c654f5ca43c24e116718b8fad7eee36cd1bd7643 to sc-qpr3-release

Change-Id: Ifec6981e553dcdb079639a5d00f7e58e3f9a2a79
diff --git a/btif/avrcp/avrcp_service.cc b/btif/avrcp/avrcp_service.cc
index 51d66fe..9a4af36 100644
--- a/btif/avrcp/avrcp_service.cc
+++ b/btif/avrcp/avrcp_service.cc
@@ -297,6 +297,13 @@
                              profile_version, 0);
   btif_dm_add_uuid_to_eir(UUID_SERVCLASS_AV_REM_CTRL_TARGET);
 
+  ct_sdp_record_handle = SDP_CreateRecord();
+
+  avrcp_interface_.AddRecord(UUID_SERVCLASS_AV_REMOTE_CONTROL,
+                             "AV Remote Control", NULL, AVRCP_SUPF_TG_CT,
+                             ct_sdp_record_handle, false, AVRC_REV_1_3, 0);
+  btif_dm_add_uuid_to_eir(UUID_SERVCLASS_AV_REMOTE_CONTROL);
+
   media_interface_ = new MediaInterfaceWrapper(media_interface);
   media_interface->RegisterUpdateCallback(instance_);
 
@@ -333,6 +340,9 @@
   avrcp_interface_.RemoveRecord(sdp_record_handle);
   btif_dm_remove_uuid_from_eir(UUID_SERVCLASS_AV_REM_CTRL_TARGET);
   sdp_record_handle = -1;
+  avrcp_interface_.RemoveRecord(ct_sdp_record_handle);
+  btif_dm_remove_uuid_from_eir(UUID_SERVCLASS_AV_REMOTE_CONTROL);
+  ct_sdp_record_handle = -1;
 
   connection_handler_->CleanUp();
   connection_handler_ = nullptr;
diff --git a/btif/avrcp/avrcp_service.h b/btif/avrcp/avrcp_service.h
index 067631e..4898bbf 100644
--- a/btif/avrcp/avrcp_service.h
+++ b/btif/avrcp/avrcp_service.h
@@ -98,6 +98,7 @@
   static ServiceInterfaceImpl* service_interface_;
 
   uint32_t sdp_record_handle = -1;
+  uint32_t ct_sdp_record_handle = -1;
   uint16_t profile_version = -1;
 
   MediaInterface* media_interface_ = nullptr;
diff --git a/profile/avrcp/avrcp_config.h b/profile/avrcp/avrcp_config.h
index f6a8724..3f9e74d 100644
--- a/profile/avrcp/avrcp_config.h
+++ b/profile/avrcp/avrcp_config.h
@@ -50,3 +50,10 @@
 #ifndef AVRCP_SUPF_TG
 #define AVRCP_SUPF_TG_DEFAULT AVRCP_SUPF_TG_1_4
 #endif
+
+/**
+ * Supported Feature for AVRCP tartget control
+ */
+#ifndef AVRCP_SUPF_TG_CT
+#define AVRCP_SUPF_TG_CT AVRC_SUPF_CT_CAT2
+#endif