OSDN Git Service

android-x86/system-bt.git
8 years agoam f92aeb96: service: Add Parcel utilities for UUID and GATT
Arman Uguray [Fri, 2 Oct 2015 03:19:17 +0000 (03:19 +0000)]
am f92aeb96: service: Add Parcel utilities for UUID and GATT

* commit 'f92aeb96ae4dfe2e8cd7c27ca7b94a03518855cf':
  service: Add Parcel utilities for UUID and GATT

8 years agoam df0b2714: service: Implement adding a service declaration
Arman Uguray [Fri, 2 Oct 2015 03:19:16 +0000 (03:19 +0000)]
am df0b2714: service: Implement adding a service declaration

* commit 'df0b2714553cabc735222ce18a5f018c5a5fa138':
  service: Implement adding a service declaration

8 years agoservice: Add Parcel utilities for UUID and GATT
Arman Uguray [Thu, 24 Sep 2015 02:55:25 +0000 (19:55 -0700)]
service: Add Parcel utilities for UUID and GATT

Added Parcel helpers for UUID and GattIdentifier. Also added the
util::IsAddressValid helper function and unit tests.

Bug: 24245347
Change-Id: I52d7274dd0a8e2806836efc4467eb4d11ac0c7e4

8 years agoam 78a44cdb: service: Add HAL wrappers for adding a service
Arman Uguray [Fri, 2 Oct 2015 03:14:08 +0000 (03:14 +0000)]
am 78a44cdb: service: Add HAL wrappers for adding a service

* commit '78a44cdb25616892087af2c92abd382878c2ccb4':
  service: Add HAL wrappers for adding a service

8 years agoam 80826c9d: service: Add GattIdentifier.
Arman Uguray [Fri, 2 Oct 2015 03:14:06 +0000 (03:14 +0000)]
am 80826c9d: service: Add GattIdentifier.

* commit '80826c9d492b7d6c5d2a14b6e538510b8ce92dc5':
  service: Add GattIdentifier.

8 years agoservice: Implement adding a service declaration
Arman Uguray [Thu, 24 Sep 2015 00:25:54 +0000 (17:25 -0700)]
service: Implement adding a service declaration

This CL implements initiating and starting a GATT service
declaration in GattServer.

Bug: 24245347
Change-Id: I53281d29a052c1890616b6595881108ca0eedec3

8 years agoservice: Add HAL wrappers for adding a service
Arman Uguray [Thu, 24 Sep 2015 00:23:54 +0000 (17:23 -0700)]
service: Add HAL wrappers for adding a service

Added wrappers for HAL functions for adding and starting a service
declaration.

Bug: 24245347
Change-Id: Ie9bd09abb443abdfdc31f3439d563c58066961f2

8 years agoservice: Add GattIdentifier.
Arman Uguray [Wed, 23 Sep 2015 02:04:38 +0000 (19:04 -0700)]
service: Add GattIdentifier.

This CL introduces the GattIdentifier class which servers as an
opaque identifier for GATT API objects/attributes.

Bug: 24245347
Change-Id: I377f53e1ff5d51fa8581756522235d4a90e90233

8 years agoam 7b54b0de: service: Implement IBluetoothGattServer register functions
Arman Uguray [Fri, 2 Oct 2015 02:30:29 +0000 (02:30 +0000)]
am 7b54b0de: service: Implement IBluetoothGattServer register functions

* commit '7b54b0de26de5eb34579304e1ccf94e1d9b77701':
  service: Implement IBluetoothGattServer register functions

8 years agoservice: Implement IBluetoothGattServer register functions
Arman Uguray [Tue, 22 Sep 2015 21:25:45 +0000 (14:25 -0700)]
service: Implement IBluetoothGattServer register functions

This patch implements the IBluetoothGattServer interface
registerServer, unregisterServer, and unregisterAll functions
against bluetooth::GattServer.

Bug: 24245347
Change-Id: Ide114730a20f939a378a6a846161a6800a12c461

8 years agoam 0f2d4897: service: Add new GattServer abstraction
Arman Uguray [Fri, 2 Oct 2015 01:56:40 +0000 (01:56 +0000)]
am 0f2d4897: service: Add new GattServer abstraction

* commit '0f2d4897046f037a9f181f47f3d349a9dd646478':
  service: Add new GattServer abstraction

8 years agoservice: Add new GattServer abstraction
Arman Uguray [Tue, 22 Sep 2015 21:20:42 +0000 (14:20 -0700)]
service: Add new GattServer abstraction

Added bluetooth::GattServer and bluetooth::GattServerFactory,
which conform the BluetoothClientInterface and
BluetoothClientInterfaceFactory interfaces. A GattServer represents
a per-application server instance that was registered with the stack
(a GATT server API "client").

The new code was added to the gatt_server.h|.cpp files, replacing
the old code that was added for cast. The old code has been moved to
the gatt_server_old.h|.cpp files.

Bug: 24245347
Change-Id: I3ca2eb53ab8320c9dba656859a4a89683607bb22

8 years agoam 42c89a0e: service: Fix crash in hal/
Ajay Panicker [Wed, 30 Sep 2015 23:44:32 +0000 (23:44 +0000)]
am 42c89a0e: service: Fix crash in hal/

