Commit Graph

230 Commits

Author SHA1 Message Date
Jaikumar Ganesh
ac4159549c Merge "Incoming connection dialog tweaks." 2011-07-21 11:53:44 -07:00
Matthew Xie
e3dc975acb when disconnectHeadsetInternal, allow it when the BT is not disabled
The old code allowed the disconnection only when BT is enabled. This
caused a bug during BT turning off that Headset connection failed
to disconnect.
Change-Id: Iba15a1595b6987064f071ad90bbb126a6edfe6b5
2011-07-20 17:12:52 -07:00
Jaikumar Ganesh
d3728cb32f Incoming connection dialog tweaks.
Don't show incoming connection dialog when the device shows
the pairing dialog - this means that the device has already been
trusted by the user.

Change-Id: I98a9f56528f6b62d0f824bbc7612aaa0077ba1e6
2011-07-20 13:44:35 -07:00
Jaikumar Ganesh
5623b07497 Merge "Bluetooth Health APIs" 2011-07-11 14:17:57 -07:00
Jaikumar Ganesh
fb658c72a3 Bluetooth Health APIs
1. Remove the check of configs in BluetoothHealth.
   This check is useless since BluetoothHealth is a proxy.

2. Add a wrapper and a callback class. We shouldn't expose
   Binder interfaces as public APIs.

Change-Id: If62620b4251cf93f3f97d2fe63099e40fae7da4d
2011-07-11 11:32:27 -07:00
Ben Dodson
6d8b80dd8c Get server's listening channel
Change-Id: Ia1cb3486a4ba502185efdcf6d7bcf0f37bb55261
2011-07-08 14:36:42 -07:00
Matthew Xie
a0c680393f Incoming Bluetooth Connection requests - dialog.
This sends the intents to the Settings app to show
the dialogs for the incoming connection requests.
Includes down merged contributions from Jaikumar Ganesh.

Change-Id: Ic8b857aad3554315aae39a0e871eb94d0ac98a91
2011-07-07 12:43:27 -07:00
Jaikumar Ganesh
2ea1e85dcb Implement APIs for Bluetooth Health profile.
This first patch implements all the APIs.
The APIs wil be made public soon. The data specification
API will be submited in another patchset.
Change-Id: I2462683b7e07380e2c42474b0036b34d03b4bed1
2011-06-24 11:31:43 -07:00
Jaikumar Ganesh
f8789167e9 Refactor Bluetooth Profile.
Move connect / disconnect / set and get priority
functions down the interface as they are not generic enough
for all profiles.

Change-Id: I2656e1bdbc8046c53bb0dfbd9172f5f10b57aa7d
2011-06-14 21:29:52 -07:00
Jaikumar Ganesh
830d8c5fb3 am 5aaed097: am 58ada2f3: am 94062517: Merge "Require bonding and encryption for PBAP server"
* commit '5aaed0970be451479a07b2423e709026dec6611b':
  Require bonding and encryption for PBAP server
2011-06-06 12:56:55 -07:00
Jaikumar Ganesh
5aaed0970b am 58ada2f3: am 94062517: Merge "Require bonding and encryption for PBAP server"
* commit '58ada2f3bbab749fb5a813fb8f82eee347080405':
  Require bonding and encryption for PBAP server
2011-06-06 11:34:11 -07:00
Albert Mojir
efc1d16374 Bluetooth: correcting return value from cancelDiscovery
BluetoothAdapter.cancelDiscovery was previously always
returning false.

Change-Id: Ic1fd134d4b710438d95c5b8ca009104529dd1bf5
2011-06-02 10:30:49 -07:00
Matthew Xie
ceb6c9f517 Add public api BluetoothSocket.isConnected.
It's a convenent function to get the connection status of the bluetooth
socket, ie, whether there is an active connection with remote device.
bug 2149043

Change-Id: I4ca4e98c646f70746d838632f3035376b22d579b
2011-05-23 17:47:35 -07:00
Mathias Jeppsson
e3b9dc107e Require bonding and encryption for PBAP server
The Phonebook Access Profile specification requires bonding and
encryption. For devices not supporting SSP (Secure Simple Pairing),
InsecureRfcomm will require neither. Adding EncryptedRfcomm to force
bonding and encryption but not requiring authenticated link key.

Change-Id: If47cca9c5ffd89358bcd61d64f7785d17e0ca7cc
2011-05-17 07:52:15 +02:00
Wink Saville
343c1ad720 am 37677849: am 64c42cae: Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
* commit '37677849998e6c9a39afe0a730b2f0131a371f3b':
  Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
2011-04-18 15:28:47 -07:00
Wink Saville
3767784999 am 64c42cae: Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
* commit '64c42cae4482fe0157e977b8ddd0f2c2436b3f31':
  Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
2011-04-18 15:24:47 -07:00
Wink Saville
64c42cae44 Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
Change-Id: Ib4b33894da75f5f156066092fb145b478e52f7d7
2011-04-18 14:55:10 -07:00
Robert Greenwalt
80f7c594fa am f4a29403: resolved conflicts for merge of 70c3d1c2 to honeycomb-plus-aosp
* commit 'f4a29403ae5b6d3e8e754a025d33f0c33adecb21':
  Add external dependency API.
2011-04-07 14:22:03 -07:00
Robert Greenwalt
f4a29403ae resolved conflicts for merge of 70c3d1c2 to honeycomb-plus-aosp
Change-Id: I0962138f6ecb1ed54fda25524d8850b086f13c4f
2011-04-07 14:13:52 -07:00
Robert Greenwalt
d55a6b498d Add external dependency API.
An APN will not be connected to if some external dependency is not met.

bug:3486704
Change-Id: I7d94df343b260013efd11faa978deb13f07f1389
2011-04-07 12:28:37 -07:00
Jaikumar Ganesh
6f7a973660 Check if BT is disabled or not when sending audio state.
When BT is turning off we need to send the audio state intent.
We were not doing this since the state was turning off.

The check was added to prevent misuse of public APIs, since
these functions are used internally, its not a problem.

Change-Id: I9834cbff741722bf99c2875fa65c0617b7b4807b
2011-04-06 11:11:13 -07:00
Brad Fitzpatrick
8698c91204 am b8332786: am d973bed3: Merge "Removing dead store; it was likely a relict of debuging code."
* commit 'b8332786e3ac6d58504a7c3128e94e63255b3515':
  Removing dead store; it was likely a relict of debuging code.
2011-03-17 10:36:47 -07:00
Jozef BABJAK
f1aa297b17 Removing dead store; it was likely a relict of debuging code.
Change-Id: I4daab1359d7c4b300ef61e3de1578d9fecb6f8da
2011-03-17 09:23:32 +01:00
Jake Hamby
9a62c9cd65 Refactor android.server.BluetoothService classes.
Several cleanups to BluetoothService:
- Move BluetoothService.BondState inner class to top level.
- Extract adapter and remote device properties cache management
  logic into two new classes: BluetoothAdapterProperties and
  BluetoothDeviceProperties.
- Add getter methods for other classes in the package to access
  the new properties cache objects for multi-part operations.
- Inline log() method in BluetoothService and selected the
  appropriate Log method (Log.d, Log.w, Log.e) for each message.
- Refactor dump() method into smaller sized pieces.
- Clean up logic of updateCountersAndCheckForConnectionStateChange()
  method for better readability.
- Change sendConnectionStateChange() to return instead of sending
  an intent if the current or previous state values are invalid.
  Previously the code sent an intent with -1 for the invalid state.
- Added Javadoc comments to document the methods that are called from
  native Bluez code.
- Fixed some typos and code style issues.

Original Change by: Jake Hamby
Modified by: Jaikumar Ganesh

