OSDN Git Service

android-x86/packages-apps-Bluetooth.git
11 years agoam e2039454: Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into...
Zhihai Xu [Tue, 27 Nov 2012 20:09:19 +0000 (12:09 -0800)]
am e2039454: Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev

* commit 'e203945454e23b2fd31ad278f7d374e1e1ccf2db':
  Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing

11 years agoMerge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev
Zhihai Xu [Tue, 27 Nov 2012 20:05:16 +0000 (12:05 -0800)]
Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev

11 years agoCode to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing
Zhihai Xu [Sun, 18 Nov 2012 10:05:46 +0000 (02:05 -0800)]
Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing

add +XEVENT vendor specific command handler in processUnknownAt

bug 7564004

Change-Id: I78847553700b2da28dbf9ca8f9d0509f5f3fa924

11 years agoam 4daa2db1: Merge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent...
Zhihai Xu [Tue, 13 Nov 2012 00:36:47 +0000 (16:36 -0800)]
am 4daa2db1: Merge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users" into jb-mr1.1-dev

* commit '4daa2db107f17fa8e8dfe35003924c69566bccb6':
  need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users

11 years agoam cb7b1a54: Fixed potention ANR issue with Bluetooth OPP share.
Fred [Tue, 13 Nov 2012 00:36:47 +0000 (16:36 -0800)]
am cb7b1a54: Fixed potention ANR issue with Bluetooth OPP share.

* commit 'cb7b1a54ae3ce309210824099253a916a04d350b':
  Fixed potention ANR issue with Bluetooth OPP share.

11 years agoMerge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users...
Zhihai Xu [Tue, 13 Nov 2012 00:32:11 +0000 (16:32 -0800)]
Merge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users" into jb-mr1.1-dev

11 years agoneed to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users
Zhihai Xu [Mon, 12 Nov 2012 23:28:58 +0000 (15:28 -0800)]
need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users

We need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users
because bluetooth manager service use this intent to change name.
Bluetooth manager service is always running as User 0. but it is always binding
to bluetooth service running at foreground user, So the bluetooth service
need send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED broadcast intent
to all users to let bluetooth manager service to receive it at any cases.

bug 7476965

Change-Id: I816786d0828d4a7d414077b1ccbe12d2e273fc75

11 years agoFixed potention ANR issue with Bluetooth OPP share.
Fred [Fri, 28 Sep 2012 22:04:14 +0000 (15:04 -0700)]
Fixed potention ANR issue with Bluetooth OPP share.

Updated BluetoothOppLauncherActivity so the call to
BluetoothOppManager.saveSendingFileInfo() runs on a child thread.
saveSendingFileInfo() opens/constructs the content stream, which
can take a long time, depending on the type of content.
It should not run inside the main UI thread of the
BluetoothOppLauncherActivity.

Bug 6802063

Change-Id: Id34b33fe37eb029d6a7592a811bbc9bbcde14ba8

11 years agoFixed potention ANR issue with Bluetooth OPP share.
Fred [Fri, 28 Sep 2012 22:04:14 +0000 (15:04 -0700)]
Fixed potention ANR issue with Bluetooth OPP share.

Updated BluetoothOppLauncherActivity so the call to
BluetoothOppManager.saveSendingFileInfo() runs on a child thread.
saveSendingFileInfo() opens/constructs the content stream, which
can take a long time, depending on the type of content.
It should not run inside the main UI thread of the
BluetoothOppLauncherActivity.

Bug 6802063

Change-Id: Id34b33fe37eb029d6a7592a811bbc9bbcde14ba8

11 years agoam 19d8d544: Temporarily add GALLERY_PROVIDER permission to fix Beam.
Martijn Coenen [Wed, 31 Oct 2012 00:44:49 +0000 (17:44 -0700)]
am 19d8d544: Temporarily add GALLERY_PROVIDER permission to fix Beam.

* commit '19d8d5447897a7f8f4ee1ac2745639e4c8c1ff8b':
  Temporarily add GALLERY_PROVIDER permission to fix Beam.

11 years agoTemporarily add GALLERY_PROVIDER permission to fix Beam.
Martijn Coenen [Tue, 30 Oct 2012 22:15:05 +0000 (15:15 -0700)]
Temporarily add GALLERY_PROVIDER permission to fix Beam.

Photo transfers incoming through Android Beam switch processes
twice (Gallery->NFC, NFC->Bluetooth), and the permission to
access to the Gallery content provider is not transferred.
As a short term solution, grant Gallery provider
permissions to Bluetooth.

Bug: 7433498
Change-Id: Id5915f4a37bec5003a42646162249a0c2c69aa48

11 years agoam ede67c26: License of files Bluetooth package is not updated to ASL2
Zhihai Xu [Wed, 24 Oct 2012 17:50:11 +0000 (10:50 -0700)]
am ede67c26: License of files Bluetooth package is not updated to ASL2

* commit 'ede67c26e7b2564ea35db6d9b3027a269c150e13':
  License of files Bluetooth package is not updated to ASL2

