summaryrefslogtreecommitdiff
path: root/android/main.c
Commit message (Collapse)AuthorAgeFilesLines
* android: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- Apache-2.0 : 80 LGPL-2.1-or-later : 42 GPL-2.0-or-later : 9 License: Apache-2.0 android/bluetoothd-wrapper.c android/tester-hidhost.c android/tester-map-client.c android/hal-audio-aptx.c android/hal-audio.c android/hal-handsfree-client.c android/tester-gatt.c android/hal-pan.c android/hal-socket.c android/tester-hdp.c android/tester-pan.c android/tester-avrcp.c android/hal-a2dp-sink.c android/hal-gatt.c android/hal-avrcp.c android/tester-a2dp.c android/hal-audio.h android/hal-bluetooth.c android/tester-socket.c android/hal-health.c android/hal-a2dp.c android/hal-ipc.c android/hal-avrcp-ctrl.c android/hal-sco.c android/hal-ipc.h android/tester-main.c android/hal-audio-sbc.c android/hal-utils.c android/hal-map-client.c android/hal-handsfree.c android/hal-log.h android/hal.h android/hal-utils.h android/tester-bluetooth.c android/hal-hidhost.c android/audio_utils/resampler.h android/audio_utils/resampler.c android/system/audio.h android/hardware/bt_sock.h android/hardware/bt_gatt_client.h android/hardware/bt_hh.h android/hardware/bluetooth.h android/hardware/hardware.h android/hardware/bt_hf_client.h android/hardware/bt_rc.h android/hardware/bt_hf.h android/hardware/bt_pan.h android/hardware/bt_gatt_types.h android/hardware/hardware.c android/hardware/audio_effect.h android/hardware/audio.h android/hardware/bt_gatt_server.h android/hardware/bt_gatt.h android/hardware/bt_hl.h android/hardware/bt_mce.h android/hardware/bt_av.h android/client/if-hh.c android/client/if-sco.c android/client/pollhandler.h android/client/haltest.c android/client/tabcompletion.c android/client/if-hf-client.c android/client/history.h android/client/if-audio.c android/client/terminal.h android/client/if-av.c android/client/if-main.h android/client/if-av-sink.c android/client/terminal.c android/client/if-mce.c android/client/if-hf.c android/client/pollhandler.c android/client/if-sock.c android/client/if-rc-ctrl.c android/client/if-rc.c android/client/history.c android/client/if-pan.c android/client/if-gatt.c android/client/if-bt.c android/client/if-hl.c License: LGPL-2.1-or-later android/sco.h android/socket.c android/tester-main.h android/hidhost.h android/map-client.h android/utils.h android/hal-msg.h android/health.h android/avrcp-lib.c android/bluetoothd-snoop.c android/a2dp.c android/bluetooth.h android/a2dp-sink.c android/handsfree-client.c android/audio-msg.h android/main.c android/pan.c android/ipc-tester.c android/health.c android/socket.h android/handsfree.h android/avrcp-lib.h android/a2dp-sink.h android/system-emulator.c android/gatt.c android/avrcp.h android/pan.h android/test-ipc.c android/hidhost.c android/a2dp.h android/avrcp.c android/sco-msg.h android/bluetooth.c android/map-client.c android/handsfree-client.h android/ipc.c android/handsfree.c android/gatt.h android/ipc.h android/ipc-common.h android/compat/wordexp.h android/cutils/properties.h License: GPL-2.0-or-later android/avdtp.h android/avctp.c android/avdtptest.c android/sco.c android/log.c android/avdtp.c android/avctp.h android/compat/readline/history.h android/compat/readline/readline.h
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* android: Fix local libbluetooth includes orderMarcel Holtmann2015-02-281-2/+3
|
* android: Make shutdown timeout shorterSzymon Janc2015-01-131-1/+1
| | | | | | Android L is using 8 seconds for both enable and disable timeouts. Set daemon shutdown timeout to 5 seconds to make sure we fit into framework timeout in case things go wrong.
* android/handsfree: Add support for new API for handsfree initAndrei Emeltchenko2014-11-061-1/+2
| | | | Add max_client parameter to IPC following new parameter for HF init().
* android/map-client: Add initial filesGrzegorz Kolodziejczyk2014-10-201-0/+12
| | | | This adds initial daemon code for MAP client profile.
* android/core: Fix memory leak in parse_system_id()Andrei Emeltchenko2014-10-021-1/+3
| | | | get_prop() allocates memory which needs to be freed.
* android: Add support for FW and HW revision config optionsSzymon Janc2014-10-021-0/+24
|
* android: Remove few not needed blank linesSzymon Janc2014-10-021-10/+0
|
* android: Add support for more configuration optionsSzymon Janc2014-10-021-0/+119
| | | | This adds support for system ID, serial number and PnP ID options.
* android/core: Fix extra assignmentAndrei Emeltchenko2014-09-261-1/+0
| | | | | | | | | prop is assigned in the beginning of for() loop. Fixes warning: ... android/main.c:336:3: warning: Value stored to 'prop' is never read prop = buf; ^ ~~~ ...
* android: Use common watch for start and shutdown timeoutsSzymon Janc2014-09-231-11/+12
| | | | | Both start and shutdown timeouts use same callback function. This also fix not removing watch on daemon shutdown.
* android: Fix not clearing up start timeout watchSzymon Janc2014-09-231-0/+3
| | | | | | | | If start failed due to no adapter being ready before timeout fired invalid watch was removed on shutdown resulting in: (bluetoothd:17083): GLib-CRITICAL **: Source ID 2 was not found when attempting to remove it
* android: Add debug prints with configure optionsSzymon Janc2014-09-231-0/+9
|
* android: Add functions for getting configuration optionsSzymon Janc2014-09-221-0/+29
|
* android: Add support for configuration commandSzymon Janc2014-09-221-0/+73
|
* android: Factor out service unregister to helperSzymon Janc2014-09-181-52/+21
|
* android/handsfree-client: Add handsfree-client daemon skeletonLukasz Rymanowski2014-09-181-0/+11
|
* android: Unregister bluetooth as last serviceSzymon Janc2014-09-031-1/+1
| | | | | Other services might depend on bluetooth while performing cleanup tasks so it should be unregistered as last one.
* android: Don't depend on libcap when building for LinuxSzymon Janc2014-08-221-0/+2
| | | | Those are used only when building for Android target.
* android: Fix header includeAndrei Emeltchenko2014-08-221-3/+1
| | | | | | | | | | | Since Android KitKat we can use sys/prctl.h and sys/capability.h as specified in the manual page. Fixes also build warnings: ... warning: implicit declaration of function 'prctl' [-Wimplicit-function-declaration] if (prctl(PR_SET_KEEPCAPS, 1) < 0) { ^ ...
* android: Make multi-line comments style consistentSzymon Janc2014-04-291-4/+8
| | | | | Use common style for multi-line comments consistent with rest of codebase.
* android/bluetooth: Make possible to start BlueZ in a single modeLukasz Rymanowski2014-04-241-1/+4
| | | | | This patch adds possibility to start BlueZ in LE or BR/EDR mode when having dual mode chip below.
* android: Fix not unregistering last profileJakub Tyszkowski2014-04-181-1/+1
|
* android: Fix NULL pointer dereferenceMarcin Kraglak2014-03-311-2/+5
| | | | | | | | | | If there is no adapter, hal_ipc in not initialized. Below is message from valgrind: ==22501== Invalid read of size 4 ==22501== at 0x805B809: ipc_unregister (ipc.c:421) ==22501== by 0x804AEAF: main (main.c:548) ==22501== Address 0x4 is not stack'd, malloc'd or (recently) free'd
* android: Fix some random code style issuesSzymon Janc2014-03-201-1/+1
| | | | Fix whitespace problems and not needed empty lines.
* android/health: Add health.c|h file with basic callsRavi kumar Veeramally2014-03-141-0/+14
| | | | Add health.c|h with basic calls for register and unregister profile.
* android: Enable mgmt debug logsLukasz Rymanowski2014-03-101-2/+6
| | | | | | | This patch introduce possibility to enable mgmt interface logs. In order to enable it is required to set property: persist.sys.bluetooth.mgmtdbg to 1 or literaly "true". More info in README
* android: Add possible to enable BlueZ debug logsLukasz Rymanowski2014-03-101-1/+7
| | | | | | | With this patch it is possible to enable BlueZ logs. In order to enable it is required to set property: persist.sys.bluetooth.debug to 1 or literaly "true". More info in README
* android: Pass mode parameter to registered servicesSzymon Janc2014-03-041-7/+7
|
* android/gatt: Add initial filesGrzegorz Kolodziejczyk2014-03-031-0/+14
| | | | This adds initial daemon code for GATT profile.
* android: Fix not cleaup AVRCP serviceLuiz Augusto von Dentz2014-03-021-0/+3
| | | | | | | | | | | | | | This causes the following leak: 744 (72 direct, 672 indirect) bytes in 1 blocks are definitely lost in loss record 114 of 119 at 0x4C291D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FEC6: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x41C2ED: avrcp_new (avrcp-lib.c:203) by 0x41B4F8: connect_cb (avrcp.c:708) by 0x4212AB: connect_cb (btio.c:232) by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x403A54: main (main.c:490)
* android: Create comon header for IPCSzymon Janc2014-02-281-0/+1
| | | | | | | | | This header contains IPC specific structures and code not related to BT and audio HAL protocols. This allows to fully decouple IPC from HAL messages. This is first step to make HAL part of IPC unit-testable and reusable between BT HAL and audio HAL.
* android: Add support for disabling notifications in IPCSzymon Janc2014-02-281-1/+2
|
* android: Add support for registering disconnect callback in IPCSzymon Janc2014-02-281-1/+6
| | | | | | Allow to register callback which is called in case of IPC failure (eg malformed message) or disconnection. This makes caller responsible for performing expected action in such case.
* android: Refactor IPC initSzymon Janc2014-02-281-16/+25
| | | | | This allows to pass socket path and max service ID while initializaing IPC. This is first step to allow use it both for BT and Audio HALs.
* android: Update socket service id name to match service nameSzymon Janc2014-02-241-3/+3
|
* android: Update copyright and license detailsMarcel Holtmann2014-02-111-10/+10
|
* android/handsfree: Add initial filesSzymon Janc2014-02-051-0/+14
| | | | This adds initial HAL and daemon code for Handsfree profile.
* android: Add initial skeleton for AVRCP in the daemonLuiz Augusto von Dentz2014-01-261-0/+11
|
* android: Use src/log.h include instead of just log.hMarcel Holtmann2014-01-261-1/+1
|
* android: Change user to bluetooth when starting daemonSzymon Janc2014-01-171-0/+13
|
* android: Fix host build if libcap headers are not presentSzymon Janc2014-01-141-0/+2
|
* android: Remove support for old Android versionsSzymon Janc2014-01-141-6/+1
| | | | | | This removes compatibility with Android 4.3 and older. Android 4.4 is current target. Due to bug in Audio HAL in 4.2 build was failing on that version anyway.
* android: Use G_N_ELEMENTS macro for table elements calculationSzymon Janc2013-12-031-1/+1
| | | | | It is more common in codebase to use this macro instead of opencoded (sizeof(foo)/sizeof(foo[0])).
* android: Move sockets handling from main to IPC codeSzymon Janc2013-12-031-149/+2
| | | | | This moves IO handling to IPC code making it fully responsible for creating and veryfing IPC messages exchange.
* android/main: Use common exit path in core service functionsSzymon Janc2013-12-021-15/+25
| | | | This makes functions exit path simpler.
* android/main: Use generic IPC message handling for core serviceSzymon Janc2013-12-021-67/+16
| | | | Handlers are registered on daemon start and unregistered on shutdown.
* android: Add reasons for adding capabilites to processRavi kumar Veeramally2013-11-291-0/+3
| | | | | | CAP_NET_ADMIN: Allow use of MGMT interface CAP_NET_BIND_SERVICE: Allow use of privileged PSM CAP_NET_RAW: Allow use of bnep ioctl calls
* android/main: Call unregister for all registered services on exitAndrei Emeltchenko2013-11-291-0/+34
|