Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 915b1d90 authored by minwoo2.kim's avatar minwoo2.kim Committed by Myles Watson
Browse files

SDP: Increase heap buffer size used for A2DP/AVRC



This buffer is used to save the attributes parsed from the SDP response
transferred from a peer device.

In Android O, SDP fails sometimes due to full memory from SDP DB.

The reason of this shortage seems to be the increasing of allocated
memory for tSDP_DISC_ATTR.

Android N uses a 32-bit bluetooth lib and 4 bytes of memory for
pointers.

In total, 12 bytes are used for tSDP_DISC_ATTR

Android O uses a 64-bit bluetooth lib and 8 bytes of memory for
pointers.

Now, 24 bytes are used for tSDP_DISC_ATTR.

To match this increase of memory consumption, We need to double the heap
buffer size. (from 1000 to 2000)

bug: 71005276
Test: passed the connection test performed with more than 50 BT devices
launched in the market

Signed-off-by: default avatarminwoo kim <minwoo2.kim@lge.com>

Change-Id: I24bb50810e224aa1e23141493b5b2fa3b706c495
parent f59aa227
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ enum {
#define BTA_AV_RC_HANDLE_NONE 0xFF

/* size of database for service discovery */
#define BTA_AV_DISC_BUF_SIZE 1000
#define BTA_AV_DISC_BUF_SIZE 2000

/* maximum length of AVDTP security data */
#define BTA_AV_SECURITY_MAX_LEN 400