11 years agoLicense of files Bluetooth package is not updated to ASL2
Zhihai Xu [Wed, 24 Oct 2012 00:01:01 +0000 (17:01 -0700)]
License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I338fd87083387706f3b5f410c9592219bb8a1acb

11 years agoam bd704c74: BT connection notification in not updated in status bar for second user...
Zhihai Xu [Wed, 17 Oct 2012 20:18:13 +0000 (13:18 -0700)]
am bd704c74: BT connection notification in not updated in status bar for second user It is due to the system UI is always running as the first user. It can\'t receive broadcast intent ACTION_CONNECTION_STATE_CHANGED and ACTION_BOND_STATE_CHANGED from bluetooth service

* commit 'bd704c741b8c523ad747214f6f0520ac3e2caf8f':
  BT connection notification in not updated in status bar for second user It is due to the system UI is always running as the first user. It can't receive broadcast intent ACTION_CONNECTION_STATE_CHANGED and ACTION_BOND_STATE_CHANGED from bluetooth service when We switch to second user. Also the system UI also is running as uid 10055, which will also call function isEnabled, getState, getBondedDevices, getAdapterConnectionState and getBondState in bluetooth service. I allow these functions to be called by all the users. I forget remove check for getBondState in my first patch set

11 years agoBT connection notification in not updated in status bar for second user
Zhihai Xu [Wed, 17 Oct 2012 17:01:03 +0000 (10:01 -0700)]
BT connection notification in not updated in status bar for second user
It is due to the system UI is always running as the first user. It can't receive
broadcast intent ACTION_CONNECTION_STATE_CHANGED and ACTION_BOND_STATE_CHANGED
from bluetooth service when We switch to second user. Also the system UI also
is running as uid 10055, which will also call function isEnabled, getState,
getBondedDevices, getAdapterConnectionState and getBondState in bluetooth service.
I allow these functions to be called by all the users.
I forget remove check for getBondState in my first patch set

bug 7333382

Change-Id: I57f39a722e78d6d2453ebfecaab043637fef4d9c

11 years agoam a595fcc5: Fix crash in Bluetooth when sharing MMS video.
Jake Hamby [Tue, 16 Oct 2012 20:50:52 +0000 (13:50 -0700)]
am a595fcc5: Fix crash in Bluetooth when sharing MMS video.

* commit 'a595fcc57e7f0be9cf57913cd665dc99e4001b16':
  Fix crash in Bluetooth when sharing MMS video.

11 years agoFix crash in Bluetooth when sharing MMS video.
Jake Hamby [Tue, 16 Oct 2012 01:47:09 +0000 (18:47 -0700)]
Fix crash in Bluetooth when sharing MMS video.

Some content providers, such as MMS, don't support the DISPLAY_NAME
or SIZE columns for content URIs. Fall back to using the last segment
of the URI as the filename for Bluetooth file transfers if the query
for DISPLAY_NAME fails.

Bug: 7343310
Change-Id: Ie048c5eea3ba9994259c9e07beabd72622d6b669

11 years agoam d329befd: Merge "Bluetooth: Use proper holo alert drawable"
Adam Powell [Fri, 12 Oct 2012 19:08:14 +0000 (12:08 -0700)]
am d329befd: Merge "Bluetooth: Use proper holo alert drawable"

* commit 'd329befdd38a5c441e1a2b7e4595b7de86ac100b':
  Bluetooth: Use proper holo alert drawable

11 years agoMerge "Bluetooth: Use proper holo alert drawable"
Adam Powell [Fri, 12 Oct 2012 18:35:01 +0000 (11:35 -0700)]
Merge "Bluetooth: Use proper holo alert drawable"

11 years agoFix NREC command format error
Matthew Xie [Wed, 10 Oct 2012 22:23:11 +0000 (15:23 -0700)]
Fix NREC command format error

Add = sign before off
bug 7326510

Change-Id: Ief269f608646acaa2872679a5c649da3cf22de37

11 years agoMerge "Turn off dbg messages, be prepared for production build" into jb-mr1-dev
Matthew Xie [Wed, 10 Oct 2012 19:18:02 +0000 (12:18 -0700)]
Merge "Turn off dbg messages, be prepared for production build" into jb-mr1-dev

11 years agoMerge "Bluetooth multi-user updates: change bluetooth service to reject background...
Zhihai Xu [Wed, 10 Oct 2012 16:56:33 +0000 (09:56 -0700)]
Merge "Bluetooth multi-user updates: change bluetooth service to reject background user access." into jb-mr1-dev

11 years agoBluetooth multi-user updates: change bluetooth service
Zhihai Xu [Tue, 9 Oct 2012 01:04:32 +0000 (18:04 -0700)]
Bluetooth multi-user updates: change bluetooth service
to reject background user access.

bug 6925422

Change-Id: I11d5ebf007c2843a72a9870055fc96672daf8409

11 years agoConfig pbap_include_photots_in_vcard false as default
Matthew Xie [Tue, 9 Oct 2012 01:38:52 +0000 (18:38 -0700)]
Config pbap_include_photots_in_vcard false as default