* commit '42c89a0e5f3e2771681ebd11281d6e3c20341894':
  service: Fix crash in hal/

8 years agoservice: Fix crash in hal/
Ajay Panicker [Wed, 30 Sep 2015 22:49:09 +0000 (15:49 -0700)]
service: Fix crash in hal/

Fixed crash in hal/ interfaces when the Bluetooth library
fails to load.

Bug: 24409298

Change-Id: I8841d4e568756ef976e40335ef4697645563aebc

8 years agoam ed7d0e3c: service: build unit tests on non-Linux hosts
Scott James Remnant [Mon, 28 Sep 2015 21:49:10 +0000 (21:49 +0000)]
am ed7d0e3c: service: build unit tests on non-Linux hosts

* commit 'ed7d0e3cea7ff7a66e9f13fffd5de554c425c7bf':
  service: build unit tests on non-Linux hosts

8 years agoam e415c050: Rename IPCHandlerUnix to IPCHandlerLinux
Scott James Remnant [Mon, 28 Sep 2015 21:49:10 +0000 (21:49 +0000)]
am e415c050: Rename IPCHandlerUnix to IPCHandlerLinux

* commit 'e415c050edbb2710e8807dd2602c851412953268':
  Rename IPCHandlerUnix to IPCHandlerLinux

8 years agoservice: build unit tests on non-Linux hosts
Scott James Remnant [Wed, 23 Sep 2015 20:11:03 +0000 (13:11 -0700)]
service: build unit tests on non-Linux hosts

Use a stub for the Linux-specific IPC on non-Linux hosts.

BUG=24306825

Change-Id: I038c17ad43695be88399617687a1c3b77946daae

8 years agoRename IPCHandlerUnix to IPCHandlerLinux
Scott James Remnant [Wed, 23 Sep 2015 17:52:07 +0000 (10:52 -0700)]
Rename IPCHandlerUnix to IPCHandlerLinux

Since it relies on the Linux-specific sequential packet socket type,
rename the "Unix" IPC Handler to "Linux".

Change-Id: I04c4d6d3f73061099ebffb1ee3adfd0a20430dd7

8 years agoam 9e520536: service: Add server support to BluetoothGattInterface
Arman Uguray [Sat, 26 Sep 2015 03:53:37 +0000 (03:53 +0000)]
am 9e520536: service: Add server support to BluetoothGattInterface

* commit '9e5205368d61adf11e75c9e2bd9f6ff26b375bac':
  service: Add server support to BluetoothGattInterface

8 years agoam 4624e1a6: service: Add IBluetoothGattServer stubs
Arman Uguray [Sat, 26 Sep 2015 03:53:37 +0000 (03:53 +0000)]
am 4624e1a6: service: Add IBluetoothGattServer stubs

* commit '4624e1a6d25a838dad2e72001e340dd77d68179e':
  service: Add IBluetoothGattServer stubs

8 years agoservice: Add server support to BluetoothGattInterface
Arman Uguray [Tue, 22 Sep 2015 21:12:50 +0000 (14:12 -0700)]
service: Add server support to BluetoothGattInterface

Added HAL GATT server interface wrappers to
hal::BluetoothGattInterface. Extended the fake implementation to
allow mocking server calls.

Bug: 24245347
Change-Id: Ic3436b8a82ecd93fed3b61579662fe776eebef58

8 years agoservice: Add IBluetoothGattServer stubs
Arman Uguray [Mon, 21 Sep 2015 21:47:19 +0000 (14:47 -0700)]
service: Add IBluetoothGattServer stubs

Added the IBluetoothGattServer and IBluetoothGattServerCallback
interface definitions with stub daemon implementation. Added
IBluetooth.getGattServerInterface to obtain a GATT server
interface handle.

Bug: 24245347
Change-Id: I2d361a55d2b21e270dc74484e678985df3d30306

8 years agoam 08f80ebd: service: Move client registration into base class
Arman Uguray [Sat, 26 Sep 2015 03:19:47 +0000 (03:19 +0000)]
am 08f80ebd: service: Move client registration into base class

* commit '08f80ebd5c714364cb76cc4e4a93454b42ed5669':
  service: Move client registration into base class

8 years agoam 2fea18e5: service: Add missing include
Arman Uguray [Thu, 24 Sep 2015 06:58:58 +0000 (06:58 +0000)]
am 2fea18e5: service: Add missing include

* commit '2fea18e501ab98df3254a08fca981513bf098274':
  service: Add missing include

8 years agoservice: Move client registration into base class
Arman Uguray [Mon, 21 Sep 2015 18:17:07 +0000 (11:17 -0700)]
service: Move client registration into base class

This CL introduces InterfaceWithClientsBase, which is an abstract class
that implements common client registration logic, which will be reused
for Binder interfaces such as IBluetoothGattClient and
IBluetoothGattServer. This also introduces BluetoothClientInstance, so
that per-application API client instances (and their factories) conform
to a common interface.

Bug: 24245347
Change-Id: Ia4b464fa85f7a33c631bf63342631fce8d155b4a

8 years agoservice: Add missing include
Arman Uguray [Thu, 24 Sep 2015 06:43:18 +0000 (23:43 -0700)]
service: Add missing include

Added missing "#include <atomic>" line to fix build breakages on
some build flavors.

Change-Id: I611bb63e84787217ff4bf774ceebc09ffd3c0476

8 years agoam d19bc045: service/client: Add start-adv and stop-adv
Arman Uguray [Thu, 24 Sep 2015 02:15:36 +0000 (02:15 +0000)]
am d19bc045: service/client: Add start-adv and stop-adv

* commit 'd19bc0457a9b6519acd6a79c3ac7de653894f5ec':
  service/client: Add start-adv and stop-adv

8 years agoam 1a3e9aba: service: Implement IBluetoothLowEnergy advertising
Arman Uguray [Thu, 24 Sep 2015 02:15:36 +0000 (02:15 +0000)]
am 1a3e9aba: service: Implement IBluetoothLowEnergy advertising

* commit '1a3e9aba73551eeecdfeece04f1c39a00880d56c':
  service: Implement IBluetoothLowEnergy advertising

8 years agoam 12338405: service: Add advertising support to LowEnergyClient
Arman Uguray [Thu, 24 Sep 2015 02:15:35 +0000 (02:15 +0000)]
am 12338405: service: Add advertising support to LowEnergyClient

* commit '12338405e0d8d70573e650560ccc8e1ce7d8e8cd':
  service: Add advertising support to LowEnergyClient

8 years agoam b2b1ecd3: service: Fix bug in RemoteCallbackMap
Arman Uguray [Thu, 24 Sep 2015 02:15:34 +0000 (02:15 +0000)]
am b2b1ecd3: service: Fix bug in RemoteCallbackMap

* commit 'b2b1ecd3c282412773f5ca70ee2798542bc2920f':
  service: Fix bug in RemoteCallbackMap

8 years agoam 909b7e66: service: Add various LE advertising constants
Arman Uguray [Thu, 24 Sep 2015 02:15:33 +0000 (02:15 +0000)]
am 909b7e66: service: Add various LE advertising constants

* commit '909b7e6681101eb5e2d56209993134932284b50e':
  service: Add various LE advertising constants

8 years agoservice/client: Add start-adv and stop-adv
Arman Uguray [Thu, 17 Sep 2015 01:04:32 +0000 (18:04 -0700)]
service/client: Add start-adv and stop-adv

Added the start-adv and stop-adv commands to FCLI for testing
the IBluetoothLowEnergy advertising APIs.

Bug: 23793954
Change-Id: I023441e4db4a50608b4f9a90bf3365c1dab8d0d1

8 years agoservice: Implement IBluetoothLowEnergy advertising
Arman Uguray [Thu, 17 Sep 2015 01:02:31 +0000 (18:02 -0700)]
service: Implement IBluetoothLowEnergy advertising

This CL implements the IBluetoothLowEnergy Binder APIs for
multi-advertising.

Bug: 23793954
Change-Id: I6519f86b9e528d23d2c1f46618188d1123686856

8 years agoservice: Add advertising support to LowEnergyClient
Arman Uguray [Thu, 17 Sep 2015 01:00:05 +0000 (18:00 -0700)]
service: Add advertising support to LowEnergyClient

This CL adds the StartAdvertising and StopAdvertising APIs to
LowEnergyClient. These internally call into the multi-advertising
APIs in HAL and report success or failure in an async callback.
The sequence of calls to enable advertising and setting advertising
and scan response data are serialized internally.

Bug: 23793954
Change-Id: Id093a98f3baca6328653b986857a064e8a722690

8 years agoservice: Fix bug in RemoteCallbackMap
Arman Uguray [Thu, 17 Sep 2015 00:56:32 +0000 (17:56 -0700)]
service: Fix bug in RemoteCallbackMap

Fixed a bug in RemoteCallbackMap that returned the wrong value
in one of the template functions that wasn't exercised before.

Bug: 23793954
Change-Id: Id6848bd08e6941d3c8c6d6e4d6e494a0b9dc4c69

8 years agoservice: Add various LE advertising constants
Arman Uguray [Thu, 17 Sep 2015 00:55:04 +0000 (17:55 -0700)]
service: Add various LE advertising constants

Added several constants that are used in LE advertising. Added
constants for the exposed EIR fields here as well so that clients
can use it.

Bug: 23793954
Change-Id: Ib6a97d6beb1a31c9c3ea7ed468167dab627d7d32

8 years agoam 27650cd8: service: Fix build breakage.
Arman Uguray [Sun, 20 Sep 2015 19:31:22 +0000 (19:31 +0000)]
am 27650cd8: service: Fix build breakage.

* commit '27650cd8f2473356351f3279177486971a0f9054':
  service: Fix build breakage.

8 years agoservice: Fix build breakage.
Arman Uguray [Sun, 20 Sep 2015 19:26:16 +0000 (12:26 -0700)]
service: Fix build breakage.

Fixed build breakage due to missing changes.

Change-Id: Iac962fef2e9be979a2af90a43a66a5c66bbe4ad4

8 years agoam d1ed1f53: service: Add HAL wrappers for multi-advertising
Arman Uguray [Sun, 20 Sep 2015 19:21:54 +0000 (19:21 +0000)]
am d1ed1f53: service: Add HAL wrappers for multi-advertising

* commit 'd1ed1f53a5c0cce5ecb8d784acf5bef53211a20f':
  service: Add HAL wrappers for multi-advertising

8 years agoservice: Add HAL wrappers for multi-advertising
Arman Uguray [Thu, 17 Sep 2015 00:53:05 +0000 (17:53 -0700)]
service: Add HAL wrappers for multi-advertising

This CL adds the fake and real HAL wrappers for the multi-advertising
APIs in hardware/bluetooth/bt_gatt_client.h.

Bug: 23793954
Change-Id: I485e7cf87c4b6f42c3a702c62230a287443a75c1

8 years agoam 52bfc606: service: Add binder stubs for advertising API
Arman Uguray [Fri, 18 Sep 2015 02:09:00 +0000 (02:09 +0000)]
am 52bfc606: service: Add binder stubs for advertising API

* commit '52bfc6060cec652a67c8989e0548225af0008be1':
  service: Add binder stubs for advertising API

8 years agoam 3d73f617: service: Add AdvertiseData and AdvertiseSettings
Arman Uguray [Fri, 18 Sep 2015 02:08:59 +0000 (02:08 +0000)]
am 3d73f617: service: Add AdvertiseData and AdvertiseSettings

* commit '3d73f617610de09a68243852c91a2fffcabc367c':
  service: Add AdvertiseData and AdvertiseSettings

8 years agoservice: Add binder stubs for advertising API
Arman Uguray [Thu, 10 Sep 2015 21:28:54 +0000 (14:28 -0700)]
service: Add binder stubs for advertising API

Added native binder proxy stubs for IBluetoothLowEnergy interface
startMultiAdvertising and stopMultiAdvertising methods and
IBluetoothLowEnergyCallback.onMultiAdvertiseCallback.

Bug: 23793954
Change-Id: I0577619502042f612bf17f2a0affb2a9a1eaed38

8 years agoservice: Add AdvertiseData and AdvertiseSettings
Arman Uguray [Mon, 31 Aug 2015 21:31:02 +0000 (14:31 -0700)]
service: Add AdvertiseData and AdvertiseSettings

Added native definitions for AdvertiseData and AdvertiseSettings
framework objects. Also introduced parcel_helpers, which currently
provides functions to convert AdvertiseData and AdvertiseSettings
to/from Parcel.

As part of this, the bt_service_binder_unittests executable has been
added. This is built for the target device rather than host, as it
requires libbinder and libbinder currently can't be built for host.

Bug: 23793954
Change-Id: Ic55d7f48579e519006decaada5b6f2ef7aefe595

8 years agoam 2e434148: service/client: Add first BLE interface commands
Arman Uguray [Thu, 17 Sep 2015 23:54:28 +0000 (23:54 +0000)]
am 2e434148: service/client: Add first BLE interface commands

* commit '2e4341488064be7e8f4d575c8de0a1670ddc81a0':
  service/client: Add first BLE interface commands

8 years agoam 15cf17fc: service: Implement IBluetoothLowEnergy client registration
Arman Uguray [Thu, 17 Sep 2015 23:47:23 +0000 (23:47 +0000)]
am 15cf17fc: service: Implement IBluetoothLowEnergy client registration

* commit '15cf17fc406f7796b33dc56585eccbcd1c9c6df9':
  service: Implement IBluetoothLowEnergy client registration

8 years agoam f8711f2e: service: Added RemoteCallbackMap
Arman Uguray [Thu, 17 Sep 2015 23:47:22 +0000 (23:47 +0000)]
am f8711f2e: service: Added RemoteCallbackMap

* commit 'f8711f2e95343f2c9673ab4ffc0bebbdba16c452':
  service: Added RemoteCallbackMap

8 years agoam 81f82d27: service: Add IBluetoothLowEnergy interface
Arman Uguray [Thu, 17 Sep 2015 23:43:28 +0000 (23:43 +0000)]
am 81f82d27: service: Add IBluetoothLowEnergy interface

* commit '81f82d278f4d5593012357857c5bc1d0cd758c82':
  service: Add IBluetoothLowEnergy interface

8 years agoservice/client: Add first BLE interface commands
Arman Uguray [Fri, 4 Sep 2015 20:17:39 +0000 (13:17 -0700)]
service/client: Add first BLE interface commands

Added the register-ble, unregister-ble, and unregister-all-ble
commands to FCLI. Also added a DeathListener for the IBluetooth
interface to handle the case when bluetoothtbd dies.

Bug: 23793954
Change-Id: I3c549ea59665cf174fb47114b879f679c0aafcb4

8 years agoservice: Implement IBluetoothLowEnergy client registration
Arman Uguray [Fri, 4 Sep 2015 20:11:39 +0000 (13:11 -0700)]
service: Implement IBluetoothLowEnergy client registration

This CL adds support for the IBluetoothLowEnergy registerClient and
unregisterClient methods. A lot of the code added here deals with
asynchronous callback registration and can be generalized to other
interfaces that asynchronously associate and return client
interface IDs with callback binders.

Bug: 23793954
Change-Id: I82cf26e194c456f04363fe66f094bc803a5aa436

8 years agoservice: Added RemoteCallbackMap
Arman Uguray [Fri, 4 Sep 2015 19:57:37 +0000 (12:57 -0700)]
service: Added RemoteCallbackMap

Added the RemoteCallbackMap template class which allows storing
IInterface subclasses in an associative array while tracking the
death of the remote process that owns the associated binder. This is
similar to RemoteCallbackList but stores entries in key-value pairs.

Also fixed some RemoteCallbackList documentation and change the code to
use std::unordered_map rather than std::map.

Bug: 23793954
Change-Id: I205c0491d21fef3bc5eeb5c4a7356dab4b6eb8dc

8 years agoservice: Add IBluetoothLowEnergy interface
Arman Uguray [Wed, 2 Sep 2015 00:22:29 +0000 (17:22 -0700)]
service: Add IBluetoothLowEnergy interface

Introduce the IBluetoothLowEnergy and IBluetoothLowEnergyCallback
interfaces with stub implementations for three methods only. Added
the definition and implementation for IBluetooth.GetLowEnergyInterface.

Bug: 23395353
Change-Id: Iba4d9aa20779956b486c0b46e752e0e00be3aeea

8 years agoam c2fc0f28: service: Introduce bluetooth::LowEnergyClient
Arman Uguray [Thu, 17 Sep 2015 01:55:07 +0000 (01:55 +0000)]
am c2fc0f28: service: Introduce bluetooth::LowEnergyClient

* commit 'c2fc0f287f4dfaf206a51856b8d5dfa923af3c05':
  service: Introduce bluetooth::LowEnergyClient

8 years agoservice: Introduce bluetooth::LowEnergyClient
Arman Uguray [Thu, 3 Sep 2015 22:09:41 +0000 (15:09 -0700)]
service: Introduce bluetooth::LowEnergyClient

Added the LowEnergyClient class which manages a per-application BLE
API client instance. This currently only supports getting registered
with the stack and obtaining a client_if handle but will expose APIs
in the future for various BLE operations.

Bug: 23793954
Change-Id: I423f6d12321877826525e5e52136682fa9d5a441

8 years agoam e9c82dca: service: Add UUID::GetRandom
Arman Uguray [Mon, 14 Sep 2015 21:14:32 +0000 (21:14 +0000)]
am e9c82dca: service: Add UUID::GetRandom

* commit 'e9c82dca471da42c5a5dddb4582b70b3681758af':
  service: Add UUID::GetRandom

8 years agoam 9ded7b61: service: Add hal::BluetoothGattInterface
Arman Uguray [Mon, 14 Sep 2015 21:14:32 +0000 (21:14 +0000)]
am 9ded7b61: service: Add hal::BluetoothGattInterface

* commit '9ded7b6175825afdac0e2cebef8755e4d7b03103':
  service: Add hal::BluetoothGattInterface

8 years agoservice: Add UUID::GetRandom
Arman Uguray [Thu, 3 Sep 2015 22:00:52 +0000 (15:00 -0700)]
service: Add UUID::GetRandom

Added a static class method to UUID that returns a random 128-bit UUID.
Also converted the enum constants to pure integer constants to make
their meaning more explicit.

Bug: 23395353
Change-Id: If8b97d40c020fdfc8b460b537b2da7c62b0c24ad

8 years agoservice: Add hal::BluetoothGattInterface
Arman Uguray [Mon, 31 Aug 2015 23:29:07 +0000 (16:29 -0700)]
service: Add hal::BluetoothGattInterface

