- Removed context menu logic for long press (no longer used).
- Converted device picker to run in its own Activity, using a dialog
theme on large screen devices and full-screen on phones.
- Removed unused resources.
- Add device to "Paired devices" list when pairing is initiated by the
remote device.
- Return to Bluetooth settings pane after successfully pairing a new
device from the "Find nearby device" pane.
- Add support for renaming devices (TODO: persist the custom name and
update the "bread crumb" in the action bar to the new device name).
- Add support for incoming file transfer and auto connect checkboxes
in DeviceProfilesSettings.
- Show available and connected device profiles as icons instead of
summary text. Available but disconnected profiles are drawn in gray.
- Fixed bluetooth_notif_message to include the device name as a parameter
instead of appending the name to the end of the localized string.
- Changed some fields from private to package scope for more efficient
access from inner classes.
Bug: 3137982
Change-Id: Ic2d6ee5be60c9c5b3f3a8a58846d58efedfa5c93
Allow individual Bluetooth profiles to be connected/disconnected from
the device's settings pane.
Bug: 3137982
Change-Id: I21512c5bf965fc523f3dc1e83d029b16b5e22440
Merge commit '0d5e320cdd9cbd76012c0a1aec157e358d05891e'
* commit '0d5e320cdd9cbd76012c0a1aec157e358d05891e':
Call disconnect / connect without checking the current status
Merge commit '022299dfce6a705a8cbaff972a4309da6e90a8c2' into gingerbread-plus-aosp
* commit '022299dfce6a705a8cbaff972a4309da6e90a8c2':
Disconnect dock only if its connected.
Scenario: BT is off, device is paired with the desk dock.
Media is switched off. So when the user docks, it was trying to
disconnect even when BT was off and hence DBUS was crashing.
Bug: 3097224
Change-Id: I13e1dd4459c47d5ba9a403f2ae1cc8a131f02a08
Merge commit '8021537ffea45d1a36274217610a314b3a0ac774' into gingerbread-plus-aosp
* commit '8021537ffea45d1a36274217610a314b3a0ac774':
BT settings wait for HS service before connect. DO NOT MERGE
Bluetooth connections from Settings app can sometimes fail if the
connection to BluetoothHeadsetService isn't ready. Changed code to
delay any headset connect or disconnect attempt when the service isn't
connected until onServiceConnected() is called.
Tested by adding a call to Thread.sleep(5000) before the return
statement in BluetoothHeadsetService.onBind(). This makes it easier to
kill the phone process and then attempt to connect in the settings app
before the service restarts.
Bug: 3048839
Change-Id: I2114ff8ad67c8c672fcf6ce0bf3de61fca7a49b3
Merge commit '0340371297887290d7593d7c346e422a4c9ecd1a' into gingerbread-plus-aosp
* commit '0340371297887290d7593d7c346e422a4c9ecd1a':
DO NOT MERGE Add null check before disconnecting a device.
Merge commit 'bdf1310707e436db484113d7aa2881c966cddd0f' into gingerbread-plus-aosp
* commit 'bdf1310707e436db484113d7aa2881c966cddd0f':
Call disconnect / connect without checking the current status
Its the job of the framework to check that, it already does that.
Framework will queue the commands. Earlier settings app used to queue
them.
Bug: 3076404
Change-Id: I664e1c4e2c0ef9c697066251ccca382ad12dfa2f
Merge commit 'd7f7213af27fa6c5e476bb8a8d2951feb5e630b5'
* commit 'd7f7213af27fa6c5e476bb8a8d2951feb5e630b5':
Fix bug where car dock sometimes doesn't connect.
Merge commit '4c0ff2c7b5138c0fce6c83f6c414204e32ac96f3' into gingerbread-plus-aosp
* commit '4c0ff2c7b5138c0fce6c83f6c414204e32ac96f3':
Fix bug where car dock sometimes doesn't connect.
Attempt to connect to car/desk dock after pairing completes. This
fixes a bug where we didn't try to connect if we received the UUID
change intent before the bonding state change intent.
Change-Id: I7c12a4eb23d17d506e43a64bf2a3aa5241debcb9
Merge commit '68c6188b91ca4034caeff7527487513c8cb012f8'
* commit '68c6188b91ca4034caeff7527487513c8cb012f8':
Auto-connect Bluetooth device only when user initiates pairing.
Merge commit 'dd79a33ba53fec530094f4d2fe37f0538530d9f8' into gingerbread-plus-aosp
* commit 'dd79a33ba53fec530094f4d2fe37f0538530d9f8':
Auto-connect Bluetooth device only when user initiates pairing.
Fix bug 2271901: do not auto-connect to services on a BT device
when pairing was initiated by the device (e.g. for OPP file transfer).
Also corrected some typos and removed an unneeded lock object in
LocalBluetoothManager (synchronize on .class object instead, like
android.bluetooth.BluetoothDevice.getService() does).
Change-Id: I121105c6eee2658129f6094786754bbc7932d324
Merge commit '5496db047df21a44280c56984dbc296e2a1d7968'
* commit '5496db047df21a44280c56984dbc296e2a1d7968':
Fix Bluetooth device name max length checking.
Merge commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336' into gingerbread-plus-aosp
* commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336':
Fix Bluetooth device name max length checking.
The Bluetooth device name has a maximum length of 248 bytes in UTF-8
encoding. The settings app previously limited the Bluetooth device
name entered by the user based on the number of characters, which is
incorrect when the name includes non-ASCII characters.
Created a new Utf8ByteLengthFilter class for BluetoothNamePreference
which counts UTF-8 bytes instead of Unicode characters, along with
unit tests.
We can move Utf8ByteLengthFilter into the framework in the future
if it would be useful elsewhere in the system or for applications.
Change-Id: I9debface09659f09d750f3bfe8ad6ddfd34c75c5
Merge commit '356745ecc63419a2569345186e8612a5b0ced28d'
* commit '356745ecc63419a2569345186e8612a5b0ced28d':
Don't disconnect the same device before connecting.
Merge commit '213d579f98a83145989f11cfdbd47631b64de000' into gingerbread-plus-aosp
* commit '213d579f98a83145989f11cfdbd47631b64de000':
Don't disconnect the same device before connecting.
We Pair: Remote device sends incoming connection, we get connected.
We get BondingState change and we connect.
Settings app disconnects connected profiles and then connects
without checking whether we are disconnecting the same device itself.
How was it working before ? Settings app used to queue all
commands. The disconnect followed by the connect would work
but unnecessarily disconnect and then connect.
With the queuing moved to framework, the connect fails
since the disconnect status has not been broadcasted.
Settings app shouldn't be disconnecting connected profiles.
That logic should reside in the framework. There is an open bug
and when the new APIs get implemented this will get removed.
Change-Id: I32a7fa36ff3c3321691c55071498f985dcdcfe8e
Merge commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb' into gingerbread-plus-aosp
* commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb':
Use new apply() instead of commit().
apply() starts an async disk write and doesn't have a return
value but is otherwise identical in observable effects.
Change-Id: I0f528607319d7eb5136bb11fce0b24d8741ccdf9
Add UserLeaveHintListener.java, so that the settings won't use
its implementation around Activity#onUserLeaveHint().
Also fragmentize bluetooth tethering screen.
Change-Id: Id06ae3161fbdb5854ddb7a257f464fb16ea9b089
Merge commit '6e6d05801e68e8d2cee2c708274dc8226f04f756'
* commit '6e6d05801e68e8d2cee2c708274dc8226f04f756':
BT: The Phone doesn't "wake up" when trying to pair with it.
Merge commit '83c3b64ff7235e1382712a899ab0a269ce8a28d6' into gingerbread-plus-aosp
* commit '83c3b64ff7235e1382712a899ab0a269ce8a28d6':
BT: The Phone doesn't "wake up" when trying to pair with it.
To improve the pairing request usability:
- In the case where a notification shall be used the standard
notification sound is added
- When the screen is off notification is always used.
Change-Id: I751a7913517c64de5d7ba06d7c17358197d002c5
There were window leak in the settings application.
These leak happens when an AlertDialog displays, rotate the phone,
then it would cause window leak.
Change-Id: I914897bf657933efea72eeea66076dc288098420