bug 7070862

Change-Id: I7de38269e3ea451b44d9a9afd0477dedc6978987

11 years agoTurn off dbg messages, be prepared for production build
Matthew Xie [Mon, 8 Oct 2012 06:46:41 +0000 (23:46 -0700)]
Turn off dbg messages, be prepared for production build

bug 7174712

Change-Id: I58747ec6507da8ea8ae27a182b601aaf626ede42

11 years agoMake Bluetooth Services support multi user
Matthew Xie [Tue, 2 Oct 2012 04:49:48 +0000 (21:49 -0700)]
Make Bluetooth Services support multi user

Add bt_net_stack permission
bug 6925422

Change-Id: I5765a9cc770f7c48eb88bff4757b276f0cad4709

11 years agoremove the AT command separator from the CPBR range parameters
zzy [Thu, 4 Oct 2012 04:20:58 +0000 (21:20 -0700)]
remove the AT command separator from the CPBR range parameters

Root cause: Integer.parseInt(indices[0]) throw exception if char ';' at the end.

Bug 7274805

11 years agoMove socket initialization code out of pbap service's main thread
Matthew Xie [Tue, 2 Oct 2012 01:20:37 +0000 (18:20 -0700)]
Move socket initialization code out of pbap service's main thread

Socket initialization need the preparation from stack and a domain socket
connection. All this takes time and not proper to be run in the main thread.
bug 7258324

Change-Id: Ic46601602556c2949f18d446016188d874099874

11 years agoMove bluetooth priorities from Secure to Global.
Jeff Sharkey [Mon, 1 Oct 2012 19:49:31 +0000 (12:49 -0700)]
Move bluetooth priorities from Secure to Global.

Bug: 7231171
Change-Id: I39e3611dcec1104558704ed72855fef85f33c084

11 years agoAdd MODIFY_PHONE_STATE permission to access Bluetooth service in Phone app
Matthew Xie [Wed, 26 Sep 2012 07:12:26 +0000 (00:12 -0700)]
Add MODIFY_PHONE_STATE permission to access Bluetooth service in Phone app

Enforce MODIFY_PHONE_STATE permission for some HeadsetService APIs that
only provided for Phone app for phone stat change notifications
bug 7115021

Change-Id: I62e3f429f4205feb50e123ee94b4c468999804a6

11 years agoWhen pbap cleanup, stopSelfResult called twice with same service id
zzy [Tue, 11 Sep 2012 22:55:25 +0000 (15:55 -0700)]
When pbap cleanup,  stopSelfResult called twice with same service id

This seemed like to be the root casue of bug 7136940.  The thread 3564 stuck after following log:
09-10 11:24:08.882  3564  V BluetoothPbapService: Pbap Service closeService

bug 7136940

11 years agoMerge "Enable Bluetooth sharing of downloaded files." into jb-mr1-dev
John Huang [Wed, 19 Sep 2012 18:07:36 +0000 (11:07 -0700)]
Merge "Enable Bluetooth sharing of downloaded files." into jb-mr1-dev

11 years agoRevert "Reference headers in their new location"
Jean-Baptiste Queru [Tue, 18 Sep 2012 19:54:12 +0000 (12:54 -0700)]
Revert "Reference headers in their new location"

This reverts commit 7e2c121e720d9c4f7914df218c30b240662fe0b2.

11 years agoMerge "Add StateMachine make methods." into jb-mr1-dev
Wink Saville [Sun, 16 Sep 2012 16:36:30 +0000 (09:36 -0700)]
Merge "Add StateMachine make methods." into jb-mr1-dev

11 years agoReference headers in their new location
Jean-Baptiste Queru [Sat, 15 Sep 2012 16:23:28 +0000 (09:23 -0700)]
Reference headers in their new location

Change-Id: I45608fe5089492b20d09abeda624b8d32c5343e7

11 years agoAdd StateMachine make methods.
Wink Saville [Sat, 15 Sep 2012 14:59:10 +0000 (07:59 -0700)]
Add StateMachine make methods.

StateMachines must be started before any messages are sent to them
otherwise an exception is thrown.

Bug: 7091976
Change-Id: I05315d45d4d6db42843442b7feb37c665cfabcab

11 years agoEnable Bluetooth sharing of downloaded files.
Jake Hamby [Fri, 27 Jul 2012 21:38:32 +0000 (14:38 -0700)]
Enable Bluetooth sharing of downloaded files.

Change BT OPP to open the InputStreams of files to share in the
BluetoothOppLauncherActivity (or BluetoothOppHandoverReceiver
for NFC shares), while the process has grantUriPermission() on
the URI's to share.

InputStreams are saved inside the existing BluetoothOppSendFileInfo
objects, which no longer include the mDestination field because
this isn't known at the time the SendFileInfo object is now created
(before the user has chosen the destination BT device). These
objects are stored in a static ConcurrentHashMap in BluetoothOppUtility
and are removed when the file is closed (on success or failure).

