OSDN Git Service

android-x86/system-bt.git
7 years agoA2DP-related naming refactoring and cleanup am: 7aaf7c6c42 am: 4e89dc5ac8
Pavlin Radoslavov [Wed, 24 Aug 2016 05:22:26 +0000 (05:22 +0000)]
A2DP-related naming refactoring and cleanup am: 7aaf7c6c42 am: 4e89dc5ac8
am: 3bf6494ed7

Change-Id: I561c46ee2026122654de3b1b2f3c13538b676479

7 years agoA2DP-related naming refactoring and cleanup am: 7aaf7c6c42
Pavlin Radoslavov [Wed, 24 Aug 2016 05:19:55 +0000 (05:19 +0000)]
A2DP-related naming refactoring and cleanup am: 7aaf7c6c42
am: 4e89dc5ac8

Change-Id: I40b313ac63ca8092a73901e64a5a80e78e9ffda5

7 years agoA2DP-related naming refactoring and cleanup
Pavlin Radoslavov [Wed, 24 Aug 2016 05:17:32 +0000 (05:17 +0000)]
A2DP-related naming refactoring and cleanup
am: 7aaf7c6c42

Change-Id: I2420388d1335ab2ff9edef957ed0934433e3e63e

7 years agoA2DP-related naming refactoring and cleanup
Pavlin Radoslavov [Tue, 23 Aug 2016 19:24:03 +0000 (12:24 -0700)]
A2DP-related naming refactoring and cleanup

* Renamed A2DP-related function names, types, constants and fields.
  Also, move some of those functions to a better location.
 - tAVDT_DATA_CBACK -> tAVDT_SINK_DATA_CBACK
 - tAVDT_MEDIA_CBACK -> tAVDT_SINK_MEDIA_CBACK
 - p_data_cback -> p_sink_data_cback
 - p_media_cback -> p_sink_media_cback
 - p_app_data_cback -> p_app_sink_data_cback
 - tBTA_AV_DATA_CBACK -> tBTA_AV_SINK_DATA_CBACK
 - BTA_AV_MEDIA_SINK_CFG_EVT -> BTA_AV_SINK_MEDIA_CFG_EVT
 - BTA_AV_MEDIA_DATA_EVT -> BTA_AV_SINK_MEDIA_DATA_EVT
 - bta_av_stream_data_cback() -> bta_av_sink_data_cback()
 - bte_av_media_callback() -> bte_av_sink_media_callback()
 - tBTA_AV_CODEC -> tA2D_CODEC
 - btif_a2dp_get_track_frequency() -> A2D_sbc_get_track_frequency()
 - btif_a2dp_get_track_channel_count() -> A2D_sbc_get_track_channel_count()
 - dump_codec_info() -> A2D_sbc_dump_codec_info()

* Misc. other cleanup:
  - log messages cleanup
  - normalize usage of "+=" in Android.mk files

Change-Id: Ida1528fb5d75cc322533f921daefb65be44562f1

7 years agoMake gatt_attr use opportunistic connection am: 970d9d18ec am: de0eabbc05
Jakub Pawlowski [Tue, 23 Aug 2016 20:45:29 +0000 (20:45 +0000)]
Make gatt_attr use opportunistic connection am: 970d9d18ec am: de0eabbc05
am: 6d5eee2116

Change-Id: I1da27ef4b5cb5470260f8d0a67c863f52120d95a

7 years agoGATT: don't update link status for apps that were never connected am: aab757d3d6...
Jakub Pawlowski [Tue, 23 Aug 2016 20:45:25 +0000 (20:45 +0000)]
GATT: don't update link status for apps that were never connected am: aab757d3d6 am: a7dd707914
am: 72b3b6fdf2

Change-Id: I499ea347d63f2b6c0c71d663c8845ef5fce41ef5

7 years agoMake gatt_attr use opportunistic connection am: 970d9d18ec
Jakub Pawlowski [Tue, 23 Aug 2016 20:32:50 +0000 (20:32 +0000)]
Make gatt_attr use opportunistic connection am: 970d9d18ec
am: de0eabbc05

Change-Id: Ic84f963c1efa375a643fe4c08ef0716c21e209b6

7 years agoGATT: don't update link status for apps that were never connected am: aab757d3d6
Jakub Pawlowski [Tue, 23 Aug 2016 20:32:48 +0000 (20:32 +0000)]
GATT: don't update link status for apps that were never connected am: aab757d3d6
am: a7dd707914

Change-Id: I9256c0f1ad331bca8b62e01790dcc9d6c5248e87

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Tue, 23 Aug 2016 20:27:39 +0000 (20:27 +0000)]
Make gatt_attr use opportunistic connection
am: 970d9d18ec

Change-Id: Iaff1375e619409afe9570b6fb79867070a339902

