OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agoaudio/sink: Remove shutdown parameter from sink_disconnect
Luiz Augusto von Dentz [Mon, 18 Nov 2013 11:50:14 +0000 (13:50 +0200)]
audio/sink: Remove shutdown parameter from sink_disconnect

This parameter is always false so it never do anything.

10 years agoaudio/source: Remove shutdown parameter from source_disconnect
Luiz Augusto von Dentz [Mon, 18 Nov 2013 11:50:13 +0000 (13:50 +0200)]
audio/source: Remove shutdown parameter from source_disconnect

This parameter is always false so it never do anything.

10 years agoaudio/AVDTP: Remove public function that are only used locally
Luiz Augusto von Dentz [Mon, 18 Nov 2013 11:50:12 +0000 (13:50 +0200)]
audio/AVDTP: Remove public function that are only used locally

10 years agoaudio/AVDTP: Remove unused code
Luiz Augusto von Dentz [Mon, 18 Nov 2013 11:50:11 +0000 (13:50 +0200)]
audio/AVDTP: Remove unused code

10 years agoandroid/a2dp: Use NULL for zero pointer
Andrei Emeltchenko [Mon, 18 Nov 2013 10:49:35 +0000 (12:49 +0200)]
android/a2dp: Use NULL for zero pointer

10 years agoandroid/socket: Use static local adapter address
Andrei Emeltchenko [Mon, 18 Nov 2013 08:26:05 +0000 (10:26 +0200)]
android/socket: Use static local adapter address

10 years agoandroid/hal-sock: Add debug flag printing
Andrei Emeltchenko [Mon, 18 Nov 2013 08:26:04 +0000 (10:26 +0200)]
android/hal-sock: Add debug flag printing

10 years agoandroid: Refactor update_found_device function
Szymon Janc [Sat, 16 Nov 2013 14:09:46 +0000 (15:09 +0100)]
android: Refactor update_found_device function

This makes function flow easier to follow and understand. Besides that
it also fix issue with sending to many bytes if some prop were not
present in EIR.

10 years agoandroid: Fix sending invalid remote device property event
Szymon Janc [Sat, 16 Nov 2013 14:09:45 +0000 (15:09 +0100)]
android: Fix sending invalid remote device property event

Remote device property event has variable length, pass whole event
length to ipc_send, not only header.

10 years agoandroid: Fix sending remote device property if name is not present
Szymon Janc [Sat, 16 Nov 2013 14:09:44 +0000 (15:09 +0100)]
android: Fix sending remote device property if name is not present

This fix missing bdaddr to string convertion if name was NULL. This
was resulting in using undefined dst value.

10 years agoRelease 5.11
Marcel Holtmann [Fri, 15 Nov 2013 23:07:36 +0000 (15:07 -0800)]
Release 5.11

10 years agobuild: Update library version
Marcel Holtmann [Fri, 15 Nov 2013 22:53:53 +0000 (14:53 -0800)]
build: Update library version

10 years agolib: Update company identifiers
Marcel Holtmann [Fri, 15 Nov 2013 22:52:53 +0000 (14:52 -0800)]
lib: Update company identifiers

10 years agoandroid: Change TODO with explaining comment
Lukasz Rymanowski [Fri, 15 Nov 2013 18:04:01 +0000 (19:04 +0100)]
android: Change TODO with explaining comment

10 years agoandroid: Update bond state on auth and connect failed
Lukasz Rymanowski [Fri, 15 Nov 2013 18:04:00 +0000 (19:04 +0100)]
android: Update bond state on auth and connect failed

10 years agoandroid: Cache device name on device list.
Lukasz Rymanowski [Fri, 15 Nov 2013 18:03:59 +0000 (19:03 +0100)]
android: Cache device name on device list.

10 years agoandroid: Update bond state on incoming bonding
Lukasz Rymanowski [Fri, 15 Nov 2013 18:03:58 +0000 (19:03 +0100)]
android: Update bond state on incoming bonding

