History log of /packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b40cec2e9a4a848b7ba724c6ed02c49604f0c669 25-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Rename bt_bdaddr_t into RawAddress (2/3)

Test: compilation test
Change-Id: I8b334c77a96ea29d58b1e4cf176e0a941b74d2b9
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ec462d88be2751b9a42adf67123877385562b7d8 25-May-2017 Pavlin Radoslavov <pavlin@google.com> Remove usage of ScopedLocalFrame because it is not needed

ScopedLocalFrame is needed only when we need to reserve a large
number of JNI local references. The local references in the corresponding
code is small (below the default limit of 15).

Furthermore, using ScopedLocalFrame itself can be problematic:
it is excessive (reserves 128 entries out of total 512), and does
not check for errors.

Bug: 37969574
Test: Manual
Change-Id: Ia460fe9dd61ce91c940f64a980ec7256774d2fff
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
7b35d90800e16ce78186c30bb37d4bddcc071e00 18-Apr-2017 Ajay Panicker <apanicke@google.com> Limit btsnoop file size (2/8)

Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Idf4dd2ee10d8b8aecf1066115fbb6a53ce8ea04a
Change-Id: Idf4dd2ee10d8b8aecf1066115fbb6a53ce8ea04a
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
7e7f0be7a03ac9fac07ad9ef47522a237ba36a62 11-Apr-2017 Ajay Panicker <apanicke@google.com> Keep original thread name when attaching JNI thread for easier debugging

Bug: 37244363
Change-Id: I5357492e9b317149b990ec2e3f9e474a20c00945
Test: "adb shell ps -eT | grep bluetooth" before and after patch
testtracker: 83808
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
2116dbf94fbc00da999ac629c78627983f599a26 17-Mar-2017 Andre Eisenbach <eisenbach@google.com> Revert "jni: introduce ScopedBtAddr"

Causes crash on Fugu. Reverting for now until further investigation.

This reverts commit 2b233628767c0bf6ff21ae2acdeada8bea94e583.

Change-Id: I21daf6b75312695d7ccb83ae603aaeffc3c9e770
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
2b233628767c0bf6ff21ae2acdeada8bea94e583 15-Feb-2017 Marie Janssen <jamuraa@google.com> jni: introduce ScopedBtAddr

ScopedBtAddr handles marshalling bt_bdaddr_t into jbyteArrays so we
don't have to. It also complains when it can't allocate things and
deletes the local reference when it goes out of scope.

Test: compiles, sanity tests with various profiles

Change-Id: I78a6364cc5cac0e8664d2d04388a6e2ac4c7a58f
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
479b34835a560d032e211c3c27e10384af69c3b9 11-Oct-2016 Marie Janssen <jamuraa@google.com> jni: use ScopedLocalRef where possible

RAII simplifies code paths and eliminates errors.

Test: mma -j40, sanity testing on devices

Change-Id: I278f91445217c898a868b8328549c080d7123dbb
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
cf27f0ddf906a8f76a22b8a30ff4262526e33477 18-Apr-2014 Hemant Gupta <hemantg@codeaurora.org> HIDD: Add support for HID Device Role

This patch adds support for HID Device Role which enables phone being
used as a Bluetooth keyboad or mouse.

Change-Id: I931867442111ad997a34a166c7b2ec1daf317ddd
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
dbd48b5fbeb449c31c92cbe8565db5e8f74c41e6 06-Dec-2016 Marie Janssen <jamuraa@google.com> JNI: clang-format code

Add clang-format file.
Add PREUPLOAD to check newly uploaded code.