Change-Id: I76ebac00ecd29566dcb2d1ad3e7a486b7530ce24
2011-02-24 16:26:20 -08:00
Jaikumar Ganesh
74ef119945 Make BluetoothPan inherit from BluetoothProfile.
Change-Id: Ibd3e24e391be93ebe2cf975bd075efb68e10c1ff
2011-02-23 15:49:15 -08:00
Jaikumar Ganesh
4ab0e7746f Make BluetoothInputDevice inherit from BluetoothProfile.
This makes it in sync with BluetoothHeadset and BluetoothA2dp profiles.

Change-Id: I3ddb1d18b04aacb173b7bc376bca21c277a6afe4
2011-02-22 10:42:26 -08:00
Jaikumar Ganesh
17689de1cf am 25bbfda2: am 485d577a: Merge "Fix BluetoothAdapter Connection change intent doc." into honeycomb
* commit '25bbfda2442e6d8f55bdc8e2dd0eca18b0ba594b':
  Fix BluetoothAdapter Connection change intent doc.
2011-02-01 17:12:23 -08:00
Jaikumar Ganesh
0b5b35f8a1 Fix BluetoothAdapter Connection change intent doc.
Bug: 3414206
Change-Id: Icf87e28e11b0b5072fe546225bbfb1dc68487ef0
2011-02-01 16:53:14 -08:00
Scott Main
c42eb2cce7 am d2b87091: am 0f2e2b8b: Merge "Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it\'s not a good location and the info is avilable in the dev guide, but also added some of the
* commit 'd2b87091cc30c575496eb78ebea88297da775359':
  Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it's not a good location and the info is avilable in the dev guide, but also added some of the info to the Resources class description.
2011-01-26 19:08:55 -08:00
Scott Main
f4f05b8f24 Update package descriptions with editorial revisions.
Notably, this removes exessive info about resources
from the content package, because it's not a good location
and the info is avilable in the dev guide, but also
added some of the info to the Resources class description.

Change-Id: Ie78af26c9cec66314deb98e53078f48e16c08e70
2011-01-26 14:58:19 -08:00
Jaikumar Ganesh
3b4c86af20 am 48f73779: am e9b644fc: Merge "Fix some unmatched javadoc tags." into honeycomb
* commit '48f737798070471cefeeaf418c75ea55f8b925e9':
  Fix some unmatched javadoc tags.
2011-01-26 12:27:58 -08:00
Robert Greenwalt
9e751f0fb5 Merge "Make the interface with DHCP IPv6 capable." 2011-01-26 11:56:19 -08:00
Jaikumar Ganesh
0706fed520 Fix some unmatched javadoc tags.
Bug: 3392175
Change-Id: I84aa86c07060bc4ba399fd5c8f7cda162b432031
2011-01-26 11:46:56 -08:00
Robert Greenwalt
0216e61819 Make the interface with DHCP IPv6 capable.
It doesn't work (yet) for IPv6, but we can remove v4-centric notions from the framework.

bug:2542681
Change-Id: I21c058f5c88d07706c9265bf0ea902fc90357e56
2011-01-26 09:10:01 -08:00
Jaikumar Ganesh
5a9ac240fe Revert "Temporary Changes for certification of SCO."
This reverts commit 75c2701454.

Change-Id: Ic63cdbbb06b9ed2d9c48e8b29cc376059ecadebf
2011-01-26 09:08:50 -08:00
Jaikumar Ganesh
c8fa4ff838 Improve readability of java docs for the public APIs.
Change-Id: I0a0f1be04ed2ea2c14498a1a2ed4b050191ec95b
2011-01-25 16:53:39 -08:00
Jaikumar Ganesh
dde68c64fd Rename virtual call API to ScoUsingVirtualCall.
This API makes more sense with regard to headset profile.
Bug: 3381532

