This fixes potential NPEs that happen on methods that access
mService after checking nullness, i.e. getConnectedDevices.
Bug: 29514788
Change-Id: Ic97054fd5a3563a374c0e863fb116c52535a6509
While loop exits too early and misses writing remaining bytes.
Also restructured the loop itself to be more readable.
Change-Id: I71e9b331d20b5ae70175450c3346be43ab56c40c
This will restart the BT stack when it detects a transition
into OFF state while the user enable flag (mEnable) is set.
Bug: 29363429
Change-Id: I9839119b34c4694ad92e96240c6989008b2f8d52
-> Android Framework changes to add support for
an API to send indicator change in AG.
-> Added a system intent for broadcasting assigned number(ID)
of the supported HF indicators and their values (if received)
Bug: 19983867
Change-Id: If26a7ae5da5686da72ebca9ec3decfe086e2ffb6
Use BluetoothAdapter#getState() instead of
BluetoothAdapter#isEnabled() when checking if Bluetooth has turned
off, as isEnabled() is set to false early in the shutdown process
and getState() provides a better indication of the state of BT.
Bug: 27354612
Change-Id: Ic7828f0726491d49c9a14ba5d654b24f66743662
* Removed "synchronized" statements that are not needed
* Replaced "synchronized" statements with Read/Write lock as
appropriate. The lock protects the access to and the setting of
BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and
associated state.
Bug: 28734075
Bug: 28799467
Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4
(cherry picked from commit eb50a39e98)
* Removed "synchronized" statements that are not needed
* Replaced "synchronized" statements with Read/Write lock as
appropriate. The lock protects the access to and the setting of
BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and
associated state.
Bug: 28734075
Bug: 28799467
Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4
As pointed out here:
https://code.google.com/p/android/issues/detail?id=69834
registerApp() causes onClientRegistered() to happen before autoConnect
is set. This patch fixes that.
Bug: 28861330
Change-Id: Ie1174c0f224f5084178439420b383164d22d542c
As pointed out here:
https://code.google.com/p/android/issues/detail?id=69834
registerApp() causes onClientRegistered() to happen before autoConnect
is set. This patch fixes that.
Bug: 28861330
Change-Id: Ie1174c0f224f5084178439420b383164d22d542c
Default writeType for GATT characteristic was not being
serialized into Parcel. This cause errors when trying to
write into Characteristic.
Bug: 27910548
Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33
Instead of making multiple calls into the Bluetooth service,
make one call that can timeout. This helps prevent cases
when the Bluetooth process hangs and the system_server is calling into
it and causes a WATCHDOG restart.
Bug:28658141
Change-Id: I37778b7b6e508be420a21bdf23593ae89b38f5b8
Calling Objects.hash with a byte[] will call the identity hashCode on
the byte[] and this doesn't agree with the use of Objects.deepEquals
in equals.
Bug caught by error prone.
Also, replaced usage of Objects.deepEquals(mServiceDataUuid, ...) with
Objects.equals(mServiceDataUuid, ...), because mServiceDataUuid
is an Object of type ParcelUuid.
Bug: 28585195
Change-Id: Id92734874339985fedafe1a28286a6a4dcd88d3b
Calling Objects.hash with a byte[] will call the identity hashCode on
the byte[] and this doesn't agree with the use of Objects.deepEquals
in equals.
Bug caught by error prone.
Also, replaced usage of Objects.deepEquals(mServiceDataUuid, ...) with
Objects.equals(mServiceDataUuid, ...), because mServiceDataUuid
is an Object of type ParcelUuid.
Bug: 28585195
Change-Id: Id92734874339985fedafe1a28286a6a4dcd88d3b
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.
This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.
Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
Default writeType for GATT characteristic was not being
serialized into Parcel. This cause errors when trying to
write into Characteristic.
Bug: 27910548
Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used used
for this sub-procedure".
Change-Id: I86e4e1d3a8bfd7d78dfed8419f8abd2d7e89b2bc
Add content to Settings and SettingsLib to add a checkbox for PBAP
client profile, and remove the box for PBAP server profile when the
client profile is enabled.
Bug: 27642222
Change-Id: I125559904a8e017a01ae90b1f6425129a87cbee3
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used used
for this sub-procedure".
Change-Id: I86e4e1d3a8bfd7d78dfed8419f8abd2d7e89b2bc
Right now we pass all services, characteristics and descriptors one by one.
This patch changes that - now we pass whole GATT database at once.
Bug: 27455533
Change-Id: Ie42cd80072538e411904b9c9b011a978f26158b9
Right now we pass all services, characteristics and descriptors one by one.
This patch changes that - now we pass whole GATT database at once.
Bug: 27455533
Change-Id: Ie42cd80072538e411904b9c9b011a978f26158b9