public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/client: Set default handsfree mode for host
Date: Mon, 28 Jul 2014 12:46:23 +0200	[thread overview]
Message-ID: <1625661.E497b1LD2C@uw000953> (raw)
In-Reply-To: <1406201574-11891-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

On Thursday 24 of July 2014 14:32:54 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> For testing set default handsfree mode to HF
> ---
>  android/cutils/properties.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/android/cutils/properties.h b/android/cutils/properties.h
> index ef40f01..8b3d84d 100644
> --- a/android/cutils/properties.h
> +++ b/android/cutils/properties.h
> @@ -31,6 +31,7 @@
>  #define PROPERTY_VALUE_MAX 32
>  
>  #define BLUETOOTH_MODE_PROPERTY_NAME "persist.sys.bluetooth.mode"
> +#define BLUETOOTH_MODE_PROPERTY_HANDSFREE "persist.sys.bluetooth.handsfree"
>  
>  static inline int property_get(const char *key, char *value,
>  						const char *default_value)
> @@ -40,6 +41,9 @@ static inline int property_get(const char *key, char *value,
>  	if (!strcmp(key, BLUETOOTH_MODE_PROPERTY_NAME))
>  		prop = getenv("BLUETOOTH_MODE");
>  
> +	if (!strcmp(key, BLUETOOTH_MODE_PROPERTY_HANDSFREE))
> +		prop = "hfp";

I'd prefer to not have this hardcoded. So please use getenv() for getting
handsfree mode (similar to what is now with bluetooth mode).

This will allow for easy testing of all configurations on Linux host.

> +
>  	if (!prop)
>  		prop = default_value;
>  
> 

-- 
Best regards, 
Szymon Janc

      reply	other threads:[~2014-07-28 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 11:32 [PATCH] android/client: Set default handsfree mode for host Andrei Emeltchenko
2014-07-28 10:46 ` Szymon Janc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1625661.E497b1LD2C@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=Andrei.Emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox