| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS is a list of
radios that can be toggled while in airplane mode. This
change adds logic to BluetoothService to allow enabling
when Settings.System.RADIO_BLUETOOTH appears in that list.
Fixes http://b/2297314
|
|\
| |
| |
| |
| |
| |
| | |
Merge commit 'f6e32e72a902d9a309410bc5306a539ea850159f' into eclair-mr2
* commit 'f6e32e72a902d9a309410bc5306a539ea850159f':
Maintain a list of all Bluetooth docks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this change, isBluetoothDock API can be used anytime and is not in tied
to dock state. The Dock State is a sticky intent so users
can query for the dock state.
Dr No: Eastham
Bug: 2133530
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '8c411fb13923d1fa28fcd98452bf3d17b8b1a338' into eclair-mr2
* commit '8c411fb13923d1fa28fcd98452bf3d17b8b1a338':
Add support for Car Dock.
|
| |
| |
| |
| |
| | |
Dr No: Eastham
Bug: 2133530
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is a delay between registering the two profiles,
and handsfree profile is a superset of the headset profile.
So some devices do an SDP and get the headset profile record
before we have registered the handsfree profile.
a) We can reject all incoming connections till all profiles are
registered, but then this would mean we connect later in some cases.
Registering profiles in this order seems fine to me.
Note: There is a also the need to fix forking sdptool to register
profiles, which would obliviate the need to wait 500 msecs between
profile registrations.
Bug: 2293792
Dr No: Eastham
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is a delay between registering the two profiles,
and handsfree profile is a superset of the headset profile.
So some devices do an SDP and get the headset profile record
before we have registered the handsfree profile.
a) We can reject all incoming connections till all profiles are
registered, but then this would mean we connect later in some cases.
Registering profiles in this order seems fine to me.
Note: There is a also the need to fix forking sdptool to register
profiles, which would obliviate the need to wait 500 msecs between
profile registrations.
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'ad431ad8631d8b19b04193ff1f89a955a7643c60' into eclair-mr2
* commit 'ad431ad8631d8b19b04193ff1f89a955a7643c60':
Fix pairings lost on reboot.
|
| |
| |
| |
| |
| | |
Bug:2277376
Dr No:Eastham
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '660282dc3e81784224945be0787a9e2d4276de8c' into eclair-mr2
* commit '660282dc3e81784224945be0787a9e2d4276de8c':
Check if Bluetooth is enabled before making any calls down.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This was causing problems when apps were making calls, without
turning on BT first.
Bug: 2234918
Dr No: Eastham
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '3c58d279abed1da56b0ece74ded5854c509a42a4' into eclair-mr2
* commit '3c58d279abed1da56b0ece74ded5854c509a42a4':
Fix BMW and Audi auto pairing lists.
|
| |
| |
| |
| |
| | |
Bug no:2256558
Dr No:Eastham
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '013b0e531a4318b3e78c9bd0e077d3632fce2280' into eclair-mr2
* commit '013b0e531a4318b3e78c9bd0e077d3632fce2280':
Add BMW and Audi to Auto Pairing black list.
|
| |
| |
| |
| |
| | |
Bug: 2256558
Dr No: Eastham
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '8de4e0ad8ff39d9a397cd80de5155d4c09ef98fd' into eclair-mr2
* commit '8de4e0ad8ff39d9a397cd80de5155d4c09ef98fd':
Add BMW kits made by Motorola PCS to autoblack list for Bluetooth.
|
| |
| |
| |
| |
| |
| |
| | |
This may force some Motorola headsets to thow up the Pairing Request.
Bug: 2210365
Dr No: Eastham
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'd301c90446644f63cda9b9263f83332676065bb4' into eclair-mr2
* commit 'd301c90446644f63cda9b9263f83332676065bb4':
Delay 500ms between each registering each SDP record using sdptool.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is to workaround an issue where SDP records will fail to register using
sdptool. When we run SystemService.start() it forks sdptool, so if we do this
four times in a row these forked processes can run in parallel, and one or
more of them fails. There is probably some thready safety issue in sdptool
or Bluez that makes it unsafe to run sdptool in parallel.
As a workaround, delay 500ms between each run of sdptool to register SDP
records when starting Bluetooth.
Before this fix it was easy to reproduce problems with service record
registration. If you turn BT off/on multiple times you can see that sometimes
one or more service records are missing. Repro rate is about 20% in my tests.
Result is that remote devices cannot connect to the missing service.
After this fix I am unable to reproduce any missing SDP records, after 30+
cycles of BT on/off. Motorola BT team also ran stress tests overnight with this
fix and were unable to reproduce the missing SDP records.
This is a low risk fix. It does delay some records from being registered
by an additional 1.5 seconds (on top of the 3 second delay we already had),
so if you try and very quickly connect a BT service after turning BT on it
won't work the first time.
Do not merge. (I will use a less hacky fix for MR2/Master)
Change-Id: I305c181c3194e8ce25e3825320cc2e1ef6d3d3cc
Bug: 2180800
DrNo: eastham
Joke: Why can't you play cards in the jungle? Because there's too many cheetas!
|
|/
|
|
|
|
|
|
|
| |
Do not merge.
Change-Id: I428bc0fc67030f24112f2e9c865824dfaea4897d
DrNo: eastham
Bug: 2089423
Joke: Why was Tigger looking in the toilet? To find Pooh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make functions that are meant to be BLUETOOTH_ADMIN really
BLUETOOTH_ADMIN.
Add some missing javadoc for permissions.
The only functional change here is the BLUETOOTH->BLUETOOTH_ADMIN
changes. This is super safe because every system app that uses BT
has both permissions.
Change-Id: Iddc61f9fd5d81fe0171358665a0fa52f2fa02871
DrNo: eastham
Joke: How do you catch a rabbit? Hide behind a tree and make carrott noises.
|
|
|
|
|
|
|
|
|
| |
Sometimes during OPP, we can get stuck in Pairing state when the remote
end, cancels the Pairing process - we will just get onAgentCancel
and thus not set the Pairing state properly.
DrNo: Eastham
Bug:2174874
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the main entry point to the Bluetooth APIs, and returns the default
local Bluetooth adapter.
It replaces context.getSystemService(Context.BLUETOOTH_SERVICE). This was
never in a public SDK release.
DrNo: eastham
Bug: 2158765
Joke: Why can't you play cards in the jungle? Because there's too many cheetas!
Change-Id: Ieed8be009ee5aba621cb69090ee8c8a9c19c840d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide createRfcommSocket(int channel)
Add createRfcommSocketWithServiceRecord(UUID uuid)
Rename listenUsingRfcomm(String,UUID) -> listenUsingRfcommWithServiceRecord(..)
Now we have a complete API for developers to make peer-peer RFCOMM connections
with hard-coding the limited (30) RFCOMM channels, instead using SDP lookup
of an UUID.
This commit addresses two serious bugs:
- Do not throw IOException on accepting an incoming RFCOMM connection with
BluetoothSocket. This was a regression from commit 24bb9b8af4ff6915
- Workaround failure of bluez to update SDP cache when channel changes by
trying to use the same RFCOMM channel on the server every time, instead
of picking server channels randomly. This is a pretty ugly workaround,
and we are still trying to fix the caching issue - but with this
workaround we are at least shippable and apps will work at least until
they start colliding on the 30 RFCOMM channels.
DrNo: eastham
Bug: 2158900
Joke: What did the digital watch say to his mom? "Look mom no hands."
Change-Id: Ia4879943b83afac06b6f1a3f2391cf1628afce7d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide listenUsingRfcommOn(int channel)
Add listenUsingRfcomm(String name, ParcelUuid uuid)
The new API automatically finds a free RFCOMM channel and registers an SDP
record with the given uuid and name. The SDP record is automatically
removed when the socket is closed, or if the application dies.
Apps are prevented from registering SDP records with the uuid of system
Bluetooth profiles, such as A2DP, HFP and OPP.
Apps are prevented from removing SDP records that they did not create. This is
tracked by pid.
TODO: Provide an API for the connecting app to look up an SDP record.
Bug: 2158900
DrNo: eastham
Joke: "What did the dog say to the tree? bark."
Change-Id: Ia92f51c34615a7270a403255ad2b8faa98c4a3f5
|
|
|
|
| |
Change-Id: I78c4e64a52b8290053dedfb1326df8d4c20f8a09
|
|
|
|
| |
Change-Id: I564429d5c5b6a5372b6ff26a53b0d7e518b53631
|
|
|
|
| |
Change-Id: I58fd199b40ffdf8168a5489be8eedb5d25d56722
|
|
|
|
|
|
|
|
|
|
| |
Instead add ACTION_REQUEST_DISCOVERABLE for the system to show a dialog to
adjust discoverable mode.
Also remove createBond(), removeBond() and cancelBondProcess(). The Settings
App already handles these automatically when connections require bonding.
Change-Id: I216154cd1b6de410de64ba91b07d7263ac03e8df
|
|
|
|
| |
Change-Id: I6357d482550e9e02edf221add318ecd9cfadcb66
|
|
|
|
|
|
|
|
|
|
| |
Bluez Device implementation is such that when a device
is unpaired, we removes the device and hence there is no
way to interact with it unless you pair again. Remote service
channel call is used to get the rfcomm channel number which
will be used in profiles like OPP which don't require pairing.
Change-Id: I868a6cdfdb1b7d3591dd8b66cd0320f41a9c1b92
|
|
|
|
|
|
|
|
|
| |
This will help apps listening to this intent to update icons etc
if the remote uuid changes. For example, the settings app used to
refresh the icons when the class bits change. It can do it now
when the remote ends uuids changes too.
Change-Id: Ib9af45780e83118d8877b0ef16f5b39b87fb4bef
|
|
|
|
|
|
| |
This helps us to distinguish between incoming and outgoing Bonding requests.
Change-Id: I69e6a269b7dd6aad60e6f5711cad812291a7d313
|
|
|
|
|
|
|
|
|
| |
Add new API which clients can use to force an SDP query.
The result is broadcast using an intent having the UUIDs.
The intent is broadcast after a timeout, in case of an error.
This timeout is greater than the page timeout.
Change-Id: I61e6db4c05b34c42f679a66987e37e2063a793b6
|
|
|
|
|
|
| |
Use the ParcelUuid instead of UUID
Change-Id:Ie05d65a62e8a4df8182a4c737d46c14142bfec43
|
|
|
|
| |
Change-Id: I12475aff4046796132beb2554cd067bcec712973
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1) Handle incoming 2.1 pairing requests
2) Modify displaying error messages on bond failures.
3) Add delay while accepting incoming pairing for certain 2.1 devices.
When MITM is on, the link key request might come more than once.
Auto accept with a delay.
4) Handle DisplayPasskey callback for pairing a 2.1 keyboard with
a 2.1 device
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a large batch, and covers:
-- Bluetooth Device Discovery --
BluetoothAdapter.ACTION_DISCOVERY_STARTED
BluetoothAdapter.ACTION_DISCOVERY_FINISHED
BluetoothAdapter.startDiscovery()
BluetoothAdapter.cancelDiscovery()
BluetoothAdapter.isDiscovering()
-- Bluetooth bonding (pairing) --
BluetoothAdapter.getBondedDevices()
BluetoothDevice.ACTION_BOND_STATE_CHANGED
BluetoothDevice.EXTRA_BOND_STATE
BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE
BluetoothDevice.BOND_NONE
BluetoothDevice.BOND_BONDING
BluetoothDevice.BOND_BONDED
BluetoothDevice.getBondState()
BluetoothDevice.createBond()
BluetoothDevice.cancelBondProcess()
BluetoothDevice.removeBond()
-- BluetoothClass --
BluetoothDevice.ACTION_CLASS_CHANGED
BluetoothDevice.EXTRA_CLASS
BluetoothDevice.getBluetoothClass()
BluetoothClass.Service.*
BluetoothClass.Device.Major.*
BluetoothClass.Device.*
BluetoothClass.getDeviceClass()
BluetoothClass.getMajorDeviceClass()
BluetoothClass.hasService()
-- Misc BluetoothDevice --
BluetoothDevice.ACTION_ACL_CONNECTED
BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED
BluetoothDevice.ACTION_ACL_DISCONNECTED
BluetoothDevice.ACTION_DISCOVERED
BluetoothDevice.ACTION_NAME_CHANGED
BluetoothDevice.EXTRA_DEVICE
BluetoothDevice.EXTRA_NAME
BluetoothDevice.EXTRA_RSSI
-- Misc BluetoothAdapter --
BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED
BluetoothAdapter.EXTRA_LOCAL_NAME
BluetoothAdapter.checkBluetoothAddress()
I deprecated BluetoothIntent and moved each intent into the class it relates
to.
Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate BluetoothError.java.
I spent a lot of time experimenting with a class BluetoothError to enumerate
the many error codes returned by the Bluetooth API. But at the end of the day
they were never used. The vast majority of method calls only really need a
true/false error value, and often not even that.
Methods which do need more detailed error enumeration (for example, bonding
failures) can have there own enumerated error codes. But there is no need
for a common set of error codes.
Also change the IPC failed warnings in BluetoothA2dp to Log.e. These indicate
a very serious error.
Introduce BluetoothAdapter.ERROR and BluetoothDevice.ERROR as helper sentinel
values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another round of Bluetooth API clean up, javadoc'ing and unhide'ing.
-- Symbols for getting/setting bluetooth state --
BluetoothAdapter.ACTION_STATE_CHANGED
BluetoothAdapter.EXTRA_STATE
BluetoothAdapter.EXTRA_PREVIOUS_STATE
BluetoothAdapter.STATE_OFF
BluetoothAdapter.STATE_TURNING_ON
BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
BluetoothAdapter.isEnabled()
BluetoothAdapter.getState()
BluetoothAdapter.enable()
BluetoothAdapter.disable()
-- Symbols for getting/setting scan mode --
BluetoothAdapter.ACTION_SCAN_MODE_CHANGED
BluetoothAdapter.EXTRA_SCAN_MODE
BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_DISCOVERABLE
BluetoothAdapter.getScanMode()
BluetoothAdapter.setScanMode()
-- Symbols for getting address/names --
BluetoothAdapter.getAddress()
BluetoothAdapter.getName()
BluetoothAdapter.setName()
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.
BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).
IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java
TODO:
Javadoc
|