If the user tries to share thousands of files in one batch, we may
not be able to open InputStreams for all of the files in the batch.
In this case, the open should fail gracefully.

Bug: 6808783
Change-Id: I3f3f86d2dc1a78a837aeb6a888f90b26434ba499

11 years agoDonot include photo in vard in pbap
Matthew Xie [Fri, 14 Sep 2012 00:38:43 +0000 (17:38 -0700)]
Donot include photo in vard in pbap

Certain carkit abort pbap transfer if vcard includes photo
bug 7070862

Change-Id: Iacd7e20901a7450599e844d1fb34923108e81bdc

11 years agofixed bt on off stress test issue
zzy [Tue, 11 Sep 2012 00:38:06 +0000 (17:38 -0700)]
fixed bt on off stress test issue

root cause: cleanup stack process overlapped with bt turning
on process sometime. The cleanup() call in adapterservice.java
need to be call from onUnbind() to synchronize the
BluetoothSererviceManager unbindandFinish() call.
bug 7083069

Change-Id: Ib4c64d7e5fc996277278471969f187bb5e915a76

11 years agoBluetooth: Use proper holo alert drawable
Björn Lundén [Sat, 16 Jun 2012 11:30:00 +0000 (13:30 +0200)]
Bluetooth: Use proper holo alert drawable

Make it use the holo drawables instead of the GB
compability drawable.

Change-Id: Ib85d89f0f3a6248d357a612afa8c0158a0876b86

11 years agoTerminate PBAP service cleanly during BT off
Kausik Sinnaswamy [Mon, 10 Sep 2012 11:41:14 +0000 (17:11 +0530)]
Terminate PBAP service cleanly during BT off

PBAP service runs in a loop of 10 trials to create the RFCOMM listener
thread; this loop is not getting interrupted during BT off, due to which
we end up delaying PBAP stop by 3 seconds (10 * 300ms). The fix is to
check for BT state after RFCOMM listener failure and break out of the
loop if BT is being turned off.
bug 7134544

Change-Id: I81d2a559857eef9138ebca662ea28f1d3e358bb8

11 years agoRevert "Terminate PBAP service cleanly during BT off"
Matthew Xie [Mon, 10 Sep 2012 21:10:59 +0000 (14:10 -0700)]
Revert "Terminate PBAP service cleanly during BT off"

This reverts commit f5d88a7b8659bb9ce49edc4faea6bf56f2158572

Change-Id: I67a4950831dce7392d63edad6f693abcc69d2ffe

11 years agoTerminate PBAP service cleanly during BT off
Kausik Sinnaswamy [Mon, 10 Sep 2012 11:41:14 +0000 (17:11 +0530)]
Terminate PBAP service cleanly during BT off

PBAP service runs in a loop of 10 trials to create the RFCOMM listener
thread; this loop is not getting interrupted during BT off, due to which
we end up delaying PBAP stop by 3 seconds (10 * 300ms). The fix is to
check for BT state after RFCOMM listener failure and break out of the
loop if BT is being turned off.
bug 7134544

Change-Id: I35db2221be30980bec973253cdd888e0ce8cc36b

11 years agofixed local reference leak
zzy [Sat, 8 Sep 2012 00:28:09 +0000 (17:28 -0700)]
fixed local reference leak

12 years agoAdjust profile priorities when setting auto-connect
Ravi Nagarajan [Wed, 29 Aug 2012 12:29:51 +0000 (05:29 -0700)]
Adjust profile priorities when setting auto-connect

At a given point only one device should be set to have
PRIORITY_AUTO_CONNECT per profile. When setting a device priority
adjust the other devices' priority to make sure auto-connect
is attempted with only one device
bug 7076087

Change-Id: I1e03945a06e7acc901b53f34429194b3c3e76cd7

12 years agoFix for BT crash during CPBR AT cmd processing
Syed Ibrahim M [Thu, 23 Aug 2012 14:41:40 +0000 (20:11 +0530)]
Fix for BT crash during CPBR AT cmd processing

Delete the local reference of jstring objects during every callback
for unknown AT command and dial command after JNI calls the Java
methods.
Bug 7044655

Change-Id: I21792b95fbad37c488ec5a1a30521a5413192751

12 years agoMerge "Don't trust length specified by ContentProvider for file transfers." into...
Martijn Coenen [Mon, 20 Aug 2012 19:09:52 +0000 (12:09 -0700)]
Merge "Don't trust length specified by ContentProvider for file transfers." into jb-mr1-dev

12 years agoNotify headset of signal strength change
Ravi Nagarajan [Tue, 14 Aug 2012 14:18:25 +0000 (07:18 -0700)]
Notify headset of signal strength change

Battery and service state changes were relayed to the stack, but not
signal strength. This has been resolved.
bug 6983415

Change-Id: Ie6fbb108805348e39c9119d028afb834556ae6b0

12 years agoImplement enableNoAutoconnect() for NFC handover
Ganesh Ganapathi Batta [Wed, 8 Aug 2012 22:14:16 +0000 (15:14 -0700)]
Implement enableNoAutoconnect() for NFC handover