Before sending any ssp request or pin code request up to HAL library we
need to send bond state change with bonding state. Otherwise incoming
bonding is not correctly handled by Bluetooth.apk.
In this patch also device list has been added in order to e.g track
bonding state.

Note: For incoming paring (security mode 3) there is a  need to send
HAL_EVE_REMOTE_DEVICE_PROPS before HAL_EV_PIN_REQUEST.
It is because Android will crash due to bug in pinRequestCallback
function in java. Android checks if device is already in HashMap and if
not then creates  device, but forget to use that one, but instead do
operations on NULL. By sending HAL_BOND_STATE_BONDING event it works
better but we have race issue. It is because new device is added to
HashMap not in callback context but later after BONDING msg will be
received  by BondStateMachine. If it happens before pin_request_cb hits
java then we are fine, otherwise not. So for that reason we send
HAL_EV_REMOTE_DEVICE_PROPS so in the java handler class new device will
be added to HashMap in the  callback context.

In ssp case we don't have this problem as we send device found once acl
is created.

10 years agoandroid: Fix not storing adapter index in index added event
Szymon Janc [Fri, 15 Nov 2013 12:16:47 +0000 (13:16 +0100)]
android: Fix not storing adapter index in index added event

If controller was addded after daemon start its index was not stored
resulting in mgmt commands to be always send to MGMT_INDEX_NONE index.

10 years agoandroid/hal-ipc: Add pan notification call to hal-ipc dispatch handler
Ravi kumar Veeramally [Fri, 15 Nov 2013 09:59:25 +0000 (11:59 +0200)]
android/hal-ipc: Add pan notification call to hal-ipc dispatch handler

10 years agoandroid/pan: Fix wrong HAL service id
Ravi kumar Veeramally [Fri, 15 Nov 2013 09:59:24 +0000 (11:59 +0200)]
android/pan: Fix wrong HAL service id

10 years agoandroid/a2dp: Add implementation of SDP record
Luiz Augusto von Dentz [Thu, 14 Nov 2013 15:01:28 +0000 (17:01 +0200)]
android/a2dp: Add implementation of SDP record

This adds the following record:

Service Name: Audio Source
Service RecHandle: 0x10001
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x103
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0103

10 years agoandroid/build: Remove unnecessary mentions of source files in EXTRA_DIST
Johan Hedberg [Thu, 14 Nov 2013 13:57:27 +0000 (15:57 +0200)]
android/build: Remove unnecessary mentions of source files in EXTRA_DIST

10 years agoandroid/build: Add missing header files to android_haltest_SOURCES
Johan Hedberg [Thu, 14 Nov 2013 13:56:51 +0000 (15:56 +0200)]
android/build: Add missing header files to android_haltest_SOURCES

10 years agoandroid: Rename bluetooth service functions to match service name
Szymon Janc [Tue, 12 Nov 2013 23:48:20 +0000 (23:48 +0000)]
android: Rename bluetooth service functions to match service name

Make public functions match service name.

10 years agoandroid: Rename adapter.c to bluetooth.c
Szymon Janc [Thu, 14 Nov 2013 12:56:50 +0000 (13:56 +0100)]
android: Rename adapter.c to bluetooth.c

Match service name that is implemened in that file. This will also
keep convention of foo.c and hal-foo.c implementing remote parts of
same service.

10 years agoandroid: Remove not needed bt_adapter_get_address function
Szymon Janc [Tue, 12 Nov 2013 23:48:18 +0000 (23:48 +0000)]
android: Remove not needed bt_adapter_get_address function

All services receive adapter address on init so there is no need for
this function. Removing it will also help keeping services not depend
on adapter service.

10 years agoandroid: Report adapter address in adapter_ready callback
Szymon Janc [Tue, 12 Nov 2013 23:48:17 +0000 (23:48 +0000)]
android: Report adapter address in adapter_ready callback

Adapter is not going to change while daemon is running so its address
can be stored after init is complete.

10 years agoandroid/hidhost: Use adapter address provided on register
Szymon Janc [Tue, 12 Nov 2013 23:48:16 +0000 (23:48 +0000)]
android/hidhost: Use adapter address provided on register