clang-format --style=file jni/*.cpp

Test: mma -j37
Change-Id: I76bc67f7e69ac374f82d6c5d9745657f31dccdae
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ae15d3d42fcb3349c11d394423493020e78c5f43 30-Nov-2016 Marie Janssen <jamuraa@google.com> JNI: style cleanup

Beginning of style cleanup:
- no assigns in conditionals
- move declarations closer to first use
- replace __FUNCTION__ with __func__
- remove unnecessary gotos

Test: mma && manual sanity tests

Change-Id: I7f8fca01dd57f57538b71fe7d7753fffe1de4d00
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
33d233cc3a1be101258f7ab3a11fe186300ddf47 10-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> BLE OOB Pairing - parse address type (3/5)

When address type is not parsed, creating bond to devices not using
random address is impossible.

Bug: 32780409
Test: try pairing with nRF52DK using random address
Change-Id: Ifae63995e5ffb3a5071d0c993a0e15c0b6e8a7eb
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
fe37710d689b7573ddeb901141db42c28b6cab39 12-Oct-2016 Marie Janssen <jamuraa@google.com> jni: Use RAII to manage callback environment

CallbackEnv is a new RAII object which:
- Retrieves the callback environment when instantiated
- Clears exceptions when it goes out of scope
- Centralizes checks that we are in the correct environment

It can be used the same as a pointer to JNIEnv with the -> operator and
the JNIEnv pointer can be retrieved with get();

Test: basic functionality tests
Change-Id: I004f2655e2e02847782fec794faa62da85c85d49
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
67e681e3f67489aae49a118a2a87cd92ad9c2d41 12-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Add LE Secure Connection data parsing (2/4)"
am: 29101f7fd4

Change-Id: I962b635c44d2573a62936ab58bf8577ef19000cc
1d768333363310f093b6249a5f9c70ad1545c136 28-Jul-2016 Jakub Pawlowski <jpawlowski@google.com> Add LE Secure Connection data parsing (2/4)

Bug: 30460956
Change-Id: Ie5c3ad96e7a834c9dc0a6791cf2cd24ecaeb927e
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
6265c0e229c7a5ac9143c100c4d654142043d145 19-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Add guest mode functionality (1/4)" am: fae54a8
am: 35d1580

* commit '35d1580a975dc5e9b3d4a7c987e30eb7ab1763be':
Add guest mode functionality (1/4)

Change-Id: I0d91fba1ca24c0868f6372cd811ba998bed2d190
c63ef51ba5f9d355239959bcfe8803987adb1f38 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/4)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I561225652509b29ac6b0d194a3a50e29c5569365
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
fa0882174bb9479e307b6faea1d1c0f174d38f43 28-Mar-2016 Ajay Panicker <apanicke@google.com> Revert "Add guest mode functionality (1/5)"

This reverts commit 6e2c4a130d93e448decc67991690fd8d1f83a343.

Change-Id: Iae9ecfc53a4e405bc04d21822a79112f7dc63247
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
6e2c4a130d93e448decc67991690fd8d1f83a343 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/5)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I561225652509b29ac6b0d194a3a50e29c5569365
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
a9d5a686f820aedb30b21145bca23fbbcacc3682 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not delete/re-create wakelock on acquisition/release

Also provide additional status for wakelock acquisition/release errors.

Bug: 27721443
Change-Id: Iac544226fed4a73a50bd954e74d96edd4bed93d2
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
00a465ed6160246b369629b6777836a4d1b11834 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not delete/re-create wakelock on acquisition/release

Also provide additional status for wakelock acquisition/release errors.

Bug: 27721443
Change-Id: Iac544226fed4a73a50bd954e74d96edd4bed93d2
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
21f921a43af4c93f23f8d3fd52033c9720200e89 01-Mar-2016 Ajay Panicker <apanicke@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I2f2698a2fb3f7ca7031a803e43a398f59bd32cdb
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c38bcfa40ee1c749a884a8283d30861b6f776c1f 01-Mar-2016 Ajay Panicker <apanicke@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I2f2698a2fb3f7ca7031a803e43a398f59bd32cdb
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
d4a64dd76ad2847a08db3258f0a81ad631f5db26 23-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in packages/apps/Bluetooth

Cherry-pick of https://android-review.googlesource.com/#/c/204513/

Bug: 27301103
Change-Id: I46e0094d8e58c4d3a3ed0401600e7176fb1417c6
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
7b0fee2bccb630e4b9f93ee29f474c7aa89a28f9 23-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I5eec4610f64af4191f64e946122623b6fe222b92
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
db32e0ef467d70961b28913fc86c38cd68f8701e 14-Jan-2016 Andre Eisenbach <eisenbach@google.com> Read Bluetooth interop database entries from settings (2/2)

Interop database entries are stored in the system settings entry
"BluetoothInteropDatabase". The format is a list of entries separated by
";". An entry consists of a BDA fragment, followed by a comma and an
integer representing a feature from interop.h.

Example:
To disable LE secure connections for devices starting with BDA 11:22:33,
use "11:22:33,0".

Bug: 26548845
Change-Id: I5903930178b70d1eb52d64b1c6051ce8ee346da4
(cherry picked from commit 8ecd371d3b90878c211785bae4612d24e06abfca)
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
e1ad2a10ea9d1fbf41441a535192ff7a7379bda2 09-Feb-2016 Ajay Panicker <apanicke@google.com> dumpNative has garbage in args

|args| sometimes has garbage in it which can cause segfaults later on.

Change-Id: Ie754d8066dc591b4d64e922b1ffe93fe131bc68d
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
92b231f0f34f408ee99359873bcafb4563a14d8a 09-Feb-2016 Ajay Panicker <apanicke@google.com> dumpNative has garbage in args

|args| sometimes has garbage in it which can cause segfaults later on.

Change-Id: Ie754d8066dc591b4d64e922b1ffe93fe131bc68d
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
7ecde7c02c3f803cd182fe5c7bef8a410449b50e 29-Dec-2015 Jakub Pawlowski <jpawlowski@google.com> Implement createBondOutOfBand

This patch implements out of band pairing that uses optional data.
Currently it works only for LE transport, using Temporary Key value.
In future fields might be added to OOBData to support other options for
optional data.

Change-Id: I1b4942e656be7b5d1ae5a4bf9d867ffd74753798
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
51e9ef3ca2d4cd93adf79fb98ab829163b286472 12-Jan-2016 Marie Janssen <jamuraa@google.com> Remove IBluetooth.dump(), dumpsys arguments

Move the majority of dumpsys into the AdapterService so we don't need
IBluetooth.dump(), and update the JNI interface for dumpsys arguments.

Change-Id: I481f147d913e0f4e1b85b8e4b027dbc349372ce5
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
407f11ca439f338f84b51e15830446ecd3ae488f 12-Jan-2016 Marie Janssen <jamuraa@google.com> Remove IBluetooth.dump(), dumpsys arguments

Move the majority of dumpsys into the AdapterService so we don't need
IBluetooth.dump(), and update the JNI interface for dumpsys arguments.

Change-Id: I481f147d913e0f4e1b85b8e4b027dbc349372ce5
(cherry picked from commit 48131cd77d2a1fd7d6112eee388a90a1fdbe0c6c)
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
cbe581021ff654f7450d1403d8896f5d1203c8b6 04-Dec-2015 Adam Lesinski <adamlesinski@google.com> Add traffic accounting to Bluetooth App.

Update the Bluetooth app to build against the new Bluetooth HAL,
which expects to be given a calling UID when opening sockets and
expects a callback for energy info that accepts uid_traffic_t data.

Bug:26039657
Change-Id: I23ffbe39041f11706376acfc6aba33ba661a6ef1
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
b488ef885e5690c3f6085ccf35e213e0f7eb7597 04-Dec-2015 Adam Lesinski <adamlesinski@google.com> Add traffic accounting to Bluetooth App.

Update the Bluetooth app to build against the new Bluetooth HAL,
which expects to be given a calling UID when opening sockets and
expects a callback for energy info that accepts uid_traffic_t data.

Bug:26039657
Change-Id: I23ffbe39041f11706376acfc6aba33ba661a6ef1
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
914484bd8562ae75b062a669c89020773c8529b5 29-Dec-2015 Jakub Pawlowski <jpawlowski@google.com> Implement createBondOutOfBand

This patch implements out of band pairing that uses optional data.
Currently it works only for LE transport, using Temporary Key value.
In future fields might be added to OOBData to support other options for
optional data.

Change-Id: I1b4942e656be7b5d1ae5a4bf9d867ffd74753798
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
6eb32d5f7c30f04da45c3da0974bbb63725a0978 29-Jul-2015 Ajay Panicker <apanicke@google.com> Implement Bluetooth settings factory reset (1/5)

Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
244e9c62a85a4b94e21bf1a8dee456e22bc767c4 08-May-2015 Casper Bonde <c.bonde@samsung.com> SAP: Make it possible to enforce a 16-digit pin code (3/5)

This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I42ada9b36d24d43697a2010eccbc0103f15af77d
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
f5f90873574eefe5f50a7b383fcd8fefb961f66c 05-Dec-2014 Andre Eisenbach <eisenbach@google.com> Bluetooth native dumpsys logging support (4/5)

Bug: 18508263
Change-Id: Ib9546ff2cf64d2e085e27e691032749e869e0795
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
5e1d6f595461e27acab14c5c5931d32025c1c18d 15-Apr-2015 Vinit Deshpande <vinitd@google.com> am bbb4110..165d7fa from mirror-m-wireless-internal-release

165d7fa MAP: Errata service release 8 changes
5a60e47 Update to Bluetooth MAP 1.2 (server)
0dcecb2 MAP: fix exception when Email in SMS list request
a8873ca Merge "Handle response to AT+NREC command" into m-wireless-dev
345f1ee Add UUIDs to SDP JNI
d1fadc3 Handle response to AT+NREC command

Change-Id: If24e414fe3fd0c2f47147f2535296b92e8066d76
5a60e47497f21f64e6d79420dc4c56c1907df22a 17-Mar-2015 kschulz <k.schulz@samsung.com> Update to Bluetooth MAP 1.2 (server)

- Change folder name lookup to a map
Replaced the arrays used to convert mailbox ID/msg type to a folder name with a static map.
This is to avoid null pointer exception for unknown values, and to catch any changes in
the ID/type values at compile time in stead of runtime.
Bug-id:16874441
- Added Instance Information support and Extended Event support.
Still missing integration wiht SDP MAP feature bit mask support
- Adding Abstract implementation to support conversations
- added IM account handling, IM type definition, Application paramenters.
- addedgetConversactionList functionality
- added method to strip encoding in headers
- Fixed messagelist showing both email address and name in the name fields.
- Fixed Index out of bounds exception was hit when the subject contained invalid chars.
- Added functionality to support the getConversationListReq
Works for SMS/MMS, Email and IM
For Email/IM it depends on the convoContact table in the contract.
For SMS/MMS it uses the contact number+ name if available in contact database.
- Added new parameters to msgListing also in contract class
- Added Test framework for "near system level" tests
Currently only includes an entry point for single device tests.
- Added support for setOwnerStatus
- Added support for vcard type X-BT-UID
- Introduced type SignedLongLong to handle 128 bit values which needs to be handled as hex-strings.
- Added convocontact notification events for IM
- Added support for IM getMessage
- Added setEventFilter function.
- Added event filtering before enquing an event to be send.
- Added selective observers, depending on the active filter.
- Fixed timestamp to be from seconds to seconds (not from milisec)
- Fixed version number in bMessage if remote featurebit is set for v 1.1
- Added content encoding to QP for text that are not USACII
- Corrected the addresses in to/from for IM messages
- Added btuid and btuci to vcard
- Fixed (some) longlines
- Added extendedData support (empty when sending, just logging when receiving)
- Fixed Email folderName compairison changed to ignore case
- Fixed problem with names containing "null"
- BluetoothMapbMessageMms changed to BluetoothMapbMessageMime
- Fixrf addOriginator in getMessage request
- Add missing subjects in events for SMS
- Don't send ReadStatusChanged when pushing a message
- Temp way of adding names/uci to IM msg listing
- Added messageHandle filtering in msgListing
- Convolisting parameter mask support
- Added support for using handle when filtering in root folder during msgLising
- Added subject to event in sms
- Fixed so attribute_mime_type is only sent when parameter is requested
- Fixed feature bit check to messageListing version
- Fixed leaking cursors
- Added support for database identifier
- Added folder and conversation version counters

Change-Id: I4d2954b795aa7ed2a41dd034384da30f240b518f
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
bbb4110b455b3aa29106d5b4f0a37e1be8e09475 09-Apr-2015 Casper Bonde <c.bonde@samsung.com> Obex over L2CAP + SDP search API

Each profile had its own implementation of ObexTransport.
These implementations were implemented very similar, and
could easily be merged into a common implementation.

Additionally it will make it easier to adopt the transport
to support L2CAP.

The SDP functionality is implemented in a way that is scalable,
hence adding new record types is easy.
Intents are currently used to distribute the SDP search results,
as we have observed that the new client side profiles have been
located outside the Bluetooth package.
We strongly recommend to keep all bluetooth profiles within the
Bluetooth package, to acoid the need for exposing all bluetooth
interfaces through the Android framework. For instance this new
SDP create API is internal to Bluetooth, hence cannot be used by
the external profiles - hence they cannot use OBEX over L2CAP.

The SDP search currently supports:
- MAP both sides
- OPP server (only the server needs an SDP record)
- PBAP server (only the server needs SDP record)

The SDP create record currently supports:
- MAP both sides
- OPP server
- PBAP server
The new l2cap sockets introduces a new wrapper class for a rfcomm
and an l2cap socket.
The wrapper design:
- Creates two accept threads running while bluetooth is
turned on.
- When a connection is accepted the owner is asked wether or not
to accept the connection if rejected, the connection will be
rejected at obex level, else it will be accepted and the state
is changed to busy.
- Any further connections will be rejected at Obex level, until
the state is changed back to idle.

Notes tor executing the test cases:
Test OBEX using local pipes(no BT) or two bluetooth enabled
devices.

Test SDP using two Bluetooth enabled devices

Start server testcase first on one device, then start
the matching client test on the other device.

You cannot run all tests in one go, as they need to run
on multiple devices.

Edit the test sequesce to add/remove/modify the sequence
of OBEX operations to perform.

Use the new SDP record create interface.

Change-Id: I3941793f9843abf4afa5ffbee40d1d01c118b29b
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4 10-Feb-2015 Andre Eisenbach <eisenbach@google.com> am 6c384c59: am c9d93376: am 1e3e1ddf: Add API to check if a Bluetooth connection is encrypted (2/2)

* commit '6c384c5927aa0f02c5bda611fc31225447f710e2':
Add API to check if a Bluetooth connection is encrypted (2/2)
1e3e1ddf939bf71616245e1e100964568053d665 06-Feb-2015 Andre Eisenbach <eisenbach@google.com> Add API to check if a Bluetooth connection is encrypted (2/2)

Bug: 19186961
Change-Id: Ied8dbe60995ebe8759c2a4ce21f373b597ed3afe
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
246cb2cf3d147a9dd08cdbd61b8205b223a61b88 02-Sep-2014 Andre Eisenbach <eisenbach@google.com> am 199e7aed: am c344eafe: am 717be4e8: Protect against Bluetooth share crash because of invalid timer callback

* commit '199e7aed313b5e73575bd2c7ddfc3e565cdd0300':
Protect against Bluetooth share crash because of invalid timer callback
717be4e8209e4c24d8a1e395f65f86aee5bb0e69 29-Aug-2014 Andre Eisenbach <eisenbach@google.com> Protect against Bluetooth share crash because of invalid timer callback

If the timer callback is not set when fired, a SIGSEGV will ensue. This
patch checks to make sure the callback is set before invoking the
function.

Bug: 17307367
Change-Id: I2ee284bdbd3b54a368e373d9ac9e6e47205dcff6
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
87d397c0bd4c50cc1aeaccab79aa98915c8fb5a6 05-Aug-2014 Andre Eisenbach <eisenbach@google.com> am 07fb5f59: am 777e88d2: am f021c4ee: Merge "Add transport parameter to createBond() function (3/4)" into lmp-dev

* commit '07fb5f5902e8915b266d80475d05b6709fba06df':
Add transport parameter to createBond() function (3/4)
db681f3973bd8a088a878fd6f41d4330cdbc5522 05-Aug-2014 Andre Eisenbach <eisenbach@google.com> Add transport parameter to createBond() function (3/4)

Change-Id: Id3c59bcc8f9efb20fffdebaff34d6b2593f5e5ca
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
09461fb2aee9f696993e37e8d2f88d3aeb0ae4f6 23-Jul-2014 Prerepa Viswanadham <dham@google.com> am 660d03dc: am 2e54dbb8: am d981566d: Bug 15564216: Report Bluetooth tx/rx/idle activity info and energy reporting

* commit '660d03dcd6030c004043f7d05622cc6d3d17a6e6':
Bug 15564216: Report Bluetooth tx/rx/idle activity info and energy reporting
3e63bd6ed06a75bbeeaccd993cd87f96ee44ab62 23-Jul-2014 Prerepa Viswanadham <dham@google.com> am 3b85012a: am 0f3a6438: am f6eff2b7: LE energy info feature

* commit '3b85012a489f5166bf455023e12c1a332c609909':
LE energy info feature
d981566d5912bfd66fc265508e5b0c43dce76f82 23-Jul-2014 Prerepa Viswanadham <dham@google.com> Bug 15564216: Report Bluetooth tx/rx/idle activity info and energy reporting

Change-Id: Icff519c6e91d7a9a2fb5bd462daddb6a79f9bb46
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
f6eff2b71e9bc206f995e847e384507fb1c3e239 19-Jul-2014 Prerepa Viswanadham <dham@google.com> LE energy info feature

Java and JNI changes for energy info feature

Change-Id: Ifdc7b7253aea8c610b2dac90f2b3f525b5e2d73f
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
a1758429e0a21c28214b804c1e70c78c4550cb3d 14-Jul-2014 Matthew Xie <mattx@google.com> am 8812b408: Resolved Bluetooth enabling bug in JNI

* commit '8812b408f52e55394195c4827eb587a610b054c9':
Resolved Bluetooth enabling bug in JNI
8812b408f52e55394195c4827eb587a610b054c9 05-Jun-2014 Matthew Xie <mattx@google.com> Resolved Bluetooth enabling bug in JNI

Modified the Adapter service JNI to treat BT_STATUS_DONE
as success event and pass the success status to java layer.

Change-Id: Iebb95820d263027376c2a1a0372ae7800e77872e
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
beccdc6d1647c56c91ddfd14f7990371168fb870 03-Jul-2014 Sharvil Nanavati <sharvil@google.com> Specify a thead name when attaching a bluedroid thread to ART.

Change-Id: I0c9804d7ed1ff64cb155902f91bc5b52e981458c
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
2c0df0560ad5ae3fd6022b17b17a6a70143e216a 16-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Support MAP Client role on Bluedroid.

Implementation changes to support Message Access Profile
client role in Bluetooth Apk.

Change-Id: I209909a2b18e43c7931571526b983453795f6c6b
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
1ebce7fb88348be7b984b1a778bd1bbeea20d6d7 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
3636f3319fc403e3bf995b6de71dc5e3f2864661 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
066ad9e16a548218b139424f758b92db7af34af2 06-Jun-2014 Mike Lockwood <lockwood@google.com> Move AVRCP Controller support to new BluetoothAvrcpController profile

Change-Id: I865f77c85d971bf06dbc0643722abad7f6b94ab9
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c030f08f419d596c4aa216c9cca9867e7b5486f0 07-Jun-2014 Mike Lockwood <lockwood@google.com> A2DP Sink: Add support for BluetoothA2dpSink profile

Change-Id: If2c1b9b919c90e65a3808c9a55b554c0e899a9c2
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
aebc726105204f8a7b977eb3556c14b5ba18a5ca 19-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Add support for HFP Client role.

Implementation changes in Bluetooth App to support
HFP Client role.

Change-Id: I795f475c6a1548fd7cc68d0a02b22f30cf5a182b
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
1e9f8a14e120e8786711abdd4a965236191c87ad 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
b824e2624524d039b12ce3b7de2747ff558bfe94 06-Jun-2014 Mike Lockwood <lockwood@google.com> Move AVRCP Controller support to new BluetoothAvrcpController profile

Change-Id: I865f77c85d971bf06dbc0643722abad7f6b94ab9
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
9ebf7624eb97e76d34ceceebf4ab1558d73df246 07-Jun-2014 Mike Lockwood <lockwood@google.com> A2DP Sink: Add support for BluetoothA2dpSink profile

Change-Id: If2c1b9b919c90e65a3808c9a55b554c0e899a9c2
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c453f0f533556d8ffbb7a87ca09d6b30e259978e 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
8799f44e07ff7cde70a8d58893e995d3a9fa1e76 28-May-2014 Matthew Xie <mattx@google.com> Change error message to verbose to avoid spamming

bug 15116703

Change-Id: Ia03253f37a273d3942a197d5a6ab1398ef7935fa
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
709ec52d8053ccbdc00ccf463d35f1f6b91fa41a 19-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> [4/4] Bluetooth: Add support for HFP Client role.

Implementation changes in Bluetooth App to support
HFP Client role.

Change-Id: I795f475c6a1548fd7cc68d0a02b22f30cf5a182b
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
dc8c533e030e6b8625da3dc75c8f768a3242fe16 11-Sep-2013 Ruben Brunk <rubenbrunk@google.com> Remove dependency on JNIHelp header side effects.

Bug: 10680559
Change-Id: If5c6e22dd89a41886bb72303a85ca674c60d1946
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
9d80b509f715a3c3f2ebd0de373d427fc31a6e6c 11-Jun-2013 Zhihai Xu <zhihaixu@google.com> Add debug menu to enable btsnoop

bug: 8059358
Change-Id: I2947b2b77955238410e2620489c2e0407ad8ae7b
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
3cedf3d57aff20e1876a5b450f41b05e975cb8e0 24-May-2013 Matthew Xie <mattx@google.com> Fix rssi handling as one of property change event

The rssi is encoded in one byte as int8_t in the stack.
JNI code copied in high byte without proper masking.
The converting is not needed. I am removing the uncessary converting.
bug 9110215

Change-Id: I50628b3a3c0bcf4a33775c6b62e9febd35bdc78d
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ad9fff218081d2f49471487d37387c764d69ed29 24-Apr-2013 YK Jeffrey Chao <jechao@broadcom.com> Preload timeout and retry mechanism (2/3)

If the Preload process was stuck due to unknown hardware init failure,
a 8-second ENABLE_TIMEOUT timeout would be eventually expired in Java layer
at AdapterState and attempted to set BT state back to STATE_OFF.
However BluetoothManagerService did not handle this case accordingly and led
to state mis-matching between Java layer and BTIF at the end.

Add the processing logic in AdapterState to handle the case when an explicit
STATE_OFF notification from BTIF was received in the TurningOn Pending state.

bug 7566317

Change-Id: I29c379cd453d05297ed382a5e8f862fa7d0f8881
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c1c259c0ace7195240f1443c805995bfe8692a72 14-Mar-2013 Zhihai Xu <zhihaixu@google.com> framework support for new Bluetooth profiles AVRCP 1.3:Metadata and play status

send track changed response if the metadata is changed.

issue 8383522

Change-Id: Ie55ed368d355484a6b83f4aa24c70aa33b72f799
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
b241cda1eec2fbefd6d21e0819532f7a76947635 12-Mar-2013 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of c508483d to jb-mr2-dev

Change-Id: I7f32e6dd98c3cc61030cded700587aa852c0fc0a
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
03b8386de26ba6500af2d66687bff9b01f2cbbd7 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9579b3074bc4bc59dd45f71c0937e8879196555e
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ede67c26e7b2564ea35db6d9b3027a269c150e13 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I338fd87083387706f3b5f410c9592219bb8a1acb
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c55a9837c004044051b71bb47182ace156691283 07-Apr-2012 Matthew Xie <mattx@google.com> replace logx with alogx

Change-Id: Iec82cb4545bb26a8aa55dc7d473247396b9fd6e1

Conflicts:

jni/com_android_bluetooth_hid.cpp
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
e469f16e5a7d99471d7db1b216d422e8d12cc4cf 06-Jun-2012 Matthew Xie <mattx@google.com> matt: my fix to get it compile, change logx to alogx, and etc

Change-Id: I0b361ad6ba9a5f6ac4db9203a389ee309b04019a
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
01a8cf98f070a6996b2e8974edc229ac402f3f0c 03-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Added ACL connect/disconnect state callbacks

Change-Id: Ibd44de8601521a11b106711ccad9261fb40beca8
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
b5cc776c9353a203cdde97e62b25f05d9633d14c 19-Apr-2012 fredc <fredc@broadcom.com> Fixed BT on/off issue

Change-Id: I47cbac9fc694d5604a664f20170eeed90eeee8e6

Conflicts:

jni/com_android_bluetooth_btservice_AdapterService.cpp
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
6654f5c903de510a70f9e72cd5ad7837b615d93f 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: I65e1c18e2899cea0a1e5c0102c4d24d39dce0249

Conflicts:

jni/com_android_bluetooth_hdp.cpp
jni/com_android_bluetooth_hid.cpp

Conflicts:

jni/com_android_bluetooth_hid.cpp
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
edb14a4944d66ca9255b2ab9b384c583b626fd94 11-Apr-2012 Syed Ibrahim M <syedibra@broadcom.com> Fix for memory leak in AdapterSertvice.cpp : The native jobjectArray and jintArray instances are being declared and de-referenced in adapter_properties_callback() and remote_device_properties_callback() methods but is being initialized in get_properties() method. Becasuse of this, when the get_properties() method returns, VM looses reference to the native instances and hence leading to memory leak.

Change-Id: I48944887903a492a40cb95f5f79a56b9d58f85fa
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
d570893c5ec3bc9fd1860aa0355c550d3a51f8dd 09-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Improve BT enable/disable stability under stress tests

Change-Id: Ie6323a225b5e1ccd1ad9f65e90b144c93b957a8b
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
c55ac7d42cf2d78c7edc67abf6c66813245b2c93 06-Apr-2012 fredc <fredc@broadcom.com> Added support for BluetoothDevice.fetchUuidsWithSdp()

Change-Id: Icd260b0cafd7fee72a7ad0275b62052257c6fc13
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
cc80b2261351dc74ad1bed237b0423c12d340514 14-Mar-2012 Matthew Xie <mattx@google.com> initial check in of rfcomm socket implementation Author: Zhenye Zhu, Matthew Xie

Change-Id: Ie3ab12c3bafc0a44e378a31c426c5eb41192f154
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
676cb1bdd1c14c7af56562bab51f168e7f8f6d62 23-Mar-2012 Matthew Xie <mattx@google.com> Initial implementation of hdp service and jni

Change-Id: Ieca906080835098383cabbc13fa914363459f555
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
f8d98da947bbb9e2380a60df89acbcbd4ca680af 03-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Fixed incorrect handling of the RSSI during inquiry which causes the devices to not get sorted properly.

Change-Id: Ib4eca5405a3393aef79f43943853adf76da23e76
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
35207a5638f61caca5b9abb31e5c6850a9478a52 22-Mar-2012 Matthew Xie <mattx@google.com> initial implementation of hid service and jni

Change-Id: I527651bd85ad3adddbf4b89802f4a6128c9fa047
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
6c91bc0a163cc7600c40d7fb979777fd911d1ef1 17-Feb-2012 Matthew Xie <mattx@google.com> Initial implementation of HFP and A2DP profile/service/statemachine.

Change-Id: Ic6e6d358b94313f237b7be61b70dcc6f4f7902e7
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
581bb31a8165ff0f9c7d638cfe4a81aaaafa2ded 06-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Remove passkey callback.

Use ssp callback for all 3 forms of 2.1 pairing.

Change-Id: I13af1eecc3469e4db8e656717700a1f9166177e3
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
61c4100eb0606f8ba630f5c45d07a88d612fbc85 29-Feb-2012 Matthew Xie <mattx@google.com> Correct the length of bd_address setting.

The length of name was used to set address. This caused a index out
bound exception in pinReqestCallback.

Change-Id: Ia152f370470f14f9770d734ca7572ec8e8c5b8b3
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ff68148a7fb74947ea5e7a337161108363cbe9f5 21-Feb-2012 Jaikumar Ganesh <jaikumar@google.com> Fix Bluetooth enable issue.

The stack sends all the property changes,
before sending enable. Hence, we don't need to
wait anymore.

Also fix the return value check for get_property.

Change-Id: Icac32cd74f9028c40ab6b5018b576168c9dac3b9
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp
ff4f17bf64978d0738c66e1b6dd70be8664efc24 20-Dec-2011 Jaikumar Ganesh <jaikumar@google.com> Initial commit for new Bluetooth stack interface.

1. Changes to Android.mk file
2. changes to make the process persistent. This is temporary.
3. Addition of new java and jni classes.

Change-Id: I2453c7a1a475c66bf52f3a84cd8beb12dd37b87a
/packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp