History log of /frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2992cd084cd5cfd9ef253c37ef269d6c75e7e144 23-Aug-2017 Jack He <siyuanh@google.com> Fix checkstyle errors (2/2)

* Manual style corrections with IDE assistance
* Variable name refactors are done through IDE
* Corrected general style errors such as:
- "final private var" -> "private final var"
- "&&", "+", "||" should not be at the end of line
- Non-static private variable should be like "mVar"
- Private static variable should be like "sVar"
- Code file should always end with newline
- Inherited methods should be annotated with @Override
and no @hide tags
- Public methods should always have a JavaDoc entry
- "int[] array" is preferred over "int array[]"
- private methods should be accessed without "this."
when there is no name collisions.
- "boolean ? true : false" -> boolean
- "boolean ? false : true" -> !boolean
- "boolean == true" OR "boolean != false" -> boolean
- "boolean != true" OR "boolean == false" -> !boolean

Bug: 63596319
Test: make checkbuild, no functional changes
Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
a355e5efaf45a534ee6437aa4bae7d30f18c0ec2 23-Aug-2017 Jack He <siyuanh@google.com> Fix checkstyle errors (1/2)

* Automatic style corrections through IDE

Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
b7cbb2fe49c5d5535924c4ba255d92ba57a4c3c6 18-Aug-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Bluetooth: Don't throw exception when stopAdvertisingSet fails"
f73863dc29c5adc70117649d24f9b65f6b3232be 17-Aug-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth: Don't throw exception when stopAdvertisingSet fails

When advertising is stopped while Bluetooth is disabled, we should not
throw any exceptions, just log the failure.
This was the default behaviour before the AdvertisingSet was introduced.

Bug: 63819108
Test: manual
Change-Id: I518e071b77b127973aee6f24fa6ced4f28bc9531
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
f7bd6b26c73b7ea0bbfd00b75c23895eca281aff 17-Aug-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth: Fix startAdvertisingSet error handling

Calls to old advertising API (startAdvertising), should never throw
exceptions. Instead, it used to post failure callback. This behaviour
was accidentally modified when implementing new API. Right now, instead
of posting error callback, we throw IllegalArgumentException if we fail
to obtain BluetoothGatt object, or the call to startAdvertisingSet
fails.

This patch brings back the old behaviour to the API. It also makes new
API post callback instead of throwing exception in this error case.

Bug: 63819108
Test: manual
Change-Id: I897b99839f899ca3f3dc609918d665c8c327b777
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
2489b415ff8ec87a4c89f4b16e8d7b2901cd6b3d 14-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Remove legacy advertiser from map after it's no longer used

Test: manual
Bug: 62597369
Change-Id: Ief1e1b054f29b59b1ed72514b138d4f209f9847a
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
89e10d3eb4a4728ffdb5a5eba76d772d28bcb855 19-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Get rid of the IAdvertiserCallabck

Bug: 30622771
Test: none
Change-Id: I2c55f96e71cd3be67f88201ab07c91730cd85971
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
4bc4a441007e0a9ef6ccd1816c831ffd2dfa4c18 19-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Expose LE advertiser address for easier PTS tests (1/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: Iaf0f2fe0613de44b8430ac25e691d66a4ad44f8d
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
9e377194e35c0fb9ac5771f5658c095ed97e0838 12-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 PHY simplification

Having PHY_LE_* constants defined in four different places, with one
value being different than others is misleading. Leave just PHY_LE_*
definitions in BluetoothDevice, and add PHY_LE*_MASK for the mask used
in PHY update API.

This patch also removes need to translate PHY value between PHY update
request and event, as mask is used for request, and the value is
returned in event.

Bug: 30622771
Test: manual
Change-Id: I897effa1204a024465d55501c83c542566c4d37c
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
e6c453d828fec3df82708d2b0c3bb00bd0a0dbf8 10-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Remove enable from PeriodicAdvertisingPariameters (1/2)

Instead of setting enable to true, one can just pass null
PeriodicAdvertisingParameters and achieve same result when starting the
set.
Passing the "enable" when updating the parameters make no sense, and
might be confusing.
Experience with "timeout" field, which was a part of AdvertiseSettings
show that merging fields that go into different HCI commands can cause
problems during processing, so keep enable as separate field.

Test: manual
Bug: 30622771
Change-Id: Ida02c59eb8433537179b4d22202fe745f8b4bb3e
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
5a355610fe6ac0460f7130375de97b4d7bae7ba4 31-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 advertising duration refactoring (4/4)

Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
f4ed33f5fa6ffa3bda6faff773a3fb90b16a760c 30-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth LE Advertising minor improvements

This patch adds some additional error checking for the advertising set
parameters, and some more comments.

Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
72e9e9f81504559ca18b71358203b1b39d9f0581 01-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Fix advertise data size estimation

UUID in service data field can be 2, 4, or 16 bytes long.

Test: manual
Bug: 36553478
Change-Id: Ib5ba2d16065496ca311e8642a15a7ea6bc84d4c1
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
7998be9e44f7797a96fb0a2568b95581ebccc1d0 22-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 Enable->Enabled (1/2)

Test: manual
Bug: 30622771
Change-Id: I37b198927076a0267de67e1bd94eaea9e88e53bb
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
d12b5688f06b0f3428730262cf208713442f6f5b 20-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Add setScannable to AdvertisingSetParameters (1/2)

There must be a proper way to specify if advertisment is scannable, when
updating the parameters.

Test: manual
Bug: 30622771
Change-Id: Ie520609d3fff07ccc2960015c19311d773842852
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
bcf671b7ebec19c89c18cadbf6187786c121f29d 21-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Add missing txPower parameter

Test: manual
Bug: 30622771
Change-Id: Iaf3111d7545f9bb046b5a23b680347a75125ca7e
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
6a55da90184fcc6e8f4bb9ebb01662b4925f6094 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 AdvertisingSet implementation (1/4)

Test: manual
Bug: 30622771
Change-Id: Ia89718c0c2ab2eaa71b158ecdcae989af907769f
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
adbf2eef2fda68a5c3acc78a67e5dda00d8a14d7 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 move timeout parameter (1/2)

Timeout is not a parameter, it is a property of enabling the
advertising. Move it into more proper place.

Test: manual
Bug: 30622771
Change-Id: I09ebc6c770bc02938ea16a9738a7e03dc8006fde
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
5f00f173fb2da2622803029e69ff85f932e9020b 15-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 AdvertisingSet implementation (1/4)

This patch wires up fist methods of AdvertisingSet, making it possible
to start advertising and stop advertising. It also replaces legacy
implemementation with calls to new implementation.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I80a4b1b2b632d5ef8a80d958615897684cfa0c16
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
a9d1a32e5e51ebc3c141370c9d5045c6c938aaf9 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 Advertising API

Test: manual
Bug: 30622771
Change-Id: Id6856e6110872ec50ff1af54ddc75c0104a6459c
(cherry picked from commit 5324a14cf490656269ef862d7f8f6b139a21c0e6)
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
76f517a173f79ad5789810188c4c36d3238b6f66 22-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Bluetooth: report proper advertiser status on error

When advertiser is not started because too many advertisers are
registered, return proper error code.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I57384ff30132e9a7ee17dcf191ff89baa7abf1ef
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
3d83b0e90bfa0d993c8624fc3032249025d6f269 04-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Bluetooth: advertising improvements

This patch removes isPeripheralModeSupported(), hidden public method
which is always returning true. It also modify the BluetoothLeAdvertiser
to be able to use advertising instance with instance id equal 0.

Bug: 30622771
Bug: 24099160
Change-Id: Id31582621dbe56d5c3a8d4ee5cd296af66a5f026
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
1b49e6eb04f2eef4d8056e7447d8e0789c291847 26-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Separate LE scanner from GATT client (1/4)

Right now, LE scanning functionality is combined with the GATT client.
This is the source of various bugs, like scans suddenly stoppinging when
a GATT client is killed. It also increases memory consumption, because
we associate many structures with a GATT client, which are not necessary
when just scanning.

Test: sl4a BleScanApiTest ConcurrentBleScanTest
Change-Id: I0c25bd4a58bb430eb0ee4100d5f2bbab194f9621
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
a480f7fe28ef059b82491f52dcc69934322ee5e2 05-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Separate advertiser from GATT client (1/4)

Bug: 30622771
Change-Id: I08c0498f8a1ea04423d3e864e9a60c7c78f1dbad
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
02bc0086071b5faff260566b4d3713861703eee3 10-Nov-2015 Wei Wang <weiwa@google.com> Properly handle registration timeout in BLE.

Bug:25384098
Change-Id: I7877f6368c4982fcd91e68810c4da0ab7b5fc6b7
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
cd62b10bd612e0c49083cc03f4ac63376a52fe8c 25-Jun-2015 Jerome Poichet <jpoichet@google.com> Preventing leak

When transitioning from ON to OFF with LE Advertisers, advertiser do not
get a chance to unregister themselves as the stopAdvertising checks the
state of the stack and throws before unregistering the object.

It will then never remove the callback objects causing a leak.

b/22092678 | Remote service crash after switching to restricted profile

Change-Id: I04817026a524d10d60abdd8b533554a71a0112e2
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
e77adabeafa16f9b401a6ad67405205bd96f2219 16-Jan-2015 Prerepa Viswanadham <dham@google.com> Don't compute flags length for scan response

Bug 19041626

Change-Id: I7d8aa12e133477fc60d12b474f57313961021975
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
29230ceab9ea7b6913f0a898411b213f199e18c2 13-Nov-2014 Tom Turney <tturney@google.com> Feature request: Increasing advertise data size on
non-connectable adv.
When the advertisement is non-connectable, give back the
bytes to the advertiser where the adv flags would have been.
This increases the non-connectable advertisement's advertise
data from 24 to 27 bytes.

Bug:18359570
Change-Id: Ia3cc48dca50cc3c51095ee92a489f143f6d350b1
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
35cd4c853f748e295352bda708b26ee39544d06d 26-Sep-2014 Wei Wang <weiwa@google.com> Add support of advertising through standard instance.(1/4)

Use config overlay to check whether peripheral mode is supported.

Bug: 17552672
Change-Id: I1081bc84da9fe033426f82ece2ec74c2d663e3aa
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
833559d9f3f0bd6ddb1cf9c1571975751830e045 29-Aug-2014 Wei Wang <weiwa@google.com> Unregister app when advertise failed after registration.

Also moved bluetooth state check to common utils class.

Bug:17364837
Change-Id: I25ff7afae723d47f701236d5a68eab8015de9bbb
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
9a974be631a3ff2e7e754f79167eb024ee55925e 19-Aug-2014 Wei Wang <weiwa@google.com> Fix threading issue for advertising.

Post callback to main thread to execute. In general we should avoid
running app's callback method from binder thread as the callback method
may block.
Also removed callback from advertisers on stop advertising callback.
This fixes the issue of not being able to restart adv for limited
advertising.

Bug: 17045567

Change-Id: I56cd2bdf4b1ad120a0358fa4065ad77be4bff144
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
ee80922c6a1228886589dcd4598a1cadf0bd1ff8 13-Aug-2014 Wei Wang <weiwa@google.com> Clean up advertise and scan clients upon bluetooth down.

Fixes b/16528460

This allows Advertiser and Scanner to be reused after bluetooth recycle,
which follows same behavior for BluetoothAdapter.

Also prints manufacturer data array for ScanRecord.

Change-Id: I78bca40ac294433782a054bf2a00a775dac02d96
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
e0d4afb2d4caecb264852a35f6e3cfc1248e08c4 30-Jul-2014 Wei Wang <weiwa@google.com> Add a default impelementation of IBluetoothGattCallback(1/2).

Also cleaned up a few TODOs and fixed bug.
b/16410260 AdvertiseCallback null onSuccess callback

Change-Id: I75a582c03be1e2ef6964c2cbeba42aaaf9f9e17c
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
6bf513d32db7fbc157681bd642e12a201cf20a89 01-Aug-2014 Wei Wang <weiwa@google.com> Revert "Revert "Service data and manufacturer data can be repeated fields.""

This reverts commit 14c797702543bb5ced989565d90abcfa55c7db46.
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
67c01a4b6d890212fb4647973a627e25a3a9788b 01-Aug-2014 Sungsoo Lim <sungsoo@google.com> Revert "Service data and manufacturer data can be repeated fields."

This reverts commit 26dc9b99b17ca9d8ce3632c48e8b6c1450ee53e9.

Change-Id: I1846d0a6491c5b2ba5905411bd98f5d17909b705
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
3f7a39063ab7b3d7a38b773449ba2b37674e3458 29-Jul-2014 Wei Wang <weiwa@google.com> Service data and manufacturer data can be repeated fields.

b/16635899

Change-Id: I73f1f4effd3f0e38cd427297eb9d22f3ba285d61
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
f6b3d8ca364f3008730741258ceb07c7039a5528 29-Jul-2014 Prerepa Viswanadham <dham@google.com> Fix crash in Stopping/Starting BLE advertising after
BluetoothAdapter cycling

Bug 16528460
Change-Id: Iad852bc93d307c5ca5f7e42f24248aa02c105e8a
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
0e81ca25432b3606eba841206b7a4a6ed74bd54b 24-Jul-2014 Wei Wang <weiwa@google.com> Move AdvertiseData length check to BluetoothAdvertiser.

This will keep AdvertiseData simple and avoid coupling with
BluetoothAdapter.

Change-Id: I3609652bdea1c6e757bac7d2dada7f8ddf20a5e3
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
685c1758902a42a7beb030d8bbaed3f7ce6f6135 17-Jul-2014 Wei Wang <weiwa@google.com> More API modification of BLE APIs (1/2).

Changed include:

1) Add serviceDataUuid to filter so it matches sanRecord and
AdvertiseData.
2) Add raw bytes to ScanRecord and make ScanResult take a ScanRecord
instead of raw bytes.
3) Change from setServiceUuid(List) to addServiceUuid(ParcelUuid).
4) Added include device name
5) Removed service not registered and added ADVERTISE_DATA_TOO_LARGE.
6) Fixed a few comments.