There is no need to use bt_adapter_get_address every time local address
is needed.

10 years agoandroid: Don't use static pointer for storing adapter_ready callback
Szymon Janc [Tue, 12 Nov 2013 23:48:15 +0000 (23:48 +0000)]
android: Don't use static pointer for storing adapter_ready callback

There is no need to keep ready callback for daemon lifetime as it is
not used after reporting adapter being ready. Use mgmt library feature
for passing user data so that static pointer is not needed.

10 years agoandroid: Move adapter initialization to adapter.c
Szymon Janc [Tue, 12 Nov 2013 23:48:14 +0000 (23:48 +0000)]
android: Move adapter initialization to adapter.c

There is no need to handle that in main.c. Also this removes mgmt
interface dependency from adapter API as all mgmt commands are handled
from adapter code.

Startup and shutdown timeouts handling is left in main.c.

10 years agoandroid: Make adapter static
Szymon Janc [Tue, 12 Nov 2013 23:48:13 +0000 (23:48 +0000)]
android: Make adapter static

Only one controller is used so there is no need to keep it as allocable
structure. This will also make memory management simpler and more
correct eg. adapter was never free.

Elements not directly related to adapter are kept outside of adapter
structure.

10 years agocore: Do not change service state in btd_service_connect if it fails
Luiz Augusto von Dentz [Thu, 14 Nov 2013 12:27:51 +0000 (14:27 +0200)]
core: Do not change service state in btd_service_connect if it fails

If .connect fails and the service state changes it may re-enter
connect_next, inverting the order and messing up the error of each
connect request.

10 years agoandroid/a2dp: Add initial implementation of HAL_OP_A2DP_DISCONNECT
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:21 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of HAL_OP_A2DP_DISCONNECT

10 years agoandroid/a2dp: Add initial implementation of HAL_OP_A2DP_CONNECT
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:20 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of HAL_OP_A2DP_CONNECT

10 years agoandroid/a2dp: Add initial implementation of socket handling
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:19 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of socket handling

This adds initial code to handle incoming connection and notifying
connection states.

10 years agoandroid/hal-a2dp: Add defines for possible connection states
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:18 +0000 (12:18 +0200)]
android/hal-a2dp: Add defines for possible connection states

10 years agoandroid/hal-a2dp: Add implemention of .cleanup
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:17 +0000 (12:18 +0200)]
android/hal-a2dp: Add implemention of .cleanup

10 years agoandroid/hal-a2dp: Add implemention of .init
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:16 +0000 (12:18 +0200)]
android/hal-a2dp: Add implemention of .init

10 years agoandroid/hal-a2dp: Use conn_state instead of connection_state
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:15 +0000 (12:18 +0200)]
android/hal-a2dp: Use conn_state instead of connection_state

This is shorter and more consistent with other HAL such as HID.

10 years agoandroid/debug: Move debug functions to hal-utils.c
Andrei Emeltchenko [Thu, 14 Nov 2013 07:14:36 +0000 (09:14 +0200)]
android/debug: Move debug functions to hal-utils.c

Debug functions will be used by HALs and haltest.

10 years agoandroid: Core service should be always registered
Szymon Janc [Wed, 13 Nov 2013 14:47:13 +0000 (15:47 +0100)]
android: Core service should be always registered

Core service is used to register other services and shall be always
consider registered.

10 years agoandroid: Shutdown if IPC command for unregistered service is received
Szymon Janc [Wed, 13 Nov 2013 14:47:12 +0000 (15:47 +0100)]
android: Shutdown if IPC command for unregistered service is received

Sending commands to not registered services is violation of IPC spec
and should result in daemon shutdown.

10 years agoaudio/A2DP: Return -ENOPROTOOPT if record doesn't exist
Luiz Augusto von Dentz [Wed, 13 Nov 2013 13:26:36 +0000 (15:26 +0200)]
audio/A2DP: Return -ENOPROTOOPT if record doesn't exist

In case record is not registered it means no endpoint is available so
return -ENOPROTOOPT to indicate that it is currently not available.

