summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-04-19 07:03:14 -0700
committerJakub Pawlowski <jpawlowski@google.com>2017-04-27 12:55:46 -0700
commit43346aad0191ca95ddec6fadaea0fd70be53f380 (patch)
tree840da2abd9f75cc3e103a1597ce38cd5c6bc047f
parent1fb9687349e300f7c390e81d72c9363d712fb345 (diff)
downloadlibhardware-43346aad0191ca95ddec6fadaea0fd70be53f380.tar.gz
Expose LE advertiser address for easier PTS tests (3/6)
This patchset adds a hidden method getOwnAddress, that lets app with BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done exclusively for PTS tests. Bug: 35147497 Test: manual Change-Id: I39a6395d589d0ea801fd771bf3313ed6212a6349 (cherry picked from commit 788847a61ac6281212714e831e3aeb217f024973)
-rw-r--r--include/hardware/ble_advertiser.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hardware/ble_advertiser.h b/include/hardware/ble_advertiser.h
index 8abca00a..02d553f2 100644
--- a/include/hardware/ble_advertiser.h
+++ b/include/hardware/ble_advertiser.h
@@ -57,6 +57,9 @@ class BleAdvertiserInterface {
/** Registers an advertiser with the stack */
virtual void RegisterAdvertiser(IdStatusCallback) = 0;
+ using GetAddressCallback = base::Callback<void(uint8_t /* address_type*/, bt_bdaddr_t /*address*/)>;
+ virtual void GetOwnAddress(uint8_t advertiser_id, GetAddressCallback cb) = 0;
+
/* Set the parameters as per spec, user manual specified values */
virtual void SetParameters(uint8_t advertiser_id, AdvertiseParameters params,
ParametersCallback cb) = 0;