Change-Id: Ibbe07183b1293835c4a84728d1cd2d61e5d627d3
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
890b46a0d5c220bffedcf27520befb34bf8830ea 11-Jul-2014 Wei Wang <weiwa@google.com> Remove MR2 BLE Advertising hidden API from L codebase (1/2).

Change-Id: I78bb8b89de56bddb7422da1d1d4468c88a68ea11
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
af74e66e29a518157cb78fcef4b4fc532b7f60b0 09-Jul-2014 Wei Wang <weiwa@google.com> Unhide Bluetooth batch APIs. Deprecate BluetoothAdpater scan APIs. (1/2)

Change-Id: Ib0c4ea6c8372a15473269660355fb5ccf4284457
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
8f2e74cac282afa0bcf98f5d7131268147d12efe 09-Jul-2014 Prerepa Viswanadham <dham@google.com> OnFound and Onlost callback integration

Change-Id: I23473b18484f041c4dd808c85bb92545a77e20c2
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
8e5270fdf5639461d67e9a898a85520abac6053d 09-Jul-2014 Prerepa Viswanadham <dham@google.com> Tie in BLE hw capabilities with api invocation and support.

Change-Id: Ic1f0b3f156cf2fdde8f04b5c4384e4fd3d79623a
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
9fb1791e1a6859bfb14006a6d101cdecc88f3f95 02-Jul-2014 Wei Wang <weiwa@google.com> Implement batch scan API

Change-Id: Ibb527280a221fbdd0fc6b805a7527c29079294b4
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
dadefdad8ef424991feb45f02f923a2f8224285b 28-Mar-2014 Andre Eisenbach <andre@broadcom.com> LE: Add notification sent and congestion callbacks (3/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Also made server callbacks "oneway" in the AIDL definition file.

Change-Id: I7fa3324712205c79efce58e5e3df8b80a265a442
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
6d81118032b92caa0f5cfebe11af02a98f819d5e 22-May-2014 Wei Wang <weiwa@google.com> Address API review comments.
1. Moved le stuff to it's subpackage. Remove BluetoothLe for all classes
except *Scanner, *ScanSetting, *Advertiser and *AdvertiseSettings.
2. Make all callbacks abstract classes instead of interfaces.
3. Moved AdvertisementData and ScanRecord out and removed
AdvertiseBaseData
4. Removed newBuild and use new Builder for all builders.
5. Using setxxx in builders.
6. Misc other changes.

Fixes b/15140940

Change-Id: I32ae3d24a9491baf96048040b5ac78f6f731e468
NO_SQ: multi-project submit
/frameworks/base/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java