10 years agoandroid/hidhost: Use correct error structure
Andrei Emeltchenko [Wed, 13 Nov 2013 14:29:34 +0000 (16:29 +0200)]
android/hidhost: Use correct error structure

10 years agoandroid/hidhost: Fix memory leak
Andrei Emeltchenko [Wed, 13 Nov 2013 14:29:33 +0000 (16:29 +0200)]
android/hidhost: Fix memory leak

10 years agoandroid/pan: Handle connection and control state notifications
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:27 +0000 (11:25 +0200)]
android/pan: Handle connection and control state notifications

10 years agoandroid/pan: Add notify method to PAN notifications
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:26 +0000 (11:25 +0200)]
android/pan: Add notify method to PAN notifications

10 years agoandroid: Fix opcode parameter type from uint16_t to uint8_t
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:25 +0000 (11:25 +0200)]
android: Fix opcode parameter type from uint16_t to uint8_t

10 years agoandroid/hidhost: Set info request from HAL is not supported
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:15 +0000 (17:07 +0200)]
android/hidhost: Set info request from HAL is not supported

Data from hal_cmd_hidhost_set_info is usefull only when we create
UHID device. Once device is created all the transactions will be
done through the fd. There is no way to use this information
once device is created with HID internals.

10 years agoandroid/hidhost: Remove deprecated idle opcode from ipc document
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:14 +0000 (17:07 +0200)]
android/hidhost: Remove deprecated idle opcode from ipc document

Idle time is deprecated in HID_SPEC1_1. So get and set idle time api's
are removed and not implemented. But callback is left out in Android
bt_hh.h. Generally this callback needs to be called when HAL requests
get and set idle time calls with status. So the method calls itself
removed, no point to implement this callback.
Also update GET_REPORT and VIRTUAL_UNPLUG opcode values.

10 years agoandroid/hidhost: Handle uhid output and feature events
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:13 +0000 (17:07 +0200)]
android/hidhost: Handle uhid output and feature events

Data read on uhid events output and feature has to be send through
SET_REPORT request to HID device.

10 years agoandroid/pan: Add PAN cleanup interface implementation
Ravi kumar Veeramally [Tue, 12 Nov 2013 14:20:40 +0000 (16:20 +0200)]
android/pan: Add PAN cleanup interface implementation

10 years agoandroid/pan: Add PAN related defines and event struct to hsl-msg header
Ravi kumar Veeramally [Tue, 12 Nov 2013 14:20:39 +0000 (16:20 +0200)]
android/pan: Add PAN related defines and event struct to hsl-msg header

10 years agoandroid: Register DeviceID record when adapter is initialized
Szymon Janc [Tue, 12 Nov 2013 15:36:26 +0000 (16:36 +0100)]
android: Register DeviceID record when adapter is initialized

Register DeviceID SDP record and update local UUIDs after DeviceID
information is passed to kernel.

10 years agoandroid: Add support for getting UUIDs property
Marcin Kraglak [Tue, 12 Nov 2013 15:36:25 +0000 (16:36 +0100)]
android: Add support for getting UUIDs property

This method will call adapter_properties_cb with uuids of
adapter. Method is called also when uuid is added or removed.

10 years agoandroid: Clear adapter uuids during initialization
Marcin Kraglak [Tue, 12 Nov 2013 15:36:24 +0000 (16:36 +0100)]
android: Clear adapter uuids during initialization

Clear adapter uuids during init. We have to do it before
other profiles will be able to register sdp records and add
their uuids.

10 years agoandroid: Remove not needed include
Szymon Janc [Tue, 12 Nov 2013 15:36:23 +0000 (16:36 +0100)]
android: Remove not needed include

bt_uuid_t is not used so lib/uuid.h doesn't need to be included.

10 years agoandroid: Add and remove sdp records and uuids
Marcin Kraglak [Tue, 12 Nov 2013 15:36:22 +0000 (16:36 +0100)]
android: Add and remove sdp records and uuids