Implementation of  BT enable in Quiet mode without initiating auto connect and  not allowing
Incoming HFP, A2DP and HID  connections.

Change-Id: I857aea8d95677f8287df4641ec0aeae58a9f7a99

12 years agolistenForPhoneState only after SLC
Ravi Nagarajan [Mon, 13 Aug 2012 14:51:05 +0000 (07:51 -0700)]
listenForPhoneState only after SLC

Start phone state listener after SLC setup, instead of on
Disconnected SM exit(). On BT OFF, quitNow() forces a SM exit()
which incorrectly started the phone state listener. Additionally
no indicator updates should be sent prior to SLC setup
bug 6976119

Change-Id: Icff2bc52602230b098651225bec92d532f3a3ff9

12 years agoDon't trust length specified by ContentProvider for file transfers.
Martijn Coenen [Thu, 2 Aug 2012 22:08:08 +0000 (15:08 -0700)]
Don't trust length specified by ContentProvider for file transfers.

It seems that the length specified by content providers for images
is often not correct. This happens because applications modify the
images later on with meta-data, etc., but don't update the length
field.

This causes Bluetooth OPP transfers to fail, usually with an
IndexOutOfBoundException. The root cause (wrong size in content
provider) of course needs to be fixed, but we can also make
Bluetooth more resilient to these situations.

Since OBEX needs to know the transfer length
up front, the only other way we have of determining the size
of the content is by opening a file descriptor and getting
its length.

Bug: 6857704
Change-Id: Iaf2304b44e9e81ef6e6ac7e0fe3be84ad31a312f

12 years agoAdd unbond reason to bond state change intent
Ravi Nagarajan [Mon, 6 Aug 2012 12:39:35 +0000 (05:39 -0700)]
Add unbond reason to bond state change intent

HAL sends the status to indicate the reason for bonding failure, if any.
Add this to bond state change intent, so that the Settings app can
display the error dialong, if necessary.
bug 6936335

Change-Id: Ide7c9e497bbfc6428b60c7a6de6e01ca538edfb8

12 years agoMerge "Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR." into jb-mr1-dev
Matthew Xie [Wed, 8 Aug 2012 19:19:13 +0000 (12:19 -0700)]
Merge "Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR." into jb-mr1-dev

12 years agoFix for BT turn on/off issues: NPE, FD/thread leaks, ANR.
Fred [Wed, 1 Aug 2012 04:14:11 +0000 (21:14 -0700)]
Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR.

This fix addresses numerous BT on/off issues found from the CTS test.
Fixed fD/pipe leak in various state machine Looper objects by calling quit() function.
Fixed cursor leak in AtPhonebook.
Change Pbap to stop the RFCOMM listener on the STATE_TURNING_OFF instead of STATE_OFF.
Removed several cleanup() methods causing NPE.
Reduced RFCOMM listener timeout from 3 seconds to 300ms between retry.
bug 6834336

Change-Id: I52423343d8f52f65294af0143f373871a9874d77

12 years agoImplement Profile Auto connection logic
Ganesh Ganapathi Batta [Tue, 31 Jul 2012 23:22:32 +0000 (16:22 -0700)]
Implement  Profile Auto connection logic

Implement  Profile Auto connection logic  (moved from Settings App )in  Bluetooth APK
 to avoid Auto connection not happening if the Settings App is not running
As part of this implementation following features are implemented
1.  Auto connection initiation during BT on OFF
2. Profile Auto connection priority management
3. Connecting Missing profile logic
4. Initialize Profile Priorities on Bond State Change

Change-Id: I12b7c190e28f043b4b008c9b48ac7e13aaf178e6

12 years agoProper update of friendly name for a paired device.
Ganesh Ganapathi Batta [Wed, 1 Aug 2012 23:51:09 +0000 (16:51 -0700)]
Proper update of friendly name for a paired device.

Update friendly name for a paired device  by  properly initializing mAlias
member of DeviceProperties  in Property Changed Callback() for remote device.
bug 6884149

Change-Id: I01d0679af4facfe6e92527f7618f4ff791928d0e

12 years agoFix typo in PBAP Server name SDP record
Ganesh Ganapathi Batta [Fri, 27 Jul 2012 18:43:56 +0000 (11:43 -0700)]
Fix typo  in PBAP Server name SDP record

Change-Id: Iff48e815987178597d93069ae3874ca903882e37

12 years agoDo not accept connection from remote PANU if the local role is also PANU
Ganesh Ganapathi Batta [Wed, 18 Jul 2012 18:27:44 +0000 (11:27 -0700)]
Do not accept connection from remote PANU if the local role is also PANU

Fix for BLTH01537991
Change-Id: Ieea143a5929217c7dc52c541e55ddf57077b244f

12 years agoExplicitly export content providers
Nick Kralevich [Mon, 30 Jul 2012 19:41:30 +0000 (12:41 -0700)]
Explicitly export content providers

In a future version of Android, the default value for
<provider android:exported> will change from true to false.
Explicitly set android:exported="true"