7 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Tue, 23 Aug 2016 20:27:38 +0000 (20:27 +0000)]
GATT: don't update link status for apps that were never connected
am: aab757d3d6

Change-Id: Id9397aa59aae3570821c9838d428541cfb6a878a

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Mon, 18 Jul 2016 16:06:49 +0000 (09:06 -0700)]
Make gatt_attr use opportunistic connection

This patch creates new connection mode - opportunistic connection. When
such connection is made, no call to gatt_update_app_hold_link_status
will be made when it's started.

This means that connecting and disconnecting in this mode won't trigger
disconnect timer. When other, app creates regular connection and then
disconnects, the physical connection might get disconnected.

Opportunistic connection is used only for code setting CCC right now.

Bug: 30186455
Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e

7 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 15:16:48 +0000 (08:16 -0700)]
GATT: don't update link status for apps that were never connected

Right now, in GATT_Deregister we make a call to
gatt_update_app_use_link_flag, which might result in a call to
GATT_SetIddleTimeout on links that this client was never connected to.

In order to fix that, we must check if gatt_update_app_hold_link_status
made any changes to p_tcb->app_hold_link. If not, then skip updating
the timer.

Bug: 30186455
Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a

7 years agotest_vendor: Allow includes from bt_hci_defs am: a11e1c1b71 am: ee0c32d010
Myles Watson [Tue, 23 Aug 2016 01:23:52 +0000 (01:23 +0000)]
test_vendor: Allow includes from bt_hci_defs am: a11e1c1b71 am: ee0c32d010
am: 66ec15f793

Change-Id: Ic5669a07d495e3c71f2dab69025e3ea1268cc747

7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true am: bde45bd653 am...
Pavlin Radoslavov [Tue, 23 Aug 2016 01:23:51 +0000 (01:23 +0000)]
Removed BTA_AV_INCLUDED conditional guard which is always true am: bde45bd653 am: fb8d7890a1
am: b345a8f568

Change-Id: Ifd623c4a0f070414999e453ae6d17cdc31683d90

7 years agotest_vendor: Allow includes from bt_hci_defs am: a11e1c1b71
Myles Watson [Tue, 23 Aug 2016 01:17:30 +0000 (01:17 +0000)]
test_vendor: Allow includes from bt_hci_defs am: a11e1c1b71
am: ee0c32d010

Change-Id: Ic41e9fc0f1ce86bcb7cd9dee5594bac9db664c60

7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true am: bde45bd653
Pavlin Radoslavov [Tue, 23 Aug 2016 01:17:26 +0000 (01:17 +0000)]
Removed BTA_AV_INCLUDED conditional guard which is always true am: bde45bd653
am: fb8d7890a1

Change-Id: Ib05380ae4ecfa4150db9811af051cb754e710302

7 years agotest_vendor: Allow includes from bt_hci_defs
Myles Watson [Tue, 23 Aug 2016 01:10:54 +0000 (01:10 +0000)]
test_vendor: Allow includes from bt_hci_defs
am: a11e1c1b71

Change-Id: Ie3494281cda35263f0b0a259eef045541aba3585

7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true
Pavlin Radoslavov [Tue, 23 Aug 2016 01:10:53 +0000 (01:10 +0000)]
Removed BTA_AV_INCLUDED conditional guard which is always true
am: bde45bd653

Change-Id: I3e3775b77c304fa5d440fc841bb6c76efbe3ef89

7 years agotest_vendor: Allow includes from bt_hci_defs
Myles Watson [Mon, 13 Jun 2016 19:46:38 +0000 (12:46 -0700)]
test_vendor: Allow includes from bt_hci_defs

Avoid duplicating header files for BT constants.

Update Android.mk to search $(BT_DIR)/include and
$(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)

Change-Id: I1403724c1cf9cda8156a5b65cf55da8178bd910f
Signed-off-by: Myles Watson <mylesgw@google.com>
7 years agoRemoved BTA_AV_INCLUDED conditional guard which is always true
Pavlin Radoslavov [Mon, 22 Aug 2016 21:49:11 +0000 (14:49 -0700)]
Removed BTA_AV_INCLUDED conditional guard which is always true

