OSDN Git Service

android-x86/system-bt.git
8 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

8 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

8 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

8 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/"

8 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

8 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

8 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

8 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

8 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

8 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/

8 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

8 years agoservice: Move UNIX IPC code into ipc/unix/
Arman Uguray [Thu, 20 Aug 2015 20:07:18 +0000 (13:07 -0700)]
service: Move UNIX IPC code into ipc/unix/

Moved the UNIX IPC related code into a new ipc/unix subdirectory.
Added new namespace levels for unix and binder that mimic the
directory structure.

Change-Id: I58954d0c3dd1a6fe9c141c3122d42530385265f6

8 years agoam bf7db314: test_vendor_lib: Read controller properties from file.
Dennis Cheng [Thu, 20 Aug 2015 19:31:52 +0000 (19:31 +0000)]
am bf7db314: test_vendor_lib: Read controller properties from file.

* commit 'bf7db3143fda4dc8391c92ec25dc93b9725ec225':
  test_vendor_lib: Read controller properties from file.

8 years agotest_vendor_lib: Read controller properties from file.
Dennis Cheng [Mon, 10 Aug 2015 16:29:41 +0000 (09:29 -0700)]
test_vendor_lib: Read controller properties from file.

This upload lets the controller be configured via a JSON file that
specifies the controller attributes. A default configuration is not
currently provided but will be included in a future upload. Also fixes
a few mistakes in test_channel.py.

Bug: 21586676
Change-Id: I9d0e65a9664e179ddb97664a748c766f4f8a554e

8 years agoam d2199cbb: Disable remote TCP connections
Pavlin Radoslavov [Wed, 19 Aug 2015 01:48:54 +0000 (01:48 +0000)]
am d2199cbb: Disable remote TCP connections

* commit 'd2199cbb8f361772819402b56e6fa46587a31c56':
  Disable remote TCP connections

8 years agoam 5192309a: service/client: Add support for the latest methods
Arman Uguray [Tue, 18 Aug 2015 23:22:32 +0000 (23:22 +0000)]
am 5192309a: service/client: Add support for the latest methods

* commit '5192309af14408c3f170f15c1282ae5c1eb5abff':
  service/client: Add support for the latest methods

8 years agoservice/client: Add support for the latest methods
Arman Uguray [Tue, 18 Aug 2015 00:25:04 +0000 (17:25 -0700)]
service/client: Add support for the latest methods

Added support for calling the IBluetooth getAddress, setName,
and getName methods.

Bug: 23227962
Change-Id: Ib8c3f609b02e953a2989c18d614b5f52a56421c2

8 years agoam 03b1f0fb: service: Implement IBluetooth getAddress, getName, and setName
Arman Uguray [Tue, 18 Aug 2015 22:46:54 +0000 (22:46 +0000)]
am 03b1f0fb: service: Implement IBluetooth getAddress, getName, and setName

* commit '03b1f0fb7247ddc1c8496bf3b1bdc056110d12fa':
  service: Implement IBluetooth getAddress, getName, and setName

8 years agoservice: Implement IBluetooth getAddress, getName, and setName
Arman Uguray [Tue, 18 Aug 2015 00:23:42 +0000 (17:23 -0700)]
service: Implement IBluetooth getAddress, getName, and setName

This CL implements the IBluetooth getAddress, getName, and setName
API methods.

Bug: 23227962
Change-Id: I5ba8395a08bdbcf6a882ea8f413448cf0a1f331a

8 years agoam fb685ef1: Fix typo in main/bte_main.c.
Miao Chou [Tue, 18 Aug 2015 21:51:41 +0000 (21:51 +0000)]
am fb685ef1: Fix typo in main/bte_main.c.

* commit 'fb685ef1e420893ddad6b99d5a9aa6f09ae0b2da':
  Fix typo in main/bte_main.c.

8 years agoFix typo in main/bte_main.c.
Miao Chou [Tue, 11 Aug 2015 18:41:58 +0000 (11:41 -0700)]
Fix typo in main/bte_main.c.

Change-Id: If16dd316545b485f3a92c9700f9af35bf97fdd42

8 years agoam 77bf8137: service: Add four more IBluetooth API definitions
Arman Uguray [Tue, 18 Aug 2015 20:06:53 +0000 (20:06 +0000)]
am 77bf8137: service: Add four more IBluetooth API definitions

* commit '77bf8137962c2477f28041b29220b92f90a7460a':
  service: Add four more IBluetooth API definitions

8 years agoam fe6dd2a7: service: Rename Uuid to UUID
Arman Uguray [Tue, 18 Aug 2015 20:06:52 +0000 (20:06 +0000)]
am fe6dd2a7: service: Rename Uuid to UUID

* commit 'fe6dd2a72b0f6d761821e75b048c13eb9ecd19ac':
  service: Rename Uuid to UUID

8 years agoam 2117e520: service: Implement IBluetooth::GetState
Arman Uguray [Tue, 18 Aug 2015 20:06:52 +0000 (20:06 +0000)]
am 2117e520: service: Implement IBluetooth::GetState

* commit '2117e520c9f5b105ade7e92c4ab4928ea905f176':
  service: Implement IBluetooth::GetState

8 years agoservice: Add four more IBluetooth API definitions
Arman Uguray [Sat, 15 Aug 2015 01:32:48 +0000 (18:32 -0700)]
service: Add four more IBluetooth API definitions

Added bindings for the following IBluetooth API methods:

    String getAddress();
    ParcelUuid[] getUuids();
    boolean setName(in String name);
    String getName();

Bug: 23227962
Change-Id: Ia5f57056486bb832b2c9e7fc82837626716992ed

8 years agoservice: Rename Uuid to UUID
Arman Uguray [Sat, 15 Aug 2015 01:28:42 +0000 (18:28 -0700)]
service: Rename Uuid to UUID

This is more consistent with the ancronym naming convention in the
framework code (e.g. java.util.UUID) and elsewhere in the Bluetooth
daemon.

Change-Id: I3461cf12d563e00ba5e0b0b390bd9ef94e6d7418

8 years agoservice: Implement IBluetooth::GetState
Arman Uguray [Sat, 15 Aug 2015 00:23:47 +0000 (17:23 -0700)]
service: Implement IBluetooth::GetState

This CL implements the GetState method of the IBluetooth interface:

   1. A new file, adapter_state.h has been added, which defines the
      STATE_* values from BluetoothAdapter.java in the framework layer.
      This is done this way so that a client library can be built with
      minimal dependency on core service code (e.g. Adapter).

   2. Implemented the GetState method.

   3. Refactored the fake BluetoothInterface such that multiple unit
      test modules can make use of it by centralizing fake behavior
      to hal/.

   4. Added new commands to client/.

Bug: 23227962
Change-Id: Id403094f6fe34cd5cef0577f319309169f74ddf3

8 years agoam fcf2e039: service: Implement IBluetooth IsEnabled, Enable, and Disable
Arman Uguray [Tue, 18 Aug 2015 19:42:18 +0000 (19:42 +0000)]
am fcf2e039: service: Implement IBluetooth IsEnabled, Enable, and Disable

* commit 'fcf2e0391950a8b140082fbe78688fa89471fbed':
  service: Implement IBluetooth IsEnabled, Enable, and Disable

8 years agoam d6a4b0c9: service: Replace CoreStack with Adapter
Arman Uguray [Tue, 18 Aug 2015 19:42:18 +0000 (19:42 +0000)]
am d6a4b0c9: service: Replace CoreStack with Adapter

* commit 'd6a4b0c950f44d3eab34825880d26c19e362d22b':
  service: Replace CoreStack with Adapter

8 years agoam 4fdadb6c: service: Introduce Adapter
Arman Uguray [Tue, 18 Aug 2015 19:37:07 +0000 (19:37 +0000)]
am 4fdadb6c: service: Introduce Adapter

* commit '4fdadb6c834ec5299f47fc4e1c59c00410e07a45':
  service: Introduce Adapter

8 years agoam 2202cd58: service: Introduce hal::BluetoothInterface
Arman Uguray [Tue, 18 Aug 2015 19:26:24 +0000 (19:26 +0000)]
am 2202cd58: service: Introduce hal::BluetoothInterface

* commit '2202cd58a1c623224eae92969f8a0fc8dbd1c17b':
  service: Introduce hal::BluetoothInterface

8 years agoservice: Implement IBluetooth IsEnabled, Enable, and Disable
Arman Uguray [Fri, 14 Aug 2015 00:05:03 +0000 (17:05 -0700)]
service: Implement IBluetooth IsEnabled, Enable, and Disable

Implemented the IsEnabled, Enable, and Disable methods of the IBluetooth
interface. Added a simple REPL logic to client/main.cpp so that these commands
can be tested real-time via command-line.

Bug: 23169366
Change-Id: Id27a82e5cdadc5ea0b6f88d3ab3a6b7882f6212a

8 years agoservice: Replace CoreStack with Adapter
Arman Uguray [Fri, 14 Aug 2015 00:01:07 +0000 (17:01 -0700)]
service: Replace CoreStack with Adapter

This CL removes the CoreStack class. Code that depended on a CoreStack instance
now depend on Adapter and hal::BluetoothInterface instead.

Bug: 23169364
Change-Id: Ide008cc7d3f9e74656f6bfa4df2dfee511e55b90

8 years agoservice: Introduce Adapter
Arman Uguray [Thu, 13 Aug 2015 23:09:35 +0000 (16:09 -0700)]
service: Introduce Adapter

This CL introduces the Adapter class, which is meant to replace the CoreStack
class. Adapter interfaces with hal::BluetoothInterface rather than calling into
libhardware directly.

Bug: 23169364
Change-Id: Id0a19277d55e83ec3bee3653d5d8795efbd5781b

8 years agoservice: Introduce hal::BluetoothInterface
Arman Uguray [Thu, 13 Aug 2015 22:49:47 +0000 (15:49 -0700)]
service: Introduce hal::BluetoothInterface

This CL introduces the bluetooth::hal::BluetoothInterface class. This is meant
to be an abstraction over the underlying bt_interface_t and bt_callbacks_t
interfaces from libhardware. BluetoothInterface is defined as an abstract
singleton that allows a fake/mock implementation to be injected for testing.

Bug: 23169364
Change-Id: Ia6f21f505dca08651b9a83e30287f638e8ec9a8e

8 years agoDisable remote TCP connections
Pavlin Radoslavov [Tue, 18 Aug 2015 01:54:22 +0000 (18:54 -0700)]
Disable remote TCP connections

For security reasons, TCP sockets now listen on the loopback
IPv4 address 127.0.0.1 for incoming TCP connections.

Bug: 23272146
Change-Id: I88523f643f305f2281740575d7011b6077bf0843

8 years agoam 9cd603f0: test_vendor_lib: Remove handlers
Dennis Cheng [Sat, 15 Aug 2015 01:05:31 +0000 (01:05 +0000)]
am 9cd603f0: test_vendor_lib: Remove handlers

* commit '9cd603f04a5478d88da1882ab46f226a5bf4a2d1':
  test_vendor_lib: Remove handlers

8 years agoam f1548336: test_vnd_lib: Discover devices
Dennis Cheng [Sat, 15 Aug 2015 00:51:16 +0000 (00:51 +0000)]
am f1548336: test_vnd_lib: Discover devices

* commit 'f1548336bf79a1e5eade187b5f483726d3439639':
  test_vnd_lib: Discover devices

8 years agotest_vendor_lib: Remove handlers
Dennis Cheng [Sun, 9 Aug 2015 00:07:50 +0000 (17:07 -0700)]
test_vendor_lib: Remove handlers

This upload removes the HciHandler and TestChannelHandler classes.
Removing these classes simplifies logic and also allows the
controller to do preprocessing before executing commands.

Bug: 21586676
Change-Id: I3f2711349dd2c86794538edc632b4f5f49b5169b

8 years agoam 8bb61fe2: test_vendor_lib: Add test channel command transport and handler
Dennis Cheng [Sat, 15 Aug 2015 00:33:59 +0000 (00:33 +0000)]
am 8bb61fe2: test_vendor_lib: Add test channel command transport and handler

* commit '8bb61fe28ac339276acf1b5b1616a6e56e2cccac':
  test_vendor_lib: Add test channel command transport and handler

8 years agotest_vnd_lib: Discover devices
Dennis Cheng [Fri, 7 Aug 2015 23:58:13 +0000 (16:58 -0700)]
test_vnd_lib: Discover devices

This upload allows the user to send fake inquiry responses to the
controller at run-time via the test channel.

Bug: 21586676
Change-Id: Ieae24d496115f19716fcaaffa627a9c22ffade21

8 years agotest_vendor_lib: Add test channel command transport and handler
Dennis Cheng [Tue, 4 Aug 2015 23:51:59 +0000 (16:51 -0700)]
test_vendor_lib: Add test channel command transport and handler

This upload adds the transport and handler functionality for the test
channel. Test channel commands will be sent by the test channel
program and processed by library objects in a manner analogous to how
packets are received and handled from the HCI. The actual
implementation for the 4 test channel commands included here will be
in the next upload.

Bug: 21586676
Change-Id: I9354baedcbd6e48b8920a3ebf1afa69eb89834d9

8 years agoam 2d96c880: test_vendor_lib: Add test channel for run-time input
Dennis Cheng [Fri, 14 Aug 2015 22:15:58 +0000 (22:15 +0000)]
am 2d96c880: test_vendor_lib: Add test channel for run-time input

* commit '2d96c88025c80d4d7e0e341cfdbf278596340b66':
  test_vendor_lib: Add test channel for run-time input

8 years agotest_vendor_lib: Add test channel for run-time input
Dennis Cheng [Mon, 3 Aug 2015 01:25:17 +0000 (18:25 -0700)]
test_vendor_lib: Add test channel for run-time input

This change adds a test channel for receiving user-specified commands
and data at run-time. Specifically, the channel is intended to be used
for additional debugging capabilities and for fine-tuned control over
the test controller. Implementation-wise, the test channel is simply
another socket that the vendor manager watches on. The handling of test
channel input goes through the pipeline as normal HCI data after it is
received by the HciTransport.

A script for building and running the test vendor library and
(optionally) the test channel has been added in scripts/.

Bug: 21586676
Change-Id: I55bdeedbcd81effbe009aa62a19031637374a1e6

8 years agoam 1e1f1598: Merge "[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn\'t match" into mnc-dev
Iliyan Malchev [Fri, 14 Aug 2015 05:45:54 +0000 (05:45 +0000)]
am 1e1f1598: Merge "[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn\'t match" into mnc-dev

* commit '1e1f1598c0574ccda0978bc31bf759708c33a0c9':
  [DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match

8 years agoMerge "[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match" into mnc-dev
Iliyan Malchev [Fri, 14 Aug 2015 05:38:26 +0000 (05:38 +0000)]
Merge "[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match" into mnc-dev

8 years agoam afcf2a26: Merge "Restore LOG_NDEBUG condition on verbose logging."
Ian Coolidge [Thu, 13 Aug 2015 20:02:49 +0000 (20:02 +0000)]
am afcf2a26: Merge "Restore LOG_NDEBUG condition on verbose logging."

* commit 'afcf2a267f10d8aa4b1bc1fc7ea5fe48e314e68c':
  Restore LOG_NDEBUG condition on verbose logging.

8 years agoMerge "Restore LOG_NDEBUG condition on verbose logging."
Ian Coolidge [Thu, 13 Aug 2015 19:50:05 +0000 (19:50 +0000)]
Merge "Restore LOG_NDEBUG condition on verbose logging."

8 years agoRestore LOG_NDEBUG condition on verbose logging.
Ian Coolidge [Thu, 13 Aug 2015 05:47:45 +0000 (22:47 -0700)]
Restore LOG_NDEBUG condition on verbose logging.

Change-Id: I86c5e03954c5f0a2dad88db5d6fbda3ec9e11e96

8 years agoam aa9e17bc: service: Allow manufacturer data to be set.
Ian Coolidge [Wed, 12 Aug 2015 23:22:00 +0000 (23:22 +0000)]
am aa9e17bc: service: Allow manufacturer data to be set.

* commit 'aa9e17bc61324446b9e0199630fb772b9afb1109':
  service: Allow manufacturer data to be set.

8 years agoam f993f137: Merge "service: Fix permissions/properties argument order."
Ian Coolidge [Wed, 12 Aug 2015 23:21:59 +0000 (23:21 +0000)]
am f993f137: Merge "service: Fix permissions/properties argument order."

* commit 'f993f137a01b27655ffe1336026ed14d08bb8449':
  service: Fix permissions/properties argument order.

8 years agoam f5209525: service: Introduce a command-line client
Arman Uguray [Wed, 12 Aug 2015 23:21:59 +0000 (23:21 +0000)]
am f5209525: service: Introduce a command-line client

* commit 'f52095257e36b887d7ddfd1f00871b9311dbfa1b':
  service: Introduce a command-line client

8 years agoam b2286f38: service: Add IPCHandlerBinder
Arman Uguray [Wed, 12 Aug 2015 23:21:58 +0000 (23:21 +0000)]
am b2286f38: service: Add IPCHandlerBinder

* commit 'b2286f386e20a45b5f19a199d0981f4952216fa3':
  service: Add IPCHandlerBinder

8 years agoservice: Allow manufacturer data to be set.
Ian Coolidge [Wed, 12 Aug 2015 21:53:15 +0000 (14:53 -0700)]
service: Allow manufacturer data to be set.

Plumbs IPC and stack code for manufacturer data
on advertisement or scan response.

Change-Id: I4b70506e35f51479bdf4073c31e4cb4f88fa2c98

8 years agoMerge "service: Fix permissions/properties argument order."
Ian Coolidge [Wed, 12 Aug 2015 22:33:47 +0000 (22:33 +0000)]
Merge "service: Fix permissions/properties argument order."

8 years agoservice: Fix permissions/properties argument order.
Ian Coolidge [Wed, 12 Aug 2015 22:19:51 +0000 (15:19 -0700)]
service: Fix permissions/properties argument order.

These were swapped, resulting in a bad configuration
of the control attribute.

Change-Id: I93dd69da1ace70a249d3a8d1856b173a52462a6c

8 years agoservice: Introduce a command-line client
Arman Uguray [Thu, 6 Aug 2015 04:22:39 +0000 (21:22 -0700)]
service: Introduce a command-line client

This CL introduces a CLI for the Bluetooth daemon. The code currently
doesn't do much, other than demonstrate how a native Binder client code
can be placed to the Bluetooth daemon. This objective here is to
extend this with a REPL and send commands to the daemon based on user
input.

Bug: 22743129
Change-Id: I41015e4b639e7099dd9f7086dbe86b01f3a61786

8 years agoservice: Add IPCHandlerBinder
Arman Uguray [Thu, 6 Aug 2015 04:19:02 +0000 (21:19 -0700)]
service: Add IPCHandlerBinder

This CL integrates Binder IPC into the daemon. This introduces
IPCHandlerBinder and BluetoothBinderServer which is the Binder server
proxy for IBluetooth. A new command-line switch is introduced to
optionally disable Binder on platforms that do not use it.

BluetoothBinderServer currently does not fully implement any of the IPC
calls and consists of stubs.

Bug: 22743677
Change-Id: I3e4ba7a3211898bab0c9c8061f4e4db3854711ed

8 years agoam 8d88b1b7: Allocate large enough buffers when copying AVRC packets
Satya Calloji [Sat, 8 Aug 2015 01:05:56 +0000 (01:05 +0000)]
am 8d88b1b7: Allocate large enough buffers when copying AVRC packets

* commit '8d88b1b75c665772f714643a71e5974c7f6dd02c':
  Allocate large enough buffers when copying AVRC packets

8 years agoam 61f2f365: service: Add IBluetooth interface definition
Arman Uguray [Fri, 7 Aug 2015 21:46:38 +0000 (21:46 +0000)]
am 61f2f365: service: Add IBluetooth interface definition

* commit '61f2f365799c40ce52e7b08507b32f20ca0773a3':
  service: Add IBluetooth interface definition

8 years agoservice: Add IBluetooth interface definition
Arman Uguray [Thu, 6 Aug 2015 04:06:17 +0000 (21:06 -0700)]
service: Add IBluetooth interface definition

This CL adds the initial IBluetooth interface definition. Client and server
proxy classes have been added, which would normally be autogenerated in Android
Framework Land. This currently only includes the first five methods from
IBluetooth.aidl but will be extended in the future.

Bug: 22743677
Change-Id: I32be9801e91877c2961e24232cdfaecd80ee2368

8 years agoam 4161eb61: build: fix missing include
Marie Janssen [Fri, 7 Aug 2015 20:21:07 +0000 (20:21 +0000)]
am 4161eb61: build: fix missing include

* commit '4161eb610dc8152fad833aa1f187a9af52fd7c0d':
  build: fix missing include

8 years agoam 8f247258: build: fixes for breakages on tilapia
Marie Janssen [Fri, 7 Aug 2015 20:21:00 +0000 (20:21 +0000)]
am 8f247258: build: fixes for breakages on tilapia

* commit '8f247258317bfd015806badce0cc41df901fa6e7':
  build: fixes for breakages on tilapia

8 years agoresolved conflicts for merge of 49a86709 to mnc-dev-plus-aosp
Marie Janssen [Fri, 7 Aug 2015 20:15:26 +0000 (13:15 -0700)]
resolved conflicts for merge of 49a86709 to mnc-dev-plus-aosp

Change-Id: Icd7ec2fd78ac4383da430708a88abaeba9009437

8 years agoAllocate large enough buffers when copying AVRC packets
Satya Calloji [Fri, 7 Aug 2015 17:56:12 +0000 (10:56 -0700)]
Allocate large enough buffers when copying AVRC packets

AVRC response is created by copying the original received packet.
When allocating a buffer for the response, the buffer length
should be large enough to contain the response.

Bug: 22437809
Change-Id: I862d633e76d3c5221582459f19935a45e53577c7

8 years agobuild: fix missing include
Marie Janssen [Fri, 7 Aug 2015 06:29:29 +0000 (23:29 -0700)]
build: fix missing include

fatfingered this needed include out of this file

Change-Id: Id4c8d3223b25d0747a2739891e43652c475d399c

8 years ago[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match
Jacob Lee [Fri, 7 Aug 2015 03:17:28 +0000 (11:17 +0800)]
[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match

In the document, the supported version is 96.
But, the defined supported version is 95 in the code.
The callback function btm_ble_vendor_capability_vsc_cmpl_cback
can not read number of track entries when it compare with 95
and supported version from firmware.

Bug: 22906552

Change-Id: I64e6f14f34ef3ed0ddc3fee2fad05eb03e5938f1
Signed-off-by: Jacob Lee <jacob.lee@mediatek.com>
8 years agobuild: fixes for breakages on tilapia
Marie Janssen [Fri, 7 Aug 2015 01:30:45 +0000 (18:30 -0700)]
build: fixes for breakages on tilapia

Only include advertising when we can actually advertise on LE.

Change-Id: I380c67db4391650591b94611c4d522bf49fac750

8 years agobuild: LOG_TAG consistency, include order, build fixes
Marie Janssen [Wed, 8 Jul 2015 18:48:57 +0000 (11:48 -0700)]
build: LOG_TAG consistency, include order, build fixes

Fix the order of includes across a bunch of files, and declare LOG_TAG
at the top of every file in which it is used.

Consistently use bt_ as a LOG_TAG prefix.
Fix issues with LOG macro usage.
Remove unused includes and double-includes (when in related .h)

Add includes as necessary to compile cleanly (problems surfaced by
reordering includes)

Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6

8 years agoam 2fc0eba9: test_vendor_lib: Implement event loop with libbase
Dennis Cheng [Thu, 6 Aug 2015 18:13:58 +0000 (18:13 +0000)]
am 2fc0eba9: test_vendor_lib: Implement event loop with libbase

* commit '2fc0eba951081bddd15a3482f2189a9125dac48a':
  test_vendor_lib: Implement event loop with libbase

8 years agotest_vendor_lib: Implement event loop with libbase
Dennis Cheng [Thu, 30 Jul 2015 17:06:40 +0000 (10:06 -0700)]
test_vendor_lib: Implement event loop with libbase

Adds event loop functionality by handling IO in the Watcher class,
HciTransport. Also fixes a bug where the vendor's file descriptor was
closed early and another where an object was mistakingly being passed
by value.

Bug: 21586676
Change-Id: I2ec30b68c0ede47bf1ad78ec13beee93d0f8ab9d

8 years agoam b2d45eb7: test_vendor_lib: Use base::Thread
Dennis Cheng [Thu, 6 Aug 2015 17:23:25 +0000 (17:23 +0000)]
am b2d45eb7: test_vendor_lib: Use base::Thread

* commit 'b2d45eb7cbd4f2de5f0101915981a87392ccf625':
  test_vendor_lib: Use base::Thread

8 years agotest_vendor_lib: Use base::Thread
Dennis Cheng [Wed, 29 Jul 2015 18:47:55 +0000 (11:47 -0700)]
test_vendor_lib: Use base::Thread

This upload starts the replacement of the event loop in HciTransport
with libbase's MessageLoopForIO. A global instance of the new
VendorManager class now manages the trio of previously global objects
(i.e. HciTransport, HciHandler, and BREDRController). Note that the new
libbase event loop structure doesn't actually handle anything right now
and the functionality will come in a future change.

Bug: 21586676
Change-Id: Id74392e2a566e06445eb65269f0142265087d47d

8 years agoam 66ba120c: Merge "service: Clean up IPC shutdown and add unit tests"
Arman Uguray [Thu, 6 Aug 2015 12:40:24 +0000 (12:40 +0000)]
am 66ba120c: Merge "service: Clean up IPC shutdown and add unit tests"

* commit '66ba120cde2d9dc72bb8a014d52dcb20937a6816':
  service: Clean up IPC shutdown and add unit tests

8 years agoMerge "service: Clean up IPC shutdown and add unit tests"
Arman Uguray [Thu, 6 Aug 2015 03:54:44 +0000 (03:54 +0000)]
Merge "service: Clean up IPC shutdown and add unit tests"

8 years agoam a7077ee9: test_vendor_lib: Use libbase\'s CHECK/DCHECK
Dennis Cheng [Thu, 6 Aug 2015 01:39:47 +0000 (01:39 +0000)]
am a7077ee9: test_vendor_lib: Use libbase\'s CHECK/DCHECK

* commit 'a7077ee9b7482708fa7272837a527f64bb470988':
  test_vendor_lib: Use libbase's CHECK/DCHECK

8 years agoam 5f8a46aa: test_vendor_lib: Dummy inquiry result
Dennis Cheng [Thu, 6 Aug 2015 01:39:37 +0000 (01:39 +0000)]
am 5f8a46aa: test_vendor_lib: Dummy inquiry result

* commit '5f8a46aae144f416d695010ae61c47116562a615':
  test_vendor_lib: Dummy inquiry result

8 years agoam f8881fee: service: Add Mock support for Daemon and CoreStack
Arman Uguray [Thu, 6 Aug 2015 01:39:37 +0000 (01:39 +0000)]
am f8881fee: service: Add Mock support for Daemon and CoreStack

* commit 'f8881fee3d08cb50896b22adc0841223694d51d2':
  service: Add Mock support for Daemon and CoreStack

8 years agotest_vendor_lib: Use libbase's CHECK/DCHECK
Dennis Cheng [Mon, 27 Jul 2015 22:55:15 +0000 (15:55 -0700)]
test_vendor_lib: Use libbase's CHECK/DCHECK

This upload pulls in libchrome to the test vendor library and uses CHECK
and DCHECK from base/logging.h.

Bug: 21586676
Change-Id: Ia88b4aa3728493d798e8d36076a351a00fad7c6b

8 years agotest_vendor_lib: Dummy inquiry result
Dennis Cheng [Thu, 23 Jul 2015 22:22:50 +0000 (15:22 -0700)]
test_vendor_lib: Dummy inquiry result

This upload mainly consists of stub command implementations to get
Bluetooth into the enabled state. The last command handled is the
inquiry command. Upon inquiry, the controller currently sends back a
dummy inquiry result for a fake device. This fake device appears under
the "Available devices" list in the UI.  Bluetooth is able to be toggled
off and on from the UI as well (i.e. it doesn't crash after switching to
on for a few seconds).

Bug: 21586676
Change-Id: Ifd42a6ab4b9338afd461d2ef4f809bdd62fcf79f

8 years agoservice: Clean up IPC shutdown and add unit tests
Arman Uguray [Wed, 5 Aug 2015 01:59:27 +0000 (18:59 -0700)]
service: Clean up IPC shutdown and add unit tests

This CL reworks the IPCHandlerUnix shutdown routine to be more robust
and adds a test suite for the basic thread creation and shutdown sanity.

Bug: 22532180
Change-Id: I22d119d6514f2ceb1460c0925b4e92b71ec87e06

8 years agoservice: Add Mock support for Daemon and CoreStack
Arman Uguray [Tue, 4 Aug 2015 19:56:56 +0000 (12:56 -0700)]
service: Add Mock support for Daemon and CoreStack

This patch turns the Daemon and CoreStack classes into abstract
interfaces. Mock and real implementations are implemented in special
subclasses and obtained via a factory method. Other test implementations
(e.g. stub) can be provided in the future.

Bug: 22532180
Change-Id: Ic3000518e5cef1c867dd803cd0bba6aab49dc596

8 years agoam aa3be1a6: Implement Bluetooth settings factory reset (3/5)
Ajay Panicker [Wed, 5 Aug 2015 17:55:22 +0000 (17:55 +0000)]
am aa3be1a6: Implement Bluetooth settings factory reset (3/5)

* commit 'aa3be1a696b9ae1142fe9f358ad5f97e99da7892':
  Implement Bluetooth settings factory reset (3/5)

8 years agoImplement Bluetooth settings factory reset (3/5)
Ajay Panicker [Tue, 28 Jul 2015 23:54:53 +0000 (16:54 -0700)]
Implement Bluetooth settings factory reset (3/5)

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

Bug: 16161518

8 years agoam 80caab27: Drop obsolete libpower dependency.
Ian Coolidge [Wed, 5 Aug 2015 01:02:31 +0000 (01:02 +0000)]
am 80caab27: Drop obsolete libpower dependency.

* commit '80caab275a4a0daface9d970e5cbc28896b64af3':
  Drop obsolete libpower dependency.

8 years agoDrop obsolete libpower dependency.
Ian Coolidge [Fri, 31 Jul 2015 23:18:18 +0000 (16:18 -0700)]
Drop obsolete libpower dependency.

Wakelock activity is delegated to depending module.

Change-Id: I368bb9287f208fed3a674423e82fb2a8cb9e8268

8 years agoresolved conflicts for merge of 145cf576 to mnc-dev-plus-aosp
Arman Uguray [Tue, 4 Aug 2015 22:51:10 +0000 (15:51 -0700)]
resolved conflicts for merge of 145cf576 to mnc-dev-plus-aosp

Change-Id: I717d2959e50309b272b3b76851015871b5095fc1

8 years agoCompile libbtcore and libosi for host
Arman Uguray [Sat, 1 Aug 2015 02:14:39 +0000 (19:14 -0700)]
Compile libbtcore and libosi for host

The static libraries now also compile for a Linux host as libbtcore-host and
libosi-host. The unittests are compiled for the target against Bionic libc and
for the host against glibc.

Bug: 22884515
Change-Id: Iac1310a48cfd2ff43c356cb31165fd176d0e1d39

8 years agoam 3c0ea3e5: test_vendor_lib: Use EPOLLOUT
Dennis Cheng [Tue, 4 Aug 2015 18:38:01 +0000 (18:38 +0000)]
am 3c0ea3e5: test_vendor_lib: Use EPOLLOUT

* commit '3c0ea3e5a5aca269283854d8f2f584ad0699c951':
  test_vendor_lib: Use EPOLLOUT

8 years agotest_vendor_lib: Use EPOLLOUT
Dennis Cheng [Tue, 16 Jun 2015 19:44:55 +0000 (12:44 -0700)]
test_vendor_lib: Use EPOLLOUT

HciTransport checks for write-readiness before sending any packets
back to the HCI. Packets are maintained on a queue and only written
when the EPOLLOUT flag is set in the epoll_event.

Bug: 21586676
Change-Id: Iebd9599286b62746e2be7e424c522058ae978bb1

8 years agoam d63f7c0b: Add Dialog mouse & KB to blacklist for LE secure connections
Nitin Arora [Tue, 4 Aug 2015 16:39:48 +0000 (16:39 +0000)]
am d63f7c0b: Add Dialog mouse & KB to blacklist for LE secure connections

* commit 'd63f7c0b26057f650fd30526758cd259c0b3480a':
  Add Dialog mouse & KB to blacklist for LE secure connections

8 years agoam 84d13eda: Add an explicit check for AVRCP vendor data
Pavlin Radoslavov [Tue, 4 Aug 2015 16:39:47 +0000 (16:39 +0000)]
am 84d13eda: Add an explicit check for AVRCP vendor data

* commit '84d13edac39c51290e858a71fea58925db3844bc':
  Add an explicit check for AVRCP vendor data

8 years agoAdd Dialog mouse & KB to blacklist for LE secure connections
Nitin Arora [Tue, 28 Jul 2015 23:00:55 +0000 (16:00 -0700)]
Add Dialog mouse & KB to blacklist for LE secure connections

This change allows the host to mask the Cross key bit in
the key distribution fields of the pairing request and
response while pairing with the Dialog keyboard and mouse
to prevent the remote from rejecting the DUT's pairing request.

Bug: 22799966
Change-Id: I89420e77875957c78e915c508de311d779fd03df

8 years agoAdd an explicit check for AVRCP vendor data
Pavlin Radoslavov [Tue, 4 Aug 2015 16:05:39 +0000 (09:05 -0700)]
Add an explicit check for AVRCP vendor data

Add an explicit check for AVRCP vendor data when parsing received vendor
commands or responses.

Bug: 21768387
Change-Id: I715de6fc7348d063c448971a8dae6dd1b00c7062

8 years agoam caaa00f5: Fix a crash for a race condition during Bluetooth shutdown
Pavlin Radoslavov [Tue, 4 Aug 2015 05:28:32 +0000 (05:28 +0000)]
am caaa00f5: Fix a crash for a race condition during Bluetooth shutdown

* commit 'caaa00f5ede96461e11de866ac15f5224442d1eb':
  Fix a crash for a race condition during Bluetooth shutdown

8 years agoFix a crash for a race condition during Bluetooth shutdown
Pavlin Radoslavov [Tue, 4 Aug 2015 04:58:45 +0000 (21:58 -0700)]
Fix a crash for a race condition during Bluetooth shutdown

This is same race condition observed in btif_media_task_aa_tx_flush_req()
because btif_media_task_aa_tx_flush_req() and btif_media_task_stop_aa_req()
are called back-to-bach.

This race condition is triggered when A2DP audio is streaming on shutdown:
"btif_a2dp_on_stopped() -> btif_media_task_stop_aa_req()" is called
to stop the particular audio stream, and this happens right after
the "cleanup() -> btif_a2dp_stop_media_task()" processing during
the shutdown of the Bluetooth stack.

Bug: 22700411
Change-Id: Ia0c98d44a108cf0f57731ac8129e4d76c9934542

8 years agoam 6f2cecf9: Merge "bluedroidtest: drop obsolete libhardware_legacy dependency."
Ian Coolidge [Mon, 3 Aug 2015 21:02:50 +0000 (21:02 +0000)]
am 6f2cecf9: Merge "bluedroidtest: drop obsolete libhardware_legacy dependency."

* commit '6f2cecf90691c44c0a7955fa765d55795bacb6e5':
  bluedroidtest: drop obsolete libhardware_legacy dependency.

8 years agoMerge "bluedroidtest: drop obsolete libhardware_legacy dependency."
Ian Coolidge [Mon, 3 Aug 2015 20:45:39 +0000 (20:45 +0000)]
Merge "bluedroidtest: drop obsolete libhardware_legacy dependency."

8 years agobluedroidtest: drop obsolete libhardware_legacy dependency.
Ian Coolidge [Fri, 31 Jul 2015 22:36:07 +0000 (15:36 -0700)]
bluedroidtest: drop obsolete libhardware_legacy dependency.

Change-Id: Iecd7839aa52debb14c6fc10da2d7f838f8d05327

8 years agoam f3b1820e: test_vendor_lib: Initial commit
Dennis Cheng [Mon, 3 Aug 2015 18:45:48 +0000 (18:45 +0000)]
am f3b1820e: test_vendor_lib: Initial commit

* commit 'f3b1820e1676261886a6537e1f6abac6a35ed6d4':
  test_vendor_lib: Initial commit