This is api for adding and removing sdp records and uuids
via mgmt interface. Local profiles have to store handle to
own records to remove them in cleanup. Additionally list of
uuids is created in bt_adapter struct.

10 years agocore: Do not attempt to connect if adapter is not powered
Luiz Augusto von Dentz [Tue, 12 Nov 2013 14:32:29 +0000 (16:32 +0200)]
core: Do not attempt to connect if adapter is not powered

If the adapter is not yet powered do not attempt to connect, also
abort any connection attempt in case of error -EHOSTUNREACH is returned
by the kernel which also means the adapter is not up or in case of
-ECONNABORTED which means the adapter was powered down during the
connection attempt.

10 years agoandroid/hidhost: Fix error handling issue incase of G_IO_HUP
Ravi kumar Veeramally [Tue, 12 Nov 2013 13:05:15 +0000 (15:05 +0200)]
android/hidhost: Fix error handling issue incase of G_IO_HUP

Incase of G_IO_HUP on GIOCondtion when hid device disconnected,
GIOCondition is combination of G_IO_IN and G_IO_HUP. Current code
tries to read as soon as it finds G_IO_IN in condition.
Apparently there is no data to read and loop continues.

10 years agoandroid/hidhost: Fix uhid create failure case
Ravi kumar Veeramally [Tue, 12 Nov 2013 09:47:19 +0000 (11:47 +0200)]
android/hidhost: Fix uhid create failure case

If uhid open or create fails then notify state and free the device.
Otherwise it replies bogus success return value on connect request.

10 years agoandroid: Update HAL with device info on incoming connection
Lukasz Rymanowski [Tue, 12 Nov 2013 12:51:39 +0000 (13:51 +0100)]
android: Update HAL with device info on incoming connection

Make sure Android have information about connecting remote device. This
is needed for example to show device name on incoming bonding request.

10 years agocore: Rename attio_error_cb to avoid conflicts with error()
Johan Hedberg [Tue, 12 Nov 2013 08:56:41 +0000 (10:56 +0200)]
core: Rename attio_error_cb to avoid conflicts with error()

In case error() gets converted to a macro having a function pointer
variable with the same name is going to cause trouble.

10 years agoobex: Use user's cache dir as a default root
Bastien Nocera [Sun, 10 Nov 2013 14:24:20 +0000 (15:24 +0100)]
obex: Use user's cache dir as a default root

It's per-user, so we won't try to overwrite somebody else's
files in /tmp when that happens. It's also (unless we have a
particularly bizarre setup) on the same partition as the destination
folder which means we can atomically move the file to the destination
with a unique filename.

10 years agoaudio/AVDTP: Remove avdtp_init and avdtp_exit
Luiz Augusto von Dentz [Mon, 11 Nov 2013 16:17:55 +0000 (18:17 +0200)]
audio/AVDTP: Remove avdtp_init and avdtp_exit

This is now done on demand by avdtp_register_sep and avdtp_unregister_sep
so the server socket is only registered when there is an endpoint
available and the record is properly registered.

10 years agogdbus: Fix trying to remove already removed sources
Bastien Nocera [Sat, 9 Nov 2013 17:02:57 +0000 (18:02 +0100)]
gdbus: Fix trying to remove already removed sources

When we return FALSE from idle handlers, the source is removed.
This will be causing warnings in glib 2.40.

See https://bugzilla.gnome.org/show_bug.cgi?id=710724

10 years agoandroid/hid: Handle virtual unplug event from hid device
Ravi kumar Veeramally [Fri, 8 Nov 2013 14:14:54 +0000 (16:14 +0200)]
android/hid: Handle virtual unplug event from hid device

If hid host receives the virtual unplug event from hid device
recipient shall destroy or invalidate all bluetooth bonding and
virtual cable information

10 years agoandroid/hal-utils: Make hal-utils functions return const string
Andrei Emeltchenko [Fri, 8 Nov 2013 14:08:50 +0000 (16:08 +0200)]
android/hal-utils: Make hal-utils functions return const string