Bug: 3306452
Change-Id: I4df74c627505c596a3bce81a5417d32e5002a75f

12 years agoResolve incoming pairing and connection issue
Ravi Nagarajan [Fri, 29 Jun 2012 13:49:59 +0000 (19:19 +0530)]
Resolve incoming pairing and connection issue

When the remote side initiates pairing & connection, occassionally
connection is made before the phone has had a chance to do SDP.
In this case, the profile priorities are not initialized, which caused
us to incorrectly reject the incoming connection. Allow connection
if priority is undefined, but device is not unpaired

Change-Id: Icd8257adea19fc9a4d3853cd85da9bd791cfe505

Conflicts:

src/com/android/bluetooth/a2dp/A2dpStateMachine.java

12 years agoEnsure mAddr member of DeviceProperties is properly set with device BD Addr
Ganesh Ganapathi Batta [Wed, 27 Jun 2012 23:19:04 +0000 (16:19 -0700)]
Ensure  mAddr member of  DeviceProperties  is properly set with  device BD Addr

Change-Id: I5dafb48fc63dadfc5ad60e5a4e9735cf72d56534

12 years agoFix for When Hf is rejected the device should initiate A2dp if a2dp is enabled
Swaminatha Balaji [Mon, 25 Jun 2012 11:04:09 +0000 (04:04 -0700)]
Fix for When Hf is rejected the device should initiate A2dp if a2dp is enabled

Change-Id: I15d3d6c8456e94553f479009c600dca1cd2361ac

12 years agoAdded code to ignore the empty value of remote device property change
zzy [Tue, 26 Jun 2012 22:01:20 +0000 (15:01 -0700)]
Added code to ignore the empty value of remote device property change
Change-Id: I0d6b293c0bf35d9b4a2df00e9b3cd810c4a9b251

12 years agoVirtual call implementation
Syed Ibrahim M [Thu, 14 Jun 2012 08:37:23 +0000 (14:07 +0530)]
Virtual call implementation

Change-Id: I72a96eedd1cac10a0da7223ebc9b70fd4a21974d

12 years agoHDP-App crash fix
Priti Aghera [Mon, 18 Jun 2012 20:57:50 +0000 (13:57 -0700)]
HDP-App crash fix
Set the channel fd to null in channel state callback if new state is not CONNECTED

Change-Id: Id540d9ca2e20ef3e03b11a61634b8a2cb4e05df1

12 years agoImport translations. DO NOT MERGE
Ying Wang [Fri, 20 Jul 2012 17:58:46 +0000 (10:58 -0700)]
Import translations. DO NOT MERGE

Change-Id: I1c99fc8291bddc2e9c318e0d7e8d5de516601161
Auto-generated-cl: translation import

12 years agoNotify Connection state chnage to AudioManager via an API call
Matthew Xie [Wed, 20 Jun 2012 18:23:29 +0000 (11:23 -0700)]
Notify Connection state chnage to AudioManager via an API call

bug 6834913
Change-Id: I58af46710320f3debee1780aeaea7f5548233604

12 years agoRemove unused import com.android.internal.telephony.Call
Matthew Xie [Sat, 14 Jul 2012 18:06:59 +0000 (11:06 -0700)]
Remove unused import com.android.internal.telephony.Call

Change-Id: I491dc175b29f98900b79e801ff3fb4f116752668

12 years agoAdd CONNECTIVITY_INTERNAL permission for PanService
Matthew Xie [Thu, 12 Jul 2012 22:55:22 +0000 (15:55 -0700)]
Add CONNECTIVITY_INTERNAL permission for PanService

Change-Id: I0e601eecdb1e7f52bc7ada037b1182b1a5a49f16

12 years agoRemoved onStartCommand().
Matthew Xie [Thu, 12 Jul 2012 01:59:38 +0000 (18:59 -0700)]
Removed onStartCommand().

BT ON/OFF now done via enable() and disable() binder API call.
Also fixed bug with BT OFF if set scan mode times out

Change-Id: Ib88dfc148bb5a24cda1e84a86f044ae85a5a6514

12 years agoreplace logx with alogx
Matthew Xie [Sat, 7 Apr 2012 10:44:13 +0000 (03:44 -0700)]
replace logx with alogx

Change-Id: Iec82cb4545bb26a8aa55dc7d473247396b9fd6e1

Conflicts:

jni/com_android_bluetooth_hid.cpp

12 years agocomment out state machine quit call
Matthew Xie [Tue, 12 Jun 2012 01:50:51 +0000 (18:50 -0700)]
comment out state machine quit call

Change-Id: I0d4f72d50cd981a3c334583948dc0563f0662662

12 years agomatt: my fix to get it compile, change logx to alogx, and etc
Matthew Xie [Wed, 6 Jun 2012 06:57:59 +0000 (23:57 -0700)]
matt: my fix to get it compile, change logx to alogx, and etc

Change-Id: I0b361ad6ba9a5f6ac4db9203a389ee309b04019a

