OSDN Git Service

Saving Bluetooth name to Max 248 character only.
authorSrinu Jella <sjella@codeaurora.org>
Fri, 30 Dec 2016 10:20:48 +0000 (15:50 +0530)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 28 Nov 2017 04:05:23 +0000 (04:05 +0000)
commitf04ea90af39cee34f1a8ac0351e9bcaf3ad2c620
treebb20ce3deba5b6ba2596871709480c6d0768c519
parentf92bdc7caffb7eac4e4bd531424cd968efc57d3e
Saving Bluetooth name to Max 248 character only.

Steps:
1. Set the BT name more than 248 character using SDK API set_name.
2. Check the BT Name on bt_config.
3. Name should be also visible Setting Apps on Bluetooth.

Failure: BluetoothAdapterProperties and stack are not in sync.
Root Cause: No check for the Bluetooth name length.
We can handle in framework layer but now handling in Stack.

Fix: Check the length of Bluetooth Name before writing to the file.

Test: Application and Stack BD Name are in sync
Bug: 35126970

Change-Id: I856a66e863cec68bee38762903a0b762ab0626d2
btif/src/btif_storage.cc