Commit graph

1343 commits

Author SHA1 Message Date
Jakub Pawlowski
f82a249795 Move start advertise method to advertising interface (2/3)
Advertising related code should be exposed through
BleAdvertiserInterface. Move client.listen function into this interface.
Remove reduntant clientif parameter.

Bug: 30622771
Bug: 24099160
Test: no tests necessary
Change-Id: Ic4335f2c65c1e21f20d3ae08222fba4341b63e27
2016-10-31 11:14:46 -07:00
Jakub Pawlowski
1e24ce9167 Separate LE scanner and GATT client BTIF interfaces (2/3)
In order to properly separate low level structures associated with LE
scanner and GATT client, their interfaces must be separated first.

Test: sl4a BleScanApiTest
Bug: 30622771
Change-Id: Idf8c5b7285b68e59f18f5216380488bfe8404b22
2016-10-28 12:07:45 -07:00
Jakub Pawlowski
8cb1baefa1 Separate LE scanner from GATT client (3/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
Bug: 30622771
Change-Id: I5c2608b769bd6aec54900357cdccfa22987962c9
2016-10-27 23:10:20 +00:00
Jakub Pawlowski
6b76de1ef0 Change how Advertise Data is passed to BTIF (1/3)
The way that AD data is passed right now put some additional
limitations, i.e. only one manufacturer specific data can be set, or
only one service UUID. By moving AD generation to upper layers, another
set of limitations is removed.

Test: Covered by BleAdvertiseApiTest sl4a test
Bug: 30622771
Change-Id: I34e8d731141caaf4497565f6e929992f6e929913
2016-10-19 14:57:05 -07:00
Jakub Pawlowski
7b4adb1dbc Get rid of dependency on core from linux build (2/2)
When building bluetooth stack for linux, don't include
dependencies from core.
2016-10-18 20:33:24 -07:00
Sanket Agarwal
f93277695b AVRCP 1.6: media browsing support on Controller
Bug: 28791287
Change-Id: I52519e91c9f8f6d8db05ebc8a79e118582701150
(cherry picked from commit dd4825b6ab)
2016-10-17 12:35:18 -07:00
Jakub Pawlowski
4a635288b8 Convert advertising HAL from struct into class (1/3)
Bug: 30622771
Test: all related tests were updated
Change-Id: I61381cc57a9c8cd725478ad4e52abce9f857a373
2016-10-08 16:42:37 -07:00
Colin Cross
92bba13dd1 Make gralloc enums unsigned
hardware/libhardware/include was being included with -isystem, which
hides warnings.  The gralloc enum values are used as bitmasks on
unsigned types, explicitly mark them values as unsigned in order to
force the type of the resulting enum to be unsigned.

Bug: 32018017
Test: m -j
Change-Id: Iea281480574e0a7a8413273983c76c2c0f9f7049
2016-10-08 11:40:17 -07:00
Colin Cross
cc8d9f9fcb Avoid C-style cast warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.

Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
2016-10-07 13:10:20 -07:00
Colin Cross
64cd91274f Add name for typedef
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Add the missing name for a typedef.

Bug: 32018017
Test: m -j
Change-Id: I35f950ba3e26836cb51312ef28e98748f29d8cd8
2016-10-07 13:10:07 -07:00
Colin Cross
248ec3da8b Fix enum switch warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  -Wswitch requires that all cases in a switch statement
on an enum be enum values.  For enums being used as bit flags, cast the
enum to an int.

Bug: 32018017
Test: m -j
Change-Id: Idb430c451d017bb7ec61a7119d6abd87b6dcdc87
2016-10-07 13:10:07 -07:00
Colin Cross
867e1e3043 Fix doc warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Fix use of doxygen function comments on on function
pointers, which are not considered functions or methods.

Bug: 32018017
Test: m -j
Change-Id: I71a1d33a9ae90b646bf22f32e052bbe22e8aca76
2016-10-07 13:10:07 -07:00
Peng Xu
aaeeaa41bd [sensor] Clarification of sensor HAL behavior at deactivation
Sensor HAL should abandon stale data at deactivation.

Test: documentation change, spell checked.
Bug: 28443809

Change-Id: I29b1d324fc96d0448cdefbf2130161f71c3d3310
2016-10-05 15:17:33 -07:00
Jakub Pawlowski
9caabe1563 Fix an incorrect description of OOB data field
Change-Id: Ia3712d9af9d5521e2a3cc9ecbcf7b37fd0755c9a
2016-09-22 17:10:12 +00:00
Jakub Pawlowski
bb84c86f5a Bluetooth: split setting params and enabling advertising (2/3)
Proper order of commands when starting advertising:
* set parameters
* set data
* enable advertising

This cannot be achieved when setting advertising parameters and enabling
advertising is put together in one function. Enabling before setting
data might cause first advertisements to be empty. If a device with
hardware filter pick up such advertisement, it might fail to properly
recognize our device.

Bug: 30622771
Bug: 19372779
Change-Id: Iac154beb5129526fa3cd1d1b31eba269459bc9a0
2016-09-13 06:26:14 +00:00
Dan Stoza
a2d5b7d898 Re-add gralloc 1.0 header
Adds the header for version 1.0 of the gralloc HAL, now that the
framework properly supports it.

Bug: 28401203
Change-Id: I2ef28ca1e5ed5e9e71a14c4d1c97245051acce6c
2016-09-09 12:04:29 -07:00
Dan Stoza
d2168f7e47 HWC2: Add SKIP_CLIENT_COLOR_TRANSFORM capability
Adds HWC2_CAPABILITY_SKIP_CLIENT_COLOR_TRANSFORM, which indicates
that the client should never apply the color transform, even if all
layers are being composed by the client. This allows the device to
use its color management hardware in all cases to avoid any potential
mismatches between client and device application of the transform.

Bug: 29870302
Change-Id: I90234d91858206714e650eadb03227a4a180d975
2016-09-08 15:01:49 -07:00
Dan Stoza
ef264828fe HWC2: Redefine retire fence as present fence
Redefines the retire fence returned by presentDisplay to be a present
fence with more strictly defined semantics: this fence should fire
at the vsync when the frame is picked up by hardware, either for
scanout (in the case of video-mode panels) or for transfer to panel
memory (in the case of command-mode panels).

Bug: 29771461
Change-Id: Idf5f86c92a8748426cf3368242c08876a48d81dd
2016-09-08 15:01:34 -07:00
Avish Shah
f20c24e86b AVRCP 1.6: media browsing support on Target(2/3)
-> As a part of Avrcp 1.6 upgrade, added support
   for following features:
   [1] setAddressedPlayer
   [2] setBrowsedPlayer
   [3] getFolderItems scope=VFS/NowPlaying/Search
   [4] changePath
   [5] getItemAttributes
   [6] playItem
   [7] getTotalNumberOfItems
   [8] search string in current browsed path.
   [9] AddToNowPlaying
-> Defined functions and enhanced structures to
   support above mentioned features.
-> Added support for dual RC.

Bug: 19361366
Merged-In: I0ab7f0c7d87c06fe4f454151d20494c56aceae12
Change-Id: I0ab7f0c7d87c06fe4f454151d20494c56aceae12
2016-09-02 19:51:25 +00:00
Jakub Pawlowski
6ecdb8c0cd Separate advertiser from GATT client (3/4)
Bug: 30622771
Change-Id: Ib9f9a27a2d1a7945b05a1c985cf78b46f4b97026
2016-08-30 10:46:53 -07:00
Chih-Hung Hsieh
dc57369f96 Fix misc-macro-parentheses warnings in context-hub.h.
* Add parentheses around macro parameters.
Bug: 28705665
Test: build with WITH_TIDY=1

Change-Id: Ib1f4a99b331a844d50271a795b1582ce034a4f0c
2016-08-26 16:08:07 -07:00
Mudumba Ananth
30a9dc1e99 Merge "HFP 1.7 profile update (2/4)"
am: 2ffbffae64

Change-Id: I7ac2f06b085c497f1cd26acb1cc20c5372737331
2016-08-04 01:36:11 +00:00
Mudumba Ananth
f991edf426 HFP 1.7 profile update (2/4)
-> Updated the HF HAL interface to support two
   new commands (AT + BIND, AT + BIEV) added
   in the profile update

Bug: 19983867
Change-Id: I672232522e9634d93ae86e5db81544b17b13576d
(cherry picked from commit 220c9d5bbe)
2016-08-03 17:49:23 -07:00
Jakub Pawlowski
63b880fb8c Merge "Remove write type from GATT descriptor writes (3/4)"
am: 8e9bc1bb9e

Change-Id: I8a7493b3c525b6eaca2630129aa04380afb7c058
2016-08-04 00:01:47 +00:00
Jakub Pawlowski
f247963a95 Remove write type from GATT descriptor writes (3/4)
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used
for this sub-procedure".

Change-Id: I3bb34b52234b5c21a5ba3ec52e0c6de901c11fbe
2016-08-03 17:39:57 +00:00
Jakub Pawlowski
b815613e3c Merge "GATT Server refactoring (1/4)"
am: 7e3cfe3081

Change-Id: Ibb48b0fedf7570491f000d518c13bbc8a6af274a
2016-08-03 12:59:47 +00:00
Jakub Pawlowski
2693002598 GATT Server refactoring (1/4)
Bug: 27999121
Change-Id: Ica5891dc3dc530d94507ce3538723cf0d3b519e4
2016-08-02 20:46:08 +00:00
David Turner
b3e49e2257 Merge \\"[qemu]: Remove qemu_pipe.h and qemud.h headers.\\" am: 851f91adce
am: 45e04a28bb

Change-Id: I41eba6052fecba64ea538f0fd8c67bc580d5cb58
2016-06-21 08:07:58 +00:00
David 'Digit' Turner
45e04a28bb Merge \"[qemu]: Remove qemu_pipe.h and qemud.h headers.\"
am: 851f91adce

Change-Id: If7702102c2f7fc467f65bd6ff03cf58beb86e160
2016-06-21 08:05:11 +00:00
David Turner
851f91adce Merge "[qemu]: Remove qemu_pipe.h and qemud.h headers." 2016-06-21 07:38:02 +00:00
Jakub Pawlowski
da3d7e21a4 Merge \\"Vectors as parameters to GATT (3/3)\\" am: 8a86bd2c76
am: c5f748570b

Change-Id: Ic0fc566cc7ee545faffd4248fc53f5924f53fa37
2016-06-20 22:42:45 +00:00
Jakub Pawlowski
c5f748570b Merge \"Vectors as parameters to GATT (3/3)\"
am: 8a86bd2c76

Change-Id: I4eb42a0b37aa96339148d6ea91e972253c3e5190
2016-06-20 22:37:34 +00:00
Jakub Pawlowski
e6315cea90 Merge \\"Vectors as parameters to GATT write/indicate (3/3)\\" am: f21a41a8c6
am: 6bd84560e9

Change-Id: I029209af2dd56712824e573b6a38be6088ced4e3
2016-06-20 18:10:53 +00:00
Jakub Pawlowski
6bd84560e9 Merge \"Vectors as parameters to GATT write/indicate (3/3)\"
am: f21a41a8c6

Change-Id: I3a0fe21bba0eae55e92132e26e9812179bcc17a3
2016-06-20 18:05:36 +00:00
Jakub Pawlowski
daaed0c796 Vectors as parameters to GATT (3/3)
Bug: 29005882
Bug: 28485365
Change-Id: I1272dce1e9480c9e6f45bc39f21d034c59728482
2016-06-20 11:02:36 -07:00
David 'Digit' Turner
d78081db90 [qemu]: Remove qemu_pipe.h and qemud.h headers.
These headers do not correspond to loadable HAL modules or corresponding
support code so must be removed from here.

  <hardware/qemu_pipe.h> is removed and replaced by a new header
  named <system/qemu_pipe.h> that provides a slightly different
  API.

  <hardware/qemud.h> is a header providing a wrapper around qemu pipes
  for old emulator-specific code that relied on the obsolete 'qemud'
  daemon. It can be removed by changing all clients to use
  <system/qemu_pipe.h> instead.

BUG=25875346

Change-Id: I72242bbe8598164e0c9fee17dfa91ea97f9ad914
2016-06-16 18:50:01 +02:00
Jakub Pawlowski
620fd71ee1 Vectors as parameters to GATT write/indicate (3/3)
Bug: 29005882
Bug: 28485365
Change-Id: I39b0d746692a23be89551979488a28cfe930866a
2016-06-15 13:47:02 -07:00
Jim Miller
e6328cca4f Revert \"Fingerprint: Add an API to support throttling.\"
am: e453c5212a

Change-Id: I2d22f5a40807872dce388d2b50c0100a27757ad8
2016-06-15 02:01:44 +00:00
Jakub Pawlowski
a25692d6ce Merge \"Use UINT16 for GATT attribute id field\"
am: 8babab0d5c

Change-Id: Ie05e1a7c4045aba6ef071424a7bd6a95e80cc71f
2016-06-15 00:26:41 +00:00
Jim Miller
e453c5212a Revert "Fingerprint: Add an API to support throttling."
This reverts commit 7e9204a954.

Fixes bug 29248095

Change-Id: I60ce4dd96affbc263a14921cbdda59df7e7a65f4
2016-06-14 23:52:23 +00:00
Jakub Pawlowski
532f6a727e Use UINT16 for GATT attribute id field
am: 7dde9350e6

Change-Id: I3b686f8d98940a143dbaadd66e6425ae954a0dd0
2016-06-14 23:12:47 +00:00
Jakub Pawlowski
8639921d1b Use UINT16 for GATT attribute id field
Id field is equal to attribute handle, so it must be 16bits.
Otherwise only piece of GATT database can be used.

Bug: 29253825
Change-Id: I75c0c993a987bf0a48e910fa3c0f41f9d876bec6
(cherry picked from commit 7dde9350e6)
2016-06-14 15:07:26 -07:00
Jakub Pawlowski
7dde9350e6 Use UINT16 for GATT attribute id field
Id field is equal to attribute handle, so it must be 16bits.
Otherwise only piece of GATT database can be used.

Bug: 29253825
Change-Id: I75c0c993a987bf0a48e910fa3c0f41f9d876bec6
2016-06-14 12:47:34 -07:00
Dan Stoza
29c387fa07 HWC2: Add format to VD create, surface damage
am: 68cd3759be

* commit '68cd3759be6a20245eba10f8aaf861cc65ab41b7':
  HWC2: Add format to VD create, surface damage

Change-Id: If72622d09c31cca277804a8a18adfa55c96efe12
2016-05-24 17:14:25 +00:00
Dan Stoza
68cd3759be HWC2: Add format to VD create, surface damage
Adds a format in/out parameter to createVirtualDisplay so that the
device knows what format the consumer prefers, but can override it if
it is not capable of rendering to it.

Also adds a surface damage region to the setClientTarget call.

Bug: 22767098
Change-Id: I58801aed2d95fd7dbf63db2e303bc3079caaba25
2016-05-20 20:35:58 +00:00
Wyatt Riley
7a4f84bc78 Merge "Glonass ID Revision" into nyc-dev
am: 0b1e0f0e48

* commit '0b1e0f0e48620b328e4a49024403dc49887c5b10':
  Glonass ID Revision

Change-Id: I2c903fde1f1ba28fb3e9aa769954873b22c6a3e4
2016-05-19 18:45:21 +00:00
Wyatt Riley
0b1e0f0e48 Merge "Glonass ID Revision" into nyc-dev 2016-05-19 18:37:53 +00:00
Wyatt Riley
8018186b78 Glonass ID Revision
Comments only

Change-Id: Ie61367fcdb20fb1f580aa739c98e05bfbb2f40ca
2016-05-18 13:01:05 -07:00
Dan Stoza
567ee541fe Remove gralloc1 header
am: 89c7452d15

* commit '89c7452d15e6922719ed99134313af8ba35420b7':
  Remove gralloc1 header

Change-Id: I9d3662926dba55eca0857d21bb8950b47e262ea7
2016-05-18 17:43:58 +00:00
Dan Stoza
89c7452d15 Remove gralloc1 header
Removes the gralloc1 header until such time as framework support can
be added.

Bug: 28401203
Change-Id: I7fbaf60d5b1c3c2267cf8d2216e94736c70bf8bb
2016-05-17 12:43:54 -07:00