12 years agoAdd remote device while pairing without inquiry
Kausik Sinnaswamy [Mon, 11 Jun 2012 10:52:41 +0000 (16:22 +0530)]
Add remote device while pairing without inquiry

Change-Id: Ia7d99075b196414b3ded117b323ca5295c2c0b73

12 years agoResolved incoming pairing/connection issue
Ravi Nagarajan [Wed, 6 Jun 2012 13:56:12 +0000 (19:26 +0530)]
Resolved incoming pairing/connection issue

Sending bond_state_changed and adapter_properties_cb concurrently was
causing a race condition, which resulted in the BOND_STATE_CHANGED intent not
being sent. This caused the Settings to not show the newly bonded
device. This has been resolved by letting BondStateMachine manage
the mBondedDevices

Change-Id: Ieba39602436370fd9a87c3aa938ff3bd724c68cf

12 years agoAdditional check included for the case when PhoneApp queries Bluetooth Audio state...
Sreenidhi T [Tue, 5 Jun 2012 10:09:06 +0000 (03:09 -0700)]
Additional check included for the case when PhoneApp queries Bluetooth Audio state before the stack responds for the sco disconnect issued previously in AudioOn state.

Change-Id: I8b85fc9d3b4463205f01dfaa3bb309a3dbeb8231

12 years agoFix the issue where HID connection was failing on first connection randomly.
Syed Ibrahim M [Thu, 31 May 2012 10:30:04 +0000 (16:00 +0530)]
Fix the issue where HID connection was failing on first connection randomly.
Made changes in HidService to send a STATE_CONNECTING broadcast when HIDService.connect() is invoked;
Also before rejecting the incoming connection, check if the connection is transitioning from STATE_DISCONNECTED to STATE_CONNECTED and then only do a disconnectHidNative(). The normal flow of HID connect would transition from STATE_CONNECTING to STATE_CONNECTED

Change-Id: Ia416e3a70fc6c3561c3530091691367c5da2674c

12 years agoFixed PBAP to use simple pairing instead of numeric comparison (same as before).
Fred [Fri, 25 May 2012 17:56:18 +0000 (10:56 -0700)]
Fixed PBAP to use simple pairing instead of numeric comparison (same as before).
Also, escape special characters in vCard-Listing XML object

Change-Id: I32eb126f3dba4b35af39e6e0636f2f7f7e8d94a8

12 years agoAdded code to cleanup connection state when bt off
zzy [Fri, 25 May 2012 23:40:27 +0000 (16:40 -0700)]
Added code to cleanup connection state when bt off

12 years agoChanging the order of notification of connection state change, as it was causing...
Sreenidhi T [Mon, 21 May 2012 10:39:22 +0000 (03:39 -0700)]
Changing the order of notification of connection state change, as it was causing a race condition, with the UI not being updated with the correct connection state.

Change-Id: I6f4c75e4eac4ae798cb7918a4f1b7458e1eaa4b0

12 years agoFixed displaying images in pbap browse and pull when configured
fredc [Sat, 19 May 2012 00:42:09 +0000 (17:42 -0700)]
Fixed displaying images in pbap browse and pull when configured

Change-Id: I8315d4db76d7cbfeaefe4187100984d12bd952ed

12 years agoEnsure that A2DP stream is suspended during Voice Dial when SCO
Kausik Sinnaswamy [Fri, 18 May 2012 07:56:29 +0000 (13:26 +0530)]
Ensure that A2DP stream is suspended during Voice Dial when SCO
connection is established. This is needed to be compliant with the SIG's
AV+HF whitepaper

Change-Id: Ie072782ea70de0f1b13c6cf8bfcb88c072a1d093

12 years agoFix for force closing HDP app: Included review comments
Priti Aghera [Tue, 15 May 2012 20:29:42 +0000 (13:29 -0700)]
Fix for force closing HDP app: Included review comments
Included a callback to linkToDeath and notify the HealthService when BluetoothHealth is dead

Change-Id: Ie34a391f78c4fba0a74bcefd3dedccaa63f7bba3

12 years agoFix for A2dp/hf connection happening even when profile is disabled in Settings
Swaminatha Balaji [Tue, 15 May 2012 09:59:35 +0000 (02:59 -0700)]
Fix for A2dp/hf connection happening even when profile is disabled in Settings

Change-Id: I32145db12e0107b858e2e25ad1ae6cba6eadb55d

12 years agoAdded support for enabling/disabling profiles
fredc [Fri, 11 May 2012 05:07:32 +0000 (22:07 -0700)]
Added support for enabling/disabling profiles

Change-Id: I819ca7920d9d866bd3aca88d4365a18e2369ee81

12 years agoFix to ensure that we are able to pair with a device that was just unpaired. The...
Kausik Sinnaswamy [Mon, 14 May 2012 11:59:22 +0000 (17:29 +0530)]
Fix to ensure that we are able to pair with a device that was just unpaired. The fix was to clear a boolean variable which was causing some stale data to be maintained

Change-Id: Iaad0e21794b0b6e47d12c837ef36e026b6ece655