10 years agoandroi/haltest: Make debug functions return const string
Andrei Emeltchenko [Fri, 8 Nov 2013 14:08:49 +0000 (16:08 +0200)]
androi/haltest: Make debug functions return const string

10 years agoandroid: Fix error handling in adapter_ready
Szymon Janc [Fri, 8 Nov 2013 14:00:59 +0000 (15:00 +0100)]
android: Fix error handling in adapter_ready

On error negative value is passed to adapter_ready callback. This fix
passing negative error code to strerror.

10 years agoandroid/hal-sock: Add UUID debug print in socket HAL
Andrei Emeltchenko [Fri, 8 Nov 2013 13:16:01 +0000 (15:16 +0200)]
android/hal-sock: Add UUID debug print in socket HAL

Socket HAL uses uint8_t * strings which are of size bt_uuid_t.

10 years agoandroid/debug: Convert uuid helper to use uint8_t buffer
Andrei Emeltchenko [Fri, 8 Nov 2013 13:53:29 +0000 (15:53 +0200)]
android/debug: Convert uuid helper to use uint8_t buffer

At this moment Android uses uint8_t * and bt_uuid_t for representing
UUID for different HALs. Convert debug helper to use uint8_t * string.

10 years agoandroid/hidhost: Fix up error logs to contain exact error
Johan Hedberg [Fri, 8 Nov 2013 13:46:31 +0000 (15:46 +0200)]
android/hidhost: Fix up error logs to contain exact error

10 years agoandroid: Create debug hal-utils helpers
Andrei Emeltchenko [Fri, 8 Nov 2013 13:15:59 +0000 (15:15 +0200)]
android: Create debug hal-utils helpers

Create hal-utils helpers which helps to decode packets Android
sends through HAL interface.

10 years agoandroid/hid: Add virtual unplug implemention in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:51 +0000 (14:08 +0200)]
android/hid: Add virtual unplug implemention in daemon

Send virtual unplug command to hid device and disconnect and remove
hid device details.

10 years agoandroid/hid: Add send data implemention in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:50 +0000 (14:08 +0200)]
android/hid: Add send data implemention in daemon

Send data on interrupt channel on request from hid host.

10 years agoandroid/hid: Fill send data command struct in hal-hidhost
Ravi kumar Veeramally [Fri, 8 Nov 2013 13:23:04 +0000 (15:23 +0200)]
android/hid: Fill send data command struct in hal-hidhost

10 years agoandroid/hid: Fix set report data format in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:48 +0000 (14:08 +0200)]
android/hid: Fix set report data format in daemon

Report data coming to HAL is in ascii format, HAL sends
data in hex to daemon, so convert to binary.

10 years agoandroid/hid: Fill send data command struct in hal-hidhost
Ravi kumar Veeramally [Fri, 8 Nov 2013 13:23:03 +0000 (15:23 +0200)]
android/hid: Fill send data command struct in hal-hidhost

10 years agoandroid/client: Add ssp key confirmation helper
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:30 +0000 (13:48 +0100)]
android/client: Add ssp key confirmation helper

This patch adds handling of ssp_request_cb that prints prompt
asking user if pass key matches. User does not need to type:
bluetooth ssp_reply address BT_SSP_VARIANT_PASSKEY_CONFIRMATION 1 key

10 years agoandroid/client: Add pin handling for bind
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:29 +0000 (13:48 +0100)]
android/client: Add pin handling for bind

This patch ask user for ping in pin_request_cb, which does
what otherwise would be required to manually type
bluetooth pin_reply address pin.

10 years agoandroid/client: Add prompting for answer
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:28 +0000 (13:48 +0100)]
android/client: Add prompting for answer

This patch allows to switch to prompt mode where user will be asked
to supply some information.

10 years agoandroid/client: Split terminal_process_char
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:27 +0000 (13:48 +0100)]
android/client: Split terminal_process_char

This patch changes the way input characters are handled in function
terminal_process_char from big switch statement to smaller functions.
No functionality is changed in this patch.
Splitting to smaller functions will make easier to change behaviour
of terminal for prompt handling when user will be asked for something
and history substitution or auto completion will not be used.

10 years agoandroid/client: Add command line arguments
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:26 +0000 (13:48 +0100)]
android/client: Add command line arguments

This patch adds command line argument parsing.
Options added:
 -h, --help
 -n, --no-init - disable initialization of interfaces
     --version

10 years agoandroid/client: Initialize all interfaces at start
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:25 +0000 (13:48 +0100)]
android/client: Initialize all interfaces at start

Patch adds function that initializes all HAL interfaces.

10 years agoandroid/client: Add NELEM macro for count elements
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:24 +0000 (13:48 +0100)]
android/client: Add NELEM macro for count elements

NELEM macro will be used in several places.

10 years agoandroid/client: Export get_interface_method
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:23 +0000 (13:48 +0100)]
android/client: Export get_interface_method

This method will be used outside tab completion.c.

10 years agoandroid: Fix PAN service registration
Marcin Kraglak [Fri, 8 Nov 2013 09:51:48 +0000 (10:51 +0100)]
android: Fix PAN service registration

A2DP service was registered instead of PAN.

10 years agoandroid/hid: Rename virtual unplug define and struct
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:16 +0000 (00:10 +0200)]
android/hid: Rename virtual unplug define and struct

Renaming virtual unplug define and strcut name from VP to more
meaning full.

10 years agoandroid/ipc: Fix crash when sending file descriptor
Andrei Emeltchenko [Thu, 7 Nov 2013 15:25:35 +0000 (17:25 +0200)]
android/ipc: Fix crash when sending file descriptor

Since CMSG_FIRSTHDR is defined as shown below:

  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)

it return NULL if msg_controllen is not defined. Accessing
that pointer result in daemon crash.

10 years agogitignore: Add tools/smp-tester to .gitignore
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:25:41 +0000 (00:25 +0200)]
gitignore: Add tools/smp-tester to .gitignore

10 years agoandroid/hid: Handle virtual unplug notification in HID HAL
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:18 +0000 (00:10 +0200)]
android/hid: Handle virtual unplug notification in HID HAL

10 years agoandroid/hid: Add hid event virtual unplug structure to HAL msg headers
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:17 +0000 (00:10 +0200)]
android/hid: Add hid event virtual unplug structure to HAL msg headers

10 years agoandroid/hid: Add missing parameters in send data struct in HAL headers
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:14 +0000 (00:10 +0200)]
android/hid: Add missing parameters in send data struct in HAL headers

10 years agoandroid/hid: Add missing hid send data parameters in ipc document
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:13 +0000 (00:10 +0200)]
android/hid: Add missing hid send data parameters in ipc document

10 years agoandroid/hid: Remove fixed number of hid set report data length in ipc doc
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:10 +0000 (00:10 +0200)]
android/hid: Remove fixed number of hid set report data length in ipc doc

HAL receives data in ascii format but it should be in hex format. So remove
fixed size of report data length and depend on report length parameter.

10 years agoandroid: Remove unnecessary allocations of fixed-size buffers
Johan Hedberg [Thu, 7 Nov 2013 20:39:26 +0000 (22:39 +0200)]
android: Remove unnecessary allocations of fixed-size buffers

10 years agoandroid: Fix sending remote device name property
Jakub Tyszkowski [Thu, 7 Nov 2013 09:31:50 +0000 (10:31 +0100)]
android: Fix sending remote device name property

Android use the full string returned even if terminated with '\0'.

10 years agoandroid: Remove redundant command complete callback
Jakub Tyszkowski [Thu, 7 Nov 2013 09:31:49 +0000 (10:31 +0100)]
android: Remove redundant command complete callback

This patch removes command complete callback used only for verbose error
reporting.

10 years agoandroid/hal: Use hidhost instead of hh in hidhost HAL
Szymon Janc [Thu, 7 Nov 2013 16:17:04 +0000 (17:17 +0100)]
android/hal: Use hidhost instead of hh in hidhost HAL

Match functions names to HAL name. Where not needed hh prefix is
removed.