Change-Id: Idf7063359600b30c007fbde89dde55ef987c0368

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video" am: e80e75b4a5...
Pavlin Radoslavov [Mon, 22 Aug 2016 19:50:22 +0000 (19:50 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video" am: e80e75b4a5 am: 216f5e3b0a
am: 4cbced3bd4

Change-Id: I4061522c6b61c7490ede4eed14553850b01065b8

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video" am: e80e75b4a5
Pavlin Radoslavov [Mon, 22 Aug 2016 19:46:26 +0000 (19:46 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video" am: e80e75b4a5
am: 216f5e3b0a

Change-Id: Id7d258e5c897b28605ed8bf41358204efef168ca

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video"
Pavlin Radoslavov [Mon, 22 Aug 2016 19:42:31 +0000 (19:42 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video"
am: e80e75b4a5

Change-Id: I877e15663150975a102adf692e68e1d27cfc56b8

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event() am: febb1515f9 am: 144b5e7934
Pavlin Radoslavov [Mon, 22 Aug 2016 19:38:22 +0000 (19:38 +0000)]
Expose function audio_a2dp_hw_dump_ctrl_event() am: febb1515f9 am: 144b5e7934
am: eef306f051

Change-Id: If61a656bb60e89fc3dfa1eec49abb80b131625f1

7 years agoMerge "Removed unused code related to Audio, A2DP Sink and Video"
Treehugger Robot [Mon, 22 Aug 2016 19:36:45 +0000 (19:36 +0000)]
Merge "Removed unused code related to Audio, A2DP Sink and Video"

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event() am: febb1515f9
Pavlin Radoslavov [Mon, 22 Aug 2016 19:34:21 +0000 (19:34 +0000)]
Expose function audio_a2dp_hw_dump_ctrl_event() am: febb1515f9
am: 144b5e7934

Change-Id: I96807b9393df5f51a5854dcc2fbfe655fe61e185

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event()
Pavlin Radoslavov [Mon, 22 Aug 2016 19:30:29 +0000 (19:30 +0000)]
Expose function audio_a2dp_hw_dump_ctrl_event()
am: febb1515f9

Change-Id: Ifbaade2d4edb6792e328dc37ae21bd0ac5f24560

7 years agoExpose function audio_a2dp_hw_dump_ctrl_event()
Pavlin Radoslavov [Fri, 19 Aug 2016 22:04:18 +0000 (15:04 -0700)]
Expose function audio_a2dp_hw_dump_ctrl_event()

Renamed function dump_a2dp_ctrl_event() to
audio_a2dp_hw_dump_ctrl_event() and expose it, so it can be used
by outside code to print events.

Change-Id: Ibd9d3171c7d5256f80101ecc1563b472b7f5e92d

7 years agoRemoved unused code related to Audio, A2DP Sink and Video
Pavlin Radoslavov [Sat, 20 Aug 2016 00:46:19 +0000 (17:46 -0700)]
Removed unused code related to Audio, A2DP Sink and Video

* Function BTA_AvEnable_Sink() - never used
  - Event BTA_AV_API_SINK_ENABLE_EVT
  - Processing function bta_av_api_sink_enable()
  - AVDT_SINK_Activate() and AVDT_SINK_Deactivate() : not used anymore

* A2DP SINK related functions that are only declared:
  - btif_queue_focus_request()
  - audio_focus_status()

* Audio-related function that is never used:
  - bta_av_sbc_cfg_for_cap()

* Video-related functions that are only declared:
  - bta_av_co_video_src_data_path()
  - bta_av_co_video_setconfig()
  - bta_av_co_video_open()
  - bta_av_co_video_close()
  - bta_av_co_video_start()
  - bta_av_co_video_report_conn()
  - bta_av_co_video_report_rr()
  - bta_av_co_video_delay()
  - bta_av_co_video_disc_res()
  - bta_av_co_video_getconfig()
  - bta_av_co_video_stop()

Change-Id: I0c0c80578ab2675d2fe23dea3f11b2a0d82283f0

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses" am: d3e8a45884...
Ajay Panicker [Sat, 20 Aug 2016 03:06:16 +0000 (03:06 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses" am: d3e8a45884 am: 34895efd54
am: 74e6988cea

Change-Id: I1cd562f7c006fa2ebae003b79fc1a5b914350a39

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses" am: d3e8a45884
Ajay Panicker [Sat, 20 Aug 2016 03:03:16 +0000 (03:03 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses" am: d3e8a45884
am: 34895efd54

Change-Id: Ieeddca189aa91cdf9f10d1a194865babe94529a8

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses"
Ajay Panicker [Sat, 20 Aug 2016 03:00:12 +0000 (03:00 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses"
am: d3e8a45884

Change-Id: I0c8c22beb6c899cf97ccd87744c8fb27964d0f32

7 years agoMerge "Implement the AVRCP "continue" and "abort continue" responses"
Treehugger Robot [Sat, 20 Aug 2016 02:54:13 +0000 (02:54 +0000)]
Merge "Implement the AVRCP "continue" and "abort continue" responses"

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests" am: 2637d3cd9d...
Pavlin Radoslavov [Sat, 20 Aug 2016 01:03:58 +0000 (01:03 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests" am: 2637d3cd9d am: a94784862f
am: 22795bd35e

Change-Id: I1bd031167db91e3cd5cbdc5dd112361cf3f96e8f

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests" am: 2637d3cd9d
Pavlin Radoslavov [Sat, 20 Aug 2016 01:00:08 +0000 (01:00 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests" am: 2637d3cd9d
am: a94784862f

Change-Id: Ib5e084595e0027246b056d5120ebdff1582c5010

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests"
Pavlin Radoslavov [Sat, 20 Aug 2016 00:57:02 +0000 (00:57 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests"
am: 2637d3cd9d

Change-Id: Icb7fbbe31234c26efb21166b3ed91e03b07177fd

7 years agoMerge "Added new function time_get_os_boottime_us() and unit tests"
Treehugger Robot [Sat, 20 Aug 2016 00:48:38 +0000 (00:48 +0000)]
Merge "Added new function time_get_os_boottime_us() and unit tests"

7 years agoAdded new function fixed_queue_flush() and the unit test am: 3335cf4e87 am: 8e66aa9afd
Pavlin Radoslavov [Sat, 20 Aug 2016 00:21:24 +0000 (00:21 +0000)]
Added new function fixed_queue_flush() and the unit test am: 3335cf4e87 am: 8e66aa9afd
am: 4b27ad3e51

Change-Id: I1982f28ecd6bb25ef14187a86dc95fe722eb7b3f

7 years agoAdded new function fixed_queue_flush() and the unit test am: 3335cf4e87
Pavlin Radoslavov [Sat, 20 Aug 2016 00:17:40 +0000 (00:17 +0000)]
Added new function fixed_queue_flush() and the unit test am: 3335cf4e87
am: 8e66aa9afd

Change-Id: I45bf486b7eaee0379a7e829a09122c20c811d132

7 years agoAdded new function fixed_queue_flush() and the unit test
Pavlin Radoslavov [Sat, 20 Aug 2016 00:14:35 +0000 (00:14 +0000)]
Added new function fixed_queue_flush() and the unit test
am: 3335cf4e87

Change-Id: I69e145c2e2c4afda6ab0c16c5cf3c9e097b8a8e7

7 years agoAdded new function fixed_queue_flush() and the unit test
Pavlin Radoslavov [Fri, 19 Aug 2016 22:32:30 +0000 (15:32 -0700)]
Added new function fixed_queue_flush() and the unit test

Change-Id: Ic90e3ffdcaea9573b135bd26ef102a1740fb2d3d

7 years agoMerge "GATT: don't update link status for apps that were never connected" into nyc...
Jakub Pawlowski [Sat, 20 Aug 2016 00:03:38 +0000 (00:03 +0000)]
Merge "GATT: don't update link status for apps that were never connected" into nyc-mr1-dev am: fdab496066
am: e09f72982b

Change-Id: I14ec033ed1e86c3011b0d7dd69b5336eb4205ca5

7 years agoresolve merge conflicts of e6f74e0 to nyc-mr1-dev-plus-aosp
Andre Eisenbach [Fri, 19 Aug 2016 23:50:51 +0000 (16:50 -0700)]
resolve merge conflicts of e6f74e0 to nyc-mr1-dev-plus-aosp

Change-Id: Id2ddc93e4a3c49221f3e1420ad1acb3091662d05

7 years agoAdded new function time_get_os_boottime_us() and unit tests
Pavlin Radoslavov [Fri, 19 Aug 2016 23:01:18 +0000 (16:01 -0700)]
Added new function time_get_os_boottime_us() and unit tests

Also, re-implement existing function time_get_os_boottime_ms()
by using the new function time_get_os_boottime_us()

Change-Id: I5c6ba3d04b04c96e0a415b2be1050ef05cb04585

7 years agoMerge "resolve merge conflicts of 8547681 to nyc-mr1-dev-plus-aosp" into nyc-mr1...
TreeHugger Robot [Fri, 19 Aug 2016 23:01:03 +0000 (23:01 +0000)]
Merge "resolve merge conflicts of 8547681 to nyc-mr1-dev-plus-aosp" into nyc-mr1-dev-plus-aosp

7 years agoresolve merge conflicts of 8547681 to nyc-mr1-dev-plus-aosp
Andre Eisenbach [Fri, 19 Aug 2016 22:54:18 +0000 (15:54 -0700)]
resolve merge conflicts of 8547681 to nyc-mr1-dev-plus-aosp

Change-Id: I692c5f9e57dd53370377a9d926b905a6c8c2276d

7 years agoAdd a socket unit test for the async_manager am: d4f80ae7ca am: cd15f9e39f
Myles Watson [Fri, 19 Aug 2016 22:36:47 +0000 (22:36 +0000)]
Add a socket unit test for the async_manager am: d4f80ae7ca am: cd15f9e39f
am: 2451b9213d

Change-Id: I3fef0aa206002e0d8fbaed94443cd0f9242f973f

7 years agoAdd a socket unit test for the async_manager am: d4f80ae7ca
Myles Watson [Fri, 19 Aug 2016 22:33:17 +0000 (22:33 +0000)]
Add a socket unit test for the async_manager am: d4f80ae7ca
am: cd15f9e39f

Change-Id: Ib14df22a31244d0cbf066c9760ab603a3fa77175

7 years agoAdd a socket unit test for the async_manager
Myles Watson [Fri, 19 Aug 2016 22:29:24 +0000 (22:29 +0000)]
Add a socket unit test for the async_manager
am: d4f80ae7ca

Change-Id: I646c3271fc61d656908c5c75d609e7bd2b7c3265

7 years agoAdd a socket unit test for the async_manager
Myles Watson [Fri, 19 Aug 2016 15:22:42 +0000 (15:22 +0000)]
Add a socket unit test for the async_manager

This reverts commit 10986700c302f79376894ebef9f2ec92a65b8b08.
Which reverted commit 1387d4330da52034af67d1dbc61b870e8f89c820.

Some minor style changes as well.

Change-Id: I83ea40b4cf96adfa58c24d0cd9109ed9974519f1

7 years agoImplement the AVRCP "continue" and "abort continue" responses
Ajay Panicker [Tue, 16 Aug 2016 20:02:40 +0000 (13:02 -0700)]
Implement the AVRCP "continue" and "abort continue" responses

Test: TestTracker/58842/5473
Bug: 30571638
Change-Id: I3bb1a0171e220b6e59b6b739259f98519a31aa27
(cherry picked from commit 3282d12818a0e660a5f3f4295bac55aa8e8d27b4)

7 years agoMerge "GATT: don't update link status for apps that were never connected" into nyc...
Jakub Pawlowski [Fri, 19 Aug 2016 13:27:30 +0000 (13:27 +0000)]
Merge "GATT: don't update link status for apps that were never connected" into nyc-mr1-dev
am: fdab496066

Change-Id: I176b02758b89cec3e0af685bc1d6a51cc4e22584

7 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Fri, 19 Aug 2016 13:27:30 +0000 (13:27 +0000)]
GATT: don't update link status for apps that were never connected
am: d921c78fc6

Change-Id: I35b5cd7df92916044b69c9b191978ccd207ee6d4

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Fri, 19 Aug 2016 13:27:29 +0000 (13:27 +0000)]
Make gatt_attr use opportunistic connection
am: 8ed030ff4a

Change-Id: I7f9926fa32daaf286de667b9faf8ef92f81d43f2

7 years agoMerge "GATT: don't update link status for apps that were never connected" into nyc...
TreeHugger Robot [Fri, 19 Aug 2016 06:15:04 +0000 (06:15 +0000)]
Merge "GATT: don't update link status for apps that were never connected" into nyc-mr1-dev

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message" am: b8b761e...
JivakDhadse [Thu, 18 Aug 2016 21:45:47 +0000 (21:45 +0000)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message" am: b8b761e722  -s ours am: 56ffbe1e05  -s ours
am: 5a79cd3d2f

Change-Id: I41b7ed0d039826cd96ea2e5002da71cbb6b216d9

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message" am: b8b761e...
JivakDhadse [Thu, 18 Aug 2016 21:41:43 +0000 (21:41 +0000)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message" am: b8b761e722  -s ours
am: 56ffbe1e05  -s ours

Change-Id: I3cb383410c18d4473ea2be1c55db30c27cd35844

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message"
JivakDhadse [Thu, 18 Aug 2016 21:38:47 +0000 (21:38 +0000)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"
am: b8b761e722  -s ours

Change-Id: Ieae60a1a48dac361e5efb9acfd9f549d620ece57

7 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 15:16:48 +0000 (08:16 -0700)]
GATT: don't update link status for apps that were never connected

Right now, in GATT_Deregister we make a call to
gatt_update_app_use_link_flag, which might result in a call to
GATT_SetIddleTimeout on links that this client was never connected to.

In order to fix that, we must check if gatt_update_app_hold_link_status
made any changes to p_tcb->app_hold_link. If not, then skip updating
the timer.

Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Mon, 18 Jul 2016 16:06:49 +0000 (09:06 -0700)]
Make gatt_attr use opportunistic connection

This patch creates new connection mode - opportunistic connection. When
such connection is made, no call to gatt_update_app_hold_link_status
will be made when it's started.

This means that connecting and disconnecting in this mode won't trigger
disconnect timer. When other, app creates regular connection and then
disconnects, the physical connection might get disconnected.

Opportunistic connection is used only for code setting CCC right now.

Bug: 30186455
Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e

7 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message"
JivakDhadse [Fri, 7 Aug 2015 13:28:38 +0000 (18:58 +0530)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"

This reverts commit 2ed10d442266eade44be121cd24fd473c85007d0.

Original change needs to be reverted to align with Errata
ESR04 where "Section 8.17, General Reject Page 71" of adopted
AvDTP Spec is changed to have "Invalid Signal Identifier"
in first 6 bits of Octet 1.
This change helps passing PTS case TP/SIG/SMG/ESR04/BI-28-C

Bug: 27852645
Change-Id: I9deba6821284f0cb1423d543550786cc76a61a33
(cherry picked from commit 825cd49864f7338be8b33f901ddf3be8e1bab7c1)

7 years agoAdded cancelling for fd watching on async manager am: b2bbe93c1b am: 9b15fa887a
Jorge E. Moreira [Thu, 18 Aug 2016 19:46:34 +0000 (19:46 +0000)]
Added cancelling for fd watching on async manager am: b2bbe93c1b am: 9b15fa887a
am: 850e520319

Change-Id: Iff3fed6c14e3d41e769cd0e0f1e6593a4b615e53

7 years agoAdded cancelling for fd watching on async manager am: b2bbe93c1b
Jorge E. Moreira [Thu, 18 Aug 2016 19:43:34 +0000 (19:43 +0000)]
Added cancelling for fd watching on async manager am: b2bbe93c1b
am: 9b15fa887a

Change-Id: I49f09facf9e7ed59518a1eadba3292670f4de8ea

7 years agoAdded cancelling for fd watching on async manager
Jorge E. Moreira [Thu, 18 Aug 2016 19:40:37 +0000 (19:40 +0000)]
Added cancelling for fd watching on async manager
am: b2bbe93c1b

Change-Id: I621620b800f0bec0df0ec0b07bc4beb384482de3

7 years agoAdded cancelling for fd watching on async manager
Jorge E. Moreira [Tue, 16 Aug 2016 18:55:27 +0000 (11:55 -0700)]
Added cancelling for fd watching on async manager

Change-Id: I4107b3b50345f81833c47c85c4a322a582973bb2

7 years agoRevert "Added unit test for async_manager with sockets" am: 10986700c3 am: d8179f363a
Myles Watson [Thu, 18 Aug 2016 16:34:52 +0000 (16:34 +0000)]
Revert "Added unit test for async_manager with sockets" am: 10986700c3 am: d8179f363a
am: 73f71a5b83

Change-Id: Ibc8c627cc0127fcd52df22e6c98a9a61654ab144

7 years agoRevert "Added unit test for async_manager with sockets" am: 10986700c3
Myles Watson [Thu, 18 Aug 2016 16:31:52 +0000 (16:31 +0000)]
Revert "Added unit test for async_manager with sockets" am: 10986700c3
am: d8179f363a

Change-Id: Ie04d5905706bf428e99a083b974cf97383f34bb6

7 years agoRevert "Added unit test for async_manager with sockets"
Myles Watson [Thu, 18 Aug 2016 16:28:54 +0000 (16:28 +0000)]
Revert "Added unit test for async_manager with sockets"
am: 10986700c3

Change-Id: I3b8264f5b4124dda166cafdce61ac0c941e18710

7 years agoRevert "Added unit test for async_manager with sockets"
Myles Watson [Thu, 18 Aug 2016 16:22:01 +0000 (16:22 +0000)]
Revert "Added unit test for async_manager with sockets"

This reverts commit 1387d4330da52034af67d1dbc61b870e8f89c820.

Change-Id: I4af4e0d5ac5a108f3de44d186db97592a70c729e

7 years agoAdded unit test for async_manager with sockets am: 1387d4330d am: 8021195db5
Jorge E. Moreira [Thu, 18 Aug 2016 15:43:18 +0000 (15:43 +0000)]
Added unit test for async_manager with sockets am: 1387d4330d am: 8021195db5
am: 1ab705f78e

Change-Id: I99314b4dfa2d36e113e05309b0b59d73368aca93

7 years agoAdded unit test for async_manager with sockets am: 1387d4330d
Jorge E. Moreira [Thu, 18 Aug 2016 15:40:18 +0000 (15:40 +0000)]
Added unit test for async_manager with sockets am: 1387d4330d
am: 8021195db5

Change-Id: Ie3fc649eb845d07a46e10b256244bc909c4f9220

7 years agoAdded unit test for async_manager with sockets
Jorge E. Moreira [Thu, 18 Aug 2016 15:37:51 +0000 (15:37 +0000)]
Added unit test for async_manager with sockets
am: 1387d4330d

Change-Id: I4ccdc7e14b81e2bdc7862764b49f4d2dd4044d04

7 years agoAdded unit test for async_manager with sockets
Jorge E. Moreira [Wed, 17 Aug 2016 20:53:00 +0000 (13:53 -0700)]
Added unit test for async_manager with sockets

Change-Id: I8d31f766722e4b4a6c6fe00e30a957ac43176cf1

7 years agoFix clang-tidy warnings in bt. am: 5dc0d15e78 am: 1c47f8e5b4
Chih-Hung Hsieh [Thu, 18 Aug 2016 02:02:58 +0000 (02:02 +0000)]
Fix clang-tidy warnings in bt. am: 5dc0d15e78 am: 1c47f8e5b4
am: d50820533f

Change-Id: I89ebc60adf956d67e32a298670563b6b5b96cef3

7 years agoFix clang-tidy warnings in bt. am: 5dc0d15e78
Chih-Hung Hsieh [Thu, 18 Aug 2016 01:59:58 +0000 (01:59 +0000)]
Fix clang-tidy warnings in bt. am: 5dc0d15e78
am: 1c47f8e5b4

Change-Id: I49d1bd55af0be71253c1f451c15639c4cf43d4d6

7 years agoFix clang-tidy warnings in bt.
Chih-Hung Hsieh [Thu, 18 Aug 2016 01:57:01 +0000 (01:57 +0000)]
Fix clang-tidy warnings in bt.
am: 5dc0d15e78

Change-Id: I217b7399aa9294ca3fe47bc862aebe83343037c0

7 years agoFix clang-tidy warnings in bt.
Chih-Hung Hsieh [Wed, 17 Aug 2016 21:12:51 +0000 (14:12 -0700)]
Fix clang-tidy warnings in bt.

* Add explicit keyword to conversion constructors,
  or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters,
  or add NOLINT to keep same callback function signature.
Bug: 30407689
* Use const reference type for loop index variables to avoid unnecessary copy.
Bug: 30413223
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I8237d332f32d7be09ab72a8de82160fdb776dcd1

7 years agoFix incorrect fd used for select() call in vendor lib async_manager am: 7225e499e8...
Jorge E. Moreira [Thu, 18 Aug 2016 00:18:13 +0000 (00:18 +0000)]
Fix incorrect fd used for select() call in vendor lib async_manager am: 7225e499e8 am: af070f1141
am: 9befe1dba4

Change-Id: I282f530b28fc3e6b8e6317d56dbe2ace78fa0527

7 years agoFix incorrect fd used for select() call in vendor lib async_manager am: 7225e499e8
Jorge E. Moreira [Thu, 18 Aug 2016 00:15:12 +0000 (00:15 +0000)]
Fix incorrect fd used for select() call in vendor lib async_manager am: 7225e499e8
am: af070f1141

Change-Id: Id56d05a6d64895786cd1fd54409bc195249172d0

7 years agoFix incorrect fd used for select() call in vendor lib async_manager
Jorge E. Moreira [Thu, 18 Aug 2016 00:12:14 +0000 (00:12 +0000)]
Fix incorrect fd used for select() call in vendor lib async_manager
am: 7225e499e8

Change-Id: Icfc520b04919ab57b7a7a3b36435e05842a62f39

7 years agoFix incorrect fd used for select() call in vendor lib async_manager
Jorge E. Moreira [Wed, 17 Aug 2016 20:59:15 +0000 (13:59 -0700)]
Fix incorrect fd used for select() call in vendor lib async_manager

Change-Id: Iabb8389ee6fcef0f9c6a17838d6a3a9a517befc6

7 years agoMake gatt_attr use opportunistic connection am: 109891d07f am: 135e7d693b
Jakub Pawlowski [Wed, 17 Aug 2016 16:17:47 +0000 (16:17 +0000)]
Make gatt_attr use opportunistic connection am: 109891d07f am: 135e7d693b
am: 604d9e48d8

Change-Id: Ic01aa894ffef2ae06ff2b91322825c4b3350f757

7 years agoMake gatt_attr use opportunistic connection am: 109891d07f
Jakub Pawlowski [Wed, 17 Aug 2016 16:15:47 +0000 (16:15 +0000)]
Make gatt_attr use opportunistic connection am: 109891d07f
am: 135e7d693b

Change-Id: I63407418dcb55451c8eeb8d1534b8fb42a21d5cb

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Wed, 17 Aug 2016 16:11:50 +0000 (16:11 +0000)]
Make gatt_attr use opportunistic connection
am: 109891d07f

Change-Id: I432143bb5149619e2ec223b84e03f3280f1182c1

7 years agoMake gatt_attr use opportunistic connection
Jakub Pawlowski [Mon, 18 Jul 2016 16:06:49 +0000 (09:06 -0700)]
Make gatt_attr use opportunistic connection

This patch creates new connection mode - opportunistic connection. When
such connection is made, no call to gatt_update_app_hold_link_status
will be made when it's started.

This means that connecting and disconnecting in this mode won't trigger
disconnect timer. When other, app creates regular connection and then
disconnects, the physical connection might get disconnected.

Opportunistic connection is used only for code setting CCC right now.

Bug: 30186455
Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e

7 years agoMerge "Synchronize the code with AOSP" into stage-aosp-master am: fd172619d1
Pavlin Radoslavov [Wed, 17 Aug 2016 04:21:33 +0000 (04:21 +0000)]
Merge "Synchronize the code with AOSP" into stage-aosp-master am: fd172619d1
am: 8ad8a54833

Change-Id: Ic3369e861ae81863b1b7454be0705e8278742151

7 years agoSynchronize the code with AOSP am: 5d712cfde6
Pavlin Radoslavov [Wed, 17 Aug 2016 04:21:32 +0000 (04:21 +0000)]
Synchronize the code with AOSP am: 5d712cfde6
am: 8dd79539ae

Change-Id: Ibcedd89828ca63b9aaa8233226fa1ccd600f7f32

7 years agoMerge "Synchronize the code with AOSP" into stage-aosp-master
Pavlin Radoslavov [Wed, 17 Aug 2016 04:20:09 +0000 (04:20 +0000)]
Merge "Synchronize the code with AOSP" into stage-aosp-master
am: fd172619d1

Change-Id: Ib0b748006eb4a0f6f748a4d0807ac140efca4c11

7 years agoSynchronize the code with AOSP
Pavlin Radoslavov [Wed, 17 Aug 2016 04:20:08 +0000 (04:20 +0000)]
Synchronize the code with AOSP
am: 5d712cfde6

Change-Id: I47e0c1d5518c7bf799cd527abfc5bf20bfba9e7f

7 years agoMerge "Synchronize the code with AOSP" into stage-aosp-master
TreeHugger Robot [Wed, 17 Aug 2016 04:15:14 +0000 (04:15 +0000)]
Merge "Synchronize the code with AOSP" into stage-aosp-master

7 years agoMerge "Synchronize the code with AOSP" into nyc-mr1-dev-plus-aosp
TreeHugger Robot [Wed, 17 Aug 2016 04:15:14 +0000 (04:15 +0000)]
Merge "Synchronize the code with AOSP" into nyc-mr1-dev-plus-aosp

7 years agoSynchronize the code with the internal tree am: 55f82cd30f am: 8f4fb98c7e
Pavlin Radoslavov [Wed, 17 Aug 2016 04:10:31 +0000 (04:10 +0000)]
Synchronize the code with the internal tree am: 55f82cd30f am: 8f4fb98c7e
am: db92f4d323

Change-Id: I92c6f954eddbf7170483045ba67ae054302df14b

7 years agoSynchronize the code with the internal tree am: 55f82cd30f
Pavlin Radoslavov [Wed, 17 Aug 2016 04:09:09 +0000 (04:09 +0000)]
Synchronize the code with the internal tree am: 55f82cd30f
am: 8f4fb98c7e

Change-Id: Ida73caa1f443b8f5d32a49e884e8aa1623f7684d

7 years agoSynchronize the code with the internal tree
Pavlin Radoslavov [Wed, 17 Aug 2016 04:05:32 +0000 (04:05 +0000)]
Synchronize the code with the internal tree
am: 55f82cd30f

Change-Id: I0e7041e39efad3e51638091e1f9e9b24b8a4176c

7 years agoRandomize allocation canary am: 4980fab05c
Marie Janssen [Wed, 17 Aug 2016 03:57:04 +0000 (03:57 +0000)]
Randomize allocation canary am: 4980fab05c
am: 74132bf9f4

Change-Id: I58ba08ef437134260bde913354c5ed3aa0cc04a2

7 years agoRandomize allocation canary
Marie Janssen [Wed, 17 Aug 2016 03:54:00 +0000 (03:54 +0000)]
Randomize allocation canary
am: 4980fab05c

Change-Id: Id70d37e6c62b393b02bae32743e2acc20334341d

7 years agoRandomize allocation canary
Marie Janssen [Fri, 4 Mar 2016 01:50:26 +0000 (17:50 -0800)]
Randomize allocation canary

A static allocation canary can be susceptible to buffer overflow
exploit code bypassing, so this randomizes it on every run.

Bug: 27411268
Change-Id: I81b06f89951a012c08d846042653ec957f3e9127
(cherry picked from commit 7c054350fb7da9da1fdb86e7f7b9a801cf1c39e4)

7 years agoSynchronize the code with AOSP
Pavlin Radoslavov [Wed, 17 Aug 2016 02:52:49 +0000 (19:52 -0700)]
Synchronize the code with AOSP

Minor spacing fixes.

Change-Id: Id29171cea320265ede96520feb39fc8929bbaddc

7 years agoSynchronize the code with the internal tree
Pavlin Radoslavov [Wed, 17 Aug 2016 02:42:16 +0000 (19:42 -0700)]
Synchronize the code with the internal tree

Spacing, line split, etc.

Change-Id: I781e771e93b104bbc044d1646106c19d8af55e7b

7 years agoSynchronize the code with AOSP
Pavlin Radoslavov [Wed, 17 Aug 2016 02:35:51 +0000 (19:35 -0700)]
Synchronize the code with AOSP

Minor edits - spacing, etc.

Change-Id: I172d64585e82c23789fbad17e7366bbc55a9e50d