Change-Id: Ife07d101a3b04bcddb31e7ae86712e1d97a660c5
2011-01-25 13:49:35 -08:00
Jaikumar Ganesh
f643974954 am 1c9761e3: Merge "Do Not Merge Connect other profiles when priority is auto connect." into gingerbread
* commit '1c9761e30d6eccfe104928cdc961ed1d3a5e2f6b':
  Do Not Merge Connect other profiles when priority is auto connect.
2011-01-21 21:36:32 -08:00
Jaikumar Ganesh
8db58ea52c Merge "Connect other profiles when priority is auto connect." into honeycomb 2011-01-21 21:24:49 -08:00
Jaikumar Ganesh
a8d18865a4 Connect other profiles when priority is auto connect.
ACL auto connection was removed so other profiles
won't auto connect when priority was auto connect.

Reduced connect other profiles time delay.

Bug: 3281016
Change-Id: I8d98fd0d9bace193d619d7f241fff22f07e3e935
2011-01-21 19:22:23 -08:00
Jaikumar Ganesh
40e6c210f8 Do Not Merge Connect other profiles when priority is auto connect.
ACL auto connection was removed so other profiles
won't auto connect when priority was auto connect.

Reduced connect other profiles time delay.

Bug: 3281016
Change-Id: Ic56ca6e95f618f02bc316d1f80014e58c4b6c3bc
2011-01-21 19:05:54 -08:00
Jaikumar Ganesh
c4cc3ea48a Merge "Temporary Changes for certification of SCO." into honeycomb 2011-01-21 15:43:42 -08:00
Jaikumar Ganesh
75c2701454 Temporary Changes for certification of SCO.
Bug: 3349475
Change-Id: I555b127a1d9218494cd05c07c9e9f29628f3bc74
2011-01-21 15:17:23 -08:00
Scott Main
299ae67d03 docs: small javadoc, but also make the existing getProfileProxy docs visible... had wrong comment tag
Change-Id: Ia4b2178057c0263ec8f835342815082de87b3af1
2011-01-19 21:13:18 -08:00
Jaikumar Ganesh
fbe807d064 Make connection / disconnect failure more robust.
Add error codes so that the states can be tracked better.

Change-Id: Ic07a5d34589134b68dedeb4803ccb523aa01b567
2011-01-19 14:06:29 -08:00
Jaikumar Ganesh
ef6abd8a3e am a788a943: Merge "Do Not Merge: Expose insecure rfcomm Bluetooth API." into gingerbread
* commit 'a788a9430956dabbc1387e5cccc15f9f41639c95':
  Do Not Merge: Expose insecure rfcomm Bluetooth API.
2011-01-14 16:15:29 -08:00
Jaikumar Ganesh
a788a94309 Merge "Do Not Merge: Expose insecure rfcomm Bluetooth API." into gingerbread 2011-01-14 16:11:41 -08:00
Jaikumar Ganesh
a3363ef2cd Do Not Merge: Expose insecure rfcomm Bluetooth API.
This complements the secure rfcomm API.
The link key is unauthenticated and is subject to MITM attacks.
The link key may be encrypted depending on the type of Bluetooth device.
This helps apps which don't need the extra security or
have their own security layer built on top of the rfcomm link.

Bug: 3352266

Change-Id: I633fd0372e5e23288d6fec950dd1abc2896031f1
2011-01-14 13:24:03 -08:00
Jaikumar Ganesh
d1287f5ef0 Fix bug in handling connect/disconnect multiple devices.
Multiple HID devices can be connected. There is no pointing
maintaining the global state. Check individual device state.

Bug: 3350904

Change-Id: I03d9a6015e39e4f9d7f68cc8bbdb19731129b4e6
2011-01-13 15:59:27 -08:00
Jaikumar Ganesh
471de1f5b3 am c8f42fb6: Merge "DO NOT MERGE: Remove auto connection on ACL connection." into gingerbread
* commit 'c8f42fb69867f171c04013b1b1a8f7e897ae3685':
  DO NOT MERGE: Remove auto connection on ACL connection.
2011-01-12 13:58:17 -08:00