12 years agoChange done to clear mUuid - local copy of Uuid. If not cleared, the cachedBluetoothD...
Sreenidhi T [Mon, 14 May 2012 09:32:30 +0000 (02:32 -0700)]
Change done to clear mUuid - local copy of Uuid. If not cleared, the cachedBluetoothDevice issued a connect using the local cached copy of uuids, without waiting for the ACTION_UUID intent. This was resulting in multiple calls to connect().

Change-Id: Ida6fd2e805dee8c19b4d7d656b4102891f51fd00

12 years agoFixed HDP Disconnection issue. Included channel to list of channels when channel...
Priti Aghera [Sat, 12 May 2012 02:05:04 +0000 (19:05 -0700)]
Fixed HDP Disconnection issue. Included channel to list of channels when channel state callback is received

Change-Id: Icd361a3f19b883b3cca27fe9eb0cafc3b969290b

12 years agoAdded PBAP support for fetching owner vcard info from phone's profile. Added PBAP...
fredc [Mon, 7 May 2012 21:20:35 +0000 (14:20 -0700)]
Added PBAP support for fetching owner vcard info from phone's profile. Added PBAP image support

Change-Id: Ieb2993c9505185d4f85cbbf6b5c554936618cff0

12 years agoMoved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to Bluetoot...
fredc [Wed, 9 May 2012 23:54:51 +0000 (16:54 -0700)]
Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService

Change-Id: Ic9911359c1d9e04a5d803807ea7cf4ad39616960

12 years agoFixed memory leak in Binder objects from repeatedly turning on/off Bluetooth
fredc [Mon, 7 May 2012 07:10:27 +0000 (00:10 -0700)]
Fixed memory leak in Binder objects from repeatedly turning on/off Bluetooth

Change-Id: Ibee5382816d47b1e9b846461942a9daccc4210a7

12 years agoChanges done for disconnecting sco connection based on disconnectAudioNative() return...
Sreenidhi T [Tue, 8 May 2012 10:19:54 +0000 (03:19 -0700)]
Changes done for disconnecting sco connection based on disconnectAudioNative() return status, instead of waiting till BTA_AG_AUDIO_CLOSE_EVT is received. The delay in disconnecting sco was causing audio to be routed to earpiece instead of speaker, when selected from incall screen.

Change-Id: I307c3e9c114676649750cb64f1043fc7fe79d71b

12 years agoAdded AT+CPBR support
Sreenidhi T [Fri, 27 Apr 2012 14:11:20 +0000 (07:11 -0700)]
Added AT+CPBR support

Change-Id: Ice860d8f97350d805a5478e94a27ae19cf42dafd

12 years agoAdded code to turn off pan connection when tethering state changed
zzy [Fri, 27 Apr 2012 19:14:11 +0000 (12:14 -0700)]
Added code to turn off pan connection when tethering state changed

12 years agoBacked out workaround for RFCOMM socket close issue when BT is turning off
fredc [Thu, 26 Apr 2012 05:43:51 +0000 (22:43 -0700)]
Backed out workaround for RFCOMM socket close issue when BT is turning off

Change-Id: I793fa2a0fa0127b6ff70aeb448c97c3cc9154d6f

12 years agoFixed Bluetooth on/off issues. Removed singleton instances causing issues when servic...
fredc [Thu, 26 Apr 2012 01:27:04 +0000 (18:27 -0700)]
Fixed Bluetooth on/off issues. Removed singleton instances causing issues when services reload. Updated adapter state machine

Change-Id: Ie1ff4284f507c7da102569f3c0acfd55612a5f6b

12 years agoFixed exception in BondStateMachine when quit message occurs. Fixed exception in...
fredc [Tue, 24 Apr 2012 18:51:48 +0000 (11:51 -0700)]
Fixed exception in BondStateMachine when quit message occurs. Fixed exception in OPP when remote does not accept incoming request.

Change-Id: Ibb43a26ee0ac62967518468d243880a0af987ba0

12 years agoHandle NREC. On connect, enable echo cancellation locally, headset will then override it
Ravi Nagarajan [Tue, 24 Apr 2012 08:48:02 +0000 (01:48 -0700)]
Handle NREC. On connect, enable echo cancellation locally, headset will then override it

Change-Id: I8fca1e82d1457b47122c17393ffbff362e1f3134

12 years agoAdded ACL connect/disconnect state callbacks
Kausik Sinnaswamy [Wed, 4 Apr 2012 06:39:10 +0000 (12:09 +0530)]
Added ACL connect/disconnect state callbacks

Change-Id: Ibd44de8601521a11b106711ccad9261fb40beca8

12 years agoOn disable send the disable event to stack right away, as the stack will take care...
Ravi Nagarajan [Fri, 20 Apr 2012 11:54:29 +0000 (04:54 -0700)]
On disable send the disable event to stack right away, as the stack will take care of tearing down the active connections. ALL_DEVICES_DISCONNECTED was not being sent (as no profiles handled it), causing 3 second delay on BT off

Change-Id: I8aa83f3cd2019f521d5522e9455303a413dddcc1