Added hal::BluetoothGattInterface which is a C++ wrapper around the
HAL Bluetooth GATT interfaces. This follows the current pattern of hal/*
wrappers and is meant to be fakeable.

Bug: 23395353
Change-Id: Ib11afba9fe2f4632591d5db384edf32ca788bf2c

8 years agoam 10b54c4b: service: Implement IBluetooth.isMultiAdvertisementSupported()
Arman Uguray [Tue, 1 Sep 2015 16:37:35 +0000 (16:37 +0000)]
am 10b54c4b: service: Implement IBluetooth.isMultiAdvertisementSupported()

* commit '10b54c4b7f1a863a27eca4158f256062ec9c3770':
  service: Implement IBluetooth.isMultiAdvertisementSupported()

8 years agoam 5d22fabf: gn-build: Add secondary build tree for gmock
Arman Uguray [Tue, 1 Sep 2015 16:37:33 +0000 (16:37 +0000)]
am 5d22fabf: gn-build: Add secondary build tree for gmock

* commit '5d22fabf158ca476623068db46a05345c8791760':
  gn-build: Add secondary build tree for gmock

8 years agoam 888f8856: brillo: add and install system startup files
Marie Janssen [Tue, 1 Sep 2015 16:37:33 +0000 (16:37 +0000)]
am 888f8856: brillo: add and install system startup files

* commit '888f8856774e9628b670da6ba779a36dd6a19ab9':
  brillo: add and install system startup files

8 years agoservice: Implement IBluetooth.isMultiAdvertisementSupported()
Arman Uguray [Fri, 21 Aug 2015 21:59:57 +0000 (14:59 -0700)]
service: Implement IBluetooth.isMultiAdvertisementSupported()

Added the Binder bindings, bluetoothtbd implementation, and new
bluetooth-cli command for testing it.

Bug: 23227962
Change-Id: I2de62e49e5d8b0bcc118ccb654d72fdd9f11f748

8 years agogn-build: Add secondary build tree for gmock
Arman Uguray [Fri, 28 Aug 2015 19:15:09 +0000 (12:15 -0700)]
gn-build: Add secondary build tree for gmock

Added a BUILD.gn file for gmock under third_party/gmock.

Change-Id: Icbe93f118142ab8e0ea3a46672a74dd2d7466868

8 years agobrillo: add and install system startup files
Marie Janssen [Tue, 25 Aug 2015 22:07:09 +0000 (15:07 -0700)]
brillo: add and install system startup files

Add files necessary to start bluetoothtbd at startup.

BUG=23120355

Change-Id: Ibdacee621909b9d7fc9af2935343e581693ed010

8 years agoam b7460434: Fix memory corruption of BLE whitelist hashmap
Nitin Arora [Tue, 25 Aug 2015 23:16:46 +0000 (23:16 +0000)]
am b7460434: Fix memory corruption of BLE whitelist hashmap

* commit 'b74604341c60628dc7bc8e8e69e3ce2acb4a5373':
  Fix memory corruption of BLE whitelist hashmap

8 years agoFix memory corruption of BLE whitelist hashmap
Nitin Arora [Fri, 21 Aug 2015 19:34:14 +0000 (12:34 -0700)]
Fix memory corruption of BLE whitelist hashmap

When adding devices to the whitelist for LE background connections, a
local variable is used as the hashmap key, preventing any successful
lookups going forward. Thus the device will repeatedly add the same
device to the whitelist and preventing successful connections going
forward.

Bug: 23423602
Change-Id: I3d2590c0a1dd66c6e1864ea53f875a713660b645

8 years agoam 3644c2a3: service: Check for NULL IBinder in registerCallback
Arman Uguray [Mon, 24 Aug 2015 18:39:46 +0000 (18:39 +0000)]
am 3644c2a3: service: Check for NULL IBinder in registerCallback

* commit '3644c2a3f9b203eaf798053097ad92df8b2820cc':
  service: Check for NULL IBinder in registerCallback

8 years agoam d0835477: service: Return SUCCESS from Acquire|ReleaseWakeLock
Arman Uguray [Mon, 24 Aug 2015 18:02:02 +0000 (18:02 +0000)]
am d0835477: service: Return SUCCESS from Acquire|ReleaseWakeLock

* commit 'd0835477cb1047b42eef8d740e8d29888b0874c6':
  service: Return SUCCESS from Acquire|ReleaseWakeLock

8 years agoservice: Check for NULL IBinder in registerCallback
Arman Uguray [Mon, 24 Aug 2015 18:00:25 +0000 (11:00 -0700)]
service: Check for NULL IBinder in registerCallback

Added checks for NULL binder in IBluetooth.registerCallback and
IBluetooth.unregisterCallback.

Change-Id: I6136ad08d83696ad0e94cc2425667df9310f2b96

8 years agoservice: Return SUCCESS from Acquire|ReleaseWakeLock
Arman Uguray [Mon, 24 Aug 2015 17:08:19 +0000 (10:08 -0700)]
service: Return SUCCESS from Acquire|ReleaseWakeLock

Added code back to lie and return BT_STATUS_SUCCESS from the
AcquireWakeLock and ReleaseWakeLock OS callouts, since without these
the adapter cannot be properly disabled.

Bug: 23390297
Change-Id: I9801ccc7f72d83d132363fc888319bfb9b2eff29

8 years agoam bc6ad53e: Merge "Improve adv_data transfer between contexts."
Ian Coolidge [Mon, 24 Aug 2015 17:35:45 +0000 (17:35 +0000)]
am bc6ad53e: Merge "Improve adv_data transfer between contexts."

* commit 'bc6ad53e310c2b6b1734883e8d92f5c147279d23':
  Improve adv_data transfer between contexts.

8 years agoMerge "Improve adv_data transfer between contexts."
Ian Coolidge [Mon, 24 Aug 2015 17:22:45 +0000 (17:22 +0000)]
Merge "Improve adv_data transfer between contexts."

8 years agoresolved conflicts for merge of aa41fec0 to mnc-dev-plus-aosp
Pavlin Radoslavov [Mon, 24 Aug 2015 06:29:21 +0000 (23:29 -0700)]
resolved conflicts for merge of aa41fec0 to mnc-dev-plus-aosp

Change-Id: Idb55faf3fd076a7db7987c5230771b40e68271da

8 years agoCheck the return value when reading HCI type byte
Pavlin Radoslavov [Thu, 20 Aug 2015 23:53:16 +0000 (16:53 -0700)]
Check the return value when reading HCI type byte

Add missing return value check when reading the HCI type byte.
This check is needed as a safeguard. For example, function
event_uart_has_bytes() could be called (indirectly)
within the run_reactor() loop not only when there are bytes to read,
but also if there is an error (e.g., EPOLLHUP | EPOLLRDHUP | EPOLLERR).

Bug: 23105107
Change-Id: Ic3b6e4d656406949e384c8106b0c607f7c221759

8 years agoam 6f5f0540: test_vendor_lib: Clean up controller documentation and address style...
Dennis Cheng [Fri, 21 Aug 2015 22:24:40 +0000 (22:24 +0000)]
am 6f5f0540: test_vendor_lib: Clean up controller documentation and address style issues

* commit '6f5f0540f1557c87349d9f3378a90979c175ed1d':
  test_vendor_lib: Clean up controller documentation and address style issues

8 years agoam 2e00ba9b: test_vendor_lib: Add tests
Dennis Cheng [Fri, 21 Aug 2015 22:24:35 +0000 (22:24 +0000)]
am 2e00ba9b: test_vendor_lib: Add tests

* commit '2e00ba9b74536ce9a0d1adf78f92e6478563e49b':
  test_vendor_lib: Add tests

8 years agoam ad588372: Merge "Enable clang compilation, use stdatomic.h."
Chih-hung Hsieh [Fri, 21 Aug 2015 22:24:24 +0000 (22:24 +0000)]
am ad588372: Merge "Enable clang compilation, use stdatomic.h."

* commit 'ad5883726417d06ee79fa26e4050f8c3a9439578':
  Enable clang compilation, use stdatomic.h.

8 years agoam e2982ad5: service: Don\'t lie about supporting wake locks
Arman Uguray [Fri, 21 Aug 2015 22:24:22 +0000 (22:24 +0000)]
am e2982ad5: service: Don\'t lie about supporting wake locks

* commit 'e2982ad5a15f604218a7cfb37ab1aaed544667d3':
  service: Don't lie about supporting wake locks

8 years agotest_vendor_lib: Clean up controller documentation and address style
Dennis Cheng [Fri, 21 Aug 2015 03:32:01 +0000 (20:32 -0700)]
test_vendor_lib: Clean up controller documentation and address style
issues

This upload cleans up the command documentation in the controller's
header file and also fixes a few logical errors related to command
status event packets. Some style fixes are also included, such as
removing braces for single line conditionals to conform to remain
consistent with the rest of the project.

Bug: 21586676
Change-Id: Ife5e608e43c3030e76eff8ea79ce6cad0b2c10a3

8 years agotest_vendor_lib: Add tests
Dennis Cheng [Tue, 18 Aug 2015 23:44:08 +0000 (16:44 -0700)]
test_vendor_lib: Add tests

This upload adds unit tests for the packet_stream and hci_transport
objects.

Bug: 21586676
Change-Id: Ica99be959cdd801ea10631d31fc0f0b8ea1d8456

8 years agoMerge "Enable clang compilation, use stdatomic.h."
Chih-hung Hsieh [Fri, 21 Aug 2015 20:25:29 +0000 (20:25 +0000)]
Merge "Enable clang compilation, use stdatomic.h."

8 years agoservice: Don't lie about supporting wake locks
Arman Uguray [Thu, 20 Aug 2015 22:40:31 +0000 (15:40 -0700)]
service: Don't lie about supporting wake locks

Changed the code to return error rather than success from the native
bt_os_callout_t hooks.

Bug: 23390297
Change-Id: I0a4e2678ace88072294b82e57cf1e1bd3edd08cd

8 years agoEnable clang compilation, use stdatomic.h.
Chih-Hung Hsieh [Thu, 13 Aug 2015 19:27:32 +0000 (12:27 -0700)]
Enable clang compilation, use stdatomic.h.

* Remove old atomic.h and atomic_test.cpp.
  Use stdatomi.h in counter.c.
* Suppress warnings on unused variables/parameters.
* Suppress warnings on redefined typedef.

Change-Id: Ic7ec652608f2c9423984a3631fb58efea5a835e7

9 years agoam 7a87e719: test_vendor_lib: Add working post delayed task
Dennis Cheng [Fri, 21 Aug 2015 00:11:53 +0000 (00:11 +0000)]
am 7a87e719: test_vendor_lib: Add working post delayed task

* commit '7a87e719982e874c1d23e106a4dbc8dd2ede97bd':
  test_vendor_lib: Add working post delayed task

9 years agotest_vendor_lib: Add working post delayed task
Dennis Cheng [Fri, 14 Aug 2015 20:15:31 +0000 (13:15 -0700)]
test_vendor_lib: Add working post delayed task

This upload fixes the post delayed task functionality so that it uses
a custom time stamped event object instead of posting callbacks to the
vendor manager's task runner (which does not support delayed tasks for
MessageLoopForIO).

Bug: 21586676
Change-Id: Ib5d9019d8c8dd5c9ad865df82eac16b0ecf50268

9 years agoam 39a66bed: service/client: Register IBluetoothCallback
Arman Uguray [Thu, 20 Aug 2015 22:42:51 +0000 (22:42 +0000)]
am 39a66bed: service/client: Register IBluetoothCallback

* commit '39a66bed960d96eca900e7e002e0d7bef0e0e151':
  service/client: Register IBluetoothCallback

9 years agoam 67ab1c85: service: Introduce IBluetoothCallback.h
Arman Uguray [Thu, 20 Aug 2015 22:42:50 +0000 (22:42 +0000)]
am 67ab1c85: service: Introduce IBluetoothCallback.h

* commit '67ab1c856dfc0ca9fb44b94b3621d4183a693a5a':
  service: Introduce IBluetoothCallback.h

9 years agoam 5bb6aa6a: service: Add native RemoteCallbackList
Arman Uguray [Thu, 20 Aug 2015 22:42:50 +0000 (22:42 +0000)]
am 5bb6aa6a: service: Add native RemoteCallbackList

* commit '5bb6aa6a0fc49b38e4951a37d2c30644a0bf00be':
  service: Add native RemoteCallbackList

9 years agoservice/client: Register IBluetoothCallback
Arman Uguray [Thu, 20 Aug 2015 19:47:55 +0000 (12:47 -0700)]
service/client: Register IBluetoothCallback

bluetooth-cli now registers an IBluetoothCallback to receive adapter
state updates, which gets automatically unregistered when bluetooth-cli
exits.

Bug: 23328384
Change-Id: I4f190e91ecd8401b9f5eb1cffdfb26cd9d5cecb0

9 years agoservice: Introduce IBluetoothCallback.h
Arman Uguray [Thu, 20 Aug 2015 19:36:20 +0000 (12:36 -0700)]
service: Introduce IBluetoothCallback.h

This CL introduces the native bindings for the IBluetoothCallback
Binder interface and implements the IBluetooth registerCallback and
unregisterCallback methods.

Bug: 23328384
Change-Id: I6fbf72cff7e3f037a412be8678ea97f3a7ada0c8

9 years agoservice: Add native RemoteCallbackList
Arman Uguray [Thu, 20 Aug 2015 19:31:50 +0000 (12:31 -0700)]
service: Add native RemoteCallbackList

This CL introduces a native port of the android.os.RemoteCallbackList
Java class. This is in preparation of the upcoming IBluetoothCallback
implementation.

Bug: 23328384
Change-Id: Icebf5c286ced820fa631da35f50cdf5d244fdded

9 years agoam 8f3595f8: service: Add complete IBluetooth transaction enums
Arman Uguray [Thu, 20 Aug 2015 22:05:04 +0000 (22:05 +0000)]
am 8f3595f8: service: Add complete IBluetooth transaction enums

* commit '8f3595f8632b64f386276229492220dac3d6ceb5':
  service: Add complete IBluetooth transaction enums

9 years agoam 42feba6b: Revert "service: Move UNIX IPC code into ipc/unix/"
Arman Uguray [Thu, 20 Aug 2015 21:55:00 +0000 (21:55 +0000)]
am 42feba6b: Revert "service: Move UNIX IPC code into ipc/unix/"

* commit '42feba6b2da890cfee2d1daaf6c2e76378c55e49':
  Revert "service: Move UNIX IPC code into ipc/unix/"

9 years agoam 4cebc7e1: service: Introduce bluetooth::Adapter::Observer
Arman Uguray [Thu, 20 Aug 2015 21:55:00 +0000 (21:55 +0000)]
am 4cebc7e1: service: Introduce bluetooth::Adapter::Observer

* commit '4cebc7e190f29acb56ef8658a9ad02137e82e967':
  service: Introduce bluetooth::Adapter::Observer

9 years agoservice: Add complete IBluetooth transaction enums
Arman Uguray [Thu, 20 Aug 2015 19:12:56 +0000 (12:12 -0700)]
service: Add complete IBluetooth transaction enums

This CL completes the IBluetooth transaction codes based on the
latest IBluetooth.aidl file from goog/mnc-dev.

Bug: 23227962
Change-Id: I76d58647a0467cd0eb18f9bd0d3eceb36ce2abcf

9 years agoRevert "service: Move UNIX IPC code into ipc/unix/"
Arman Uguray [Thu, 20 Aug 2015 21:06:57 +0000 (21:06 +0000)]
Revert "service: Move UNIX IPC code into ipc/unix/"

It turns out "unix" is defined to be 1 somewhere, which breaks compilation of this CL (since I added "namespace unix").

This reverts commit 93e66a66464aa30ca7184e4a7378c8e8d752cbe1.

Change-Id: I00b0a59a35024ccf78297117916d12031a6346a5

9 years agoservice: Introduce bluetooth::Adapter::Observer
Arman Uguray [Thu, 20 Aug 2015 18:38:49 +0000 (11:38 -0700)]
service: Introduce bluetooth::Adapter::Observer

This CL introduces a new Observer interface for the Adapter class.
This meant to serve as the top-level API for receiving Adapter state
notifications, property updates, etc, in a format that doesn't use
the native HAL types.

Bug: 23328384
Change-Id: Ibf29063a169ad5e986d433d0901b3b973af0aa56

9 years agoam 503baaae: service: Support base switches::kV
Arman Uguray [Thu, 20 Aug 2015 20:42:44 +0000 (20:42 +0000)]
am 503baaae: service: Support base switches::kV

* commit '503baaae63d798a5f25a7faa9206cd72f87927be':
  service: Support base switches::kV

9 years agoam 93e66a66: service: Move UNIX IPC code into ipc/unix/
Arman Uguray [Thu, 20 Aug 2015 20:42:43 +0000 (20:42 +0000)]
am 93e66a66: service: Move UNIX IPC code into ipc/unix/

* commit '93e66a66464aa30ca7184e4a7378c8e8d752cbe1':
  service: Move UNIX IPC code into ipc/unix/

9 years agoservice: Support base switches::kV
Arman Uguray [Thu, 20 Aug 2015 18:49:00 +0000 (11:49 -0700)]
service: Support base switches::kV

This is a libbase built-in command-line flag to set log verbosity,
so that the VLOG macro does the right thing. This CL enables that for
the daemon. To enable VLOGs with a given verbosity level and below, do

bluetoothtbd --v=<level>

Change-Id: I128a42c52425c37640c016c3c6158419cc1c0f66