Commit Graph

25 Commits

Author SHA1 Message Date
PauloftheWest
8677d04512 Material design updates for Bluetooth Settings dialog.
Bug: 17140512
Change-Id: I93dd89c3f12d8abe2041dd68faef8daf981252fb
2014-09-05 10:29:17 -07:00
PauloftheWest
b358f6d0f2 Fixed a crash when sharing video through Bluetooth.
+ Fixed an issue where Settings would crash when the user tries to share a
youtube video through Bluetooth and rotates the screen.

Bug: 17023413
Change-Id: Ied284da736cf9bfc7424982a516c8305c700dd0b
2014-08-21 08:18:30 -07:00
PauloftheWest
b58e2005ab Fixed a Settings dialog crash.
+ Fixed a bug where Settings would crash when trying to open paired bluetooth
device settings after device orientation change.

Bug: 16972564
Change-Id: I0e93551ae7d8f21711d85093756fc33b62f59b24
2014-08-20 11:44:36 -07:00
PauloftheWest
689d2ce29b Changed a Bluetooth device's settings from an activity to a dialog.
+ Replace the “Paired bluetooth device” screen with a “Pair device” dialog
+ Add device name text field at the top
+ Replace “Unpair” list item with a “Forget" button at bottom of dialog
+ Change “Profiles” section header to “Use for”
+ Remove status under profile titles
+ Move checkboxes to left side of labels

Bug: 15719219
Change-Id: I3b0e8c82c761fae98f16508b9fd9c58aff651f80
2014-08-07 11:31:25 -07:00
PauloftheWest
361d870e54 Added ability for user to automatically accept/deny Bluetooth Phonebook Syncs
Bug: 16040292
Change-Id: Ieeaa014052f53787cf7057578e0b2ac048dc6eb1
2014-07-30 08:39:46 -07:00
Fabrice Di Meglio
fa46de5c68 Search - fix remembered Bluetooth devices indexing
We were indexing the remembered device names but we were missing the
informations for launching the correct Activity from the Search result.

- add the missing information: className and iconResId

Change-Id: Ib6781d4c492c296e822da1b5a8a2a76c92ecd586
2014-04-11 14:03:28 -07:00
Fabrice Di Meglio
3b22695670 Fix issue about at which time Bluetooth devices name are indexed
- remembered devices name were only indexed when BT was turned on/off
- allow the same when they are paired
- remove device name from the Index if it is un-paired

Change-Id: I1206a591b0132789c3b003e52c7ffac630e80758
2014-04-08 17:49:01 -07:00
Jake Hamby
904d3726d4 Allow disconnected BT profiles to be unchecked in Settings.
In the Bluetooth profile list, the checkbox indicates whether the
profile is preferred (we should auto connect). If the profile is
not connected, selecting it will try to connect the profile and set
it to preferred. If the profile can't be connected, then the user
could not turn off the preferred setting for the profile.

Change the behavior so that when a profile is not connected,
but is marked as preferred, selecting the profile will turn off the
preferred setting (no auto connect) instead of trying to connect.
This enables the user to turn off auto connect for a profile when
it can't be connected. Tapping a second time will try to connect
the profile and set it as preferred, as usual.

Also change PanProfile to return the current connection status for
isPreferred() instead of always returning true. Currently, the
PAN profile is always checked, which is confusing because it looks
like PAN is always connected. Also, because of the new behavior
when a profile is selected, it's now necessary to return false for
isPreferred() when PAN isn't connected, so that we will try to
connect when the user selects it, instead of trying to turn off
the preferred setting, which isn't supported for PAN.

Bug: 7007641
Change-Id: Ifb0f51a15379bc254933168c43bdfc8b22f26051
2012-10-04 17:42:38 -07:00
Kausik Sinnaswamy
c78d71e16c Revert "Changes done to update UI with appropriate checkbox state, when AVRC Connect is initiated from the headset. Earlier, the checkbox state was not being updated when the connection state changed for media audio, when connected from headset"
This reverts commit 2f9d962940cb92c7f70576a29f263258f6abc478
2012-07-16 15:38:38 -07:00
Sreenidhi T
c7b490c7a0 Changes done to update UI with appropriate checkbox state, when AVRC Connect is initiated from the headset.
Earlier, the checkbox state was not being updated when the connection state changed for media audio, when connected from headset

Change-Id: Ic46a8a87b74cbe76f0e8b62428516af5594526ec
2012-07-16 15:38:38 -07:00
Jaikumar Ganesh
f5754a078c Fix UI issue with Bluetooth Settings.
When a profile fails to connect, the preference was getting unset.

Patch generated in conversation with Jake Hamby.

Bug: 5526404
Change-Id: I27ab8d337b6d121f8d369841d3f9a691293ef922
2011-10-27 16:39:50 -07:00
Jake Hamby
79be0b3e6b Fix multiple BT settings bugs.
- Change Bluetooth profiles screen to match ICS wireframes
- Remove BluetoothProfilePreference.java (no longer used)
- Remove "Pair with this device" summary below every unpaired device
- Remove "Paired but not connected" summary below unconnected paired devices
- Fix auto connection after pairing (reuse existing CachedBluetoothDevice)
- Add "Connected (no phone/media)" summaries based on ICS wireframes
- Fix visibility timeout strings.
- Fix crash when starting Bluetooth from Settings shortcut widget.

Bug: 5064139
Bug: 5064324
Bug: 5080404
Bug: 5093513
Bug: 5104485
Change-Id: Ie87103e183ce414c86cb1831a38ef0178b1b1292
2011-08-03 17:55:27 -07:00
jhtop.kim
298365bbf3 Bluetooth : Fix for changing the BT device icon if the calss is null (mouse)
- mouse is displayed as keyboard. if class is null, default icon is keyboard in hid profile

Change-Id: I2ff928ce1032d8eb492d81fff2e7fb218970b768
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
2011-07-18 15:54:14 -07:00
jhtop.kim
01525c9a05 Bluetooth : fix to finish deviceprofilesettings activity when device is not bonded
- if cached device state is "BluetoothDevice.BOND_NONE" then finish activity

Change-Id: I5c981e8c4800c10f1f8570668794301d5da03188
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
2011-07-18 15:49:12 -07:00
jhtop.kim
5ab6b6b004 Bluetooth : fix UI bug: Disable "OK" button if friendly name is null
- If device's name is null, BT address is set as friendly name.
- so, fixed. if name field is null "OK" button is disabled.

Change-Id: I04b59ebf13d1b3203acf7345bd531cc6c563da0d
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
2011-07-18 15:44:14 -07:00
Gilles Debunne
e78c187905 Settings refactoring
Wifi and bluetooth pane refactored, main toggles moved to left pane.

Change-Id: I42ea4cf3bdf24158f3c67e0dea311258206cd78a
2011-06-21 11:05:29 -07:00
Jake Hamby
c777ee29c8 Improve Bluetooth tethering UI usability.
- Updated hint text for BT tethering checkbox to
  "[Sharing|not sharing] this [tablet|phone]'s mobile data connection".
- Show correct hint text when user enters tethering screen.
- Show correct status after user enables tethering when Bluetooth is off.
  When BluetoothPan.setBluetoothTethering(true) is called with BT off,
  BluetoothPanProfileHandler will add a broadcast receiver to enable
  tethering after BT turns on. This happens too late to show the correct
  status when TetherSettings gets the adapter state changed event, so set
  a flag (mBluetoothEnableForTether) instead, and call setBluetoothTethering
  ourselves after the state changes to ON. Also, clear the flag if the
  adapter state changes to OFF or ERROR.
- Show correct status when user enables tethering, then disables Bluetooth,
  then returns to the tethering screen. Previously it would show
  Bluetooth tethering enabled, even though adapter state was OFF.
- Show the number of connected devices in tethering preference screen.
- Distinguish between PANU and NAP in device profiles screen, and show
  appropriate text to clarify the direction of tethering.
- Remove profiles from device profiles list when the device removes the UUID
  (e.g. Mac OS X turning NAP on/off) and after a NAP disconnection when the
  remote device only supports PANU.

Bug: 3414575
Change-Id: I2c0830876d5b9bddb293e57c4d3ca74f105911b8
2011-03-09 14:56:56 -08:00
Jake Hamby
436b29e68e Refactor Bluetooth settings for readability and performance.
Major refactoring of Bluetooth settings classes.
- Moved all functionality from LocalBluetoothManager into new
  LocalBluetoothAdapter and LocalBluetoothPreferences, and into
  existing classes.
- Refactored functionality from BluetoothEventRedirector into new
  BluetoothEventManager class, deleting the original version. New
  version uses a HashMap from action Strings to implementers of the
  BluetoothEventManager.Handler interface.
- Created new BluetoothDiscoveryReceiver to update shared preferences
  timestamp for Bluetooth discovery start/finish. This is the only event
  handling we need to do when the settings app is not visible, so it has
  its own receiver entry in AndroidManifest.xml. Edits are written using
  QueuedWork.singleThreadExecutor(), which BroadcastReceiver knows about
  and will wait for completion, eliminating the need for PendingResult.
- Miscellaneous cleanups to code style and logic for readability.
- Pulled some large switch statement code blocks into new methods.
- Changed all Bluetooth state references to the new BluetoothProfile
  constants.
- Changed use of deprecated Notification constructor in
  BluetoothPairingRequest to use Notification.Builder.
- Moved Utf8ByteLengthFilter helper function from BluetoothNamePreference
  into its own class, and moved test cases into the same package.
- Moved all LocalBluetoothProfileManager functionality related to
  specific profiles into new top-level classes (A2dpProfile, etc.), all
  implementing the LocalBluetoothProfile interface.
- Moved all UI-related methods from CachedBluetoothDevice into the class
  that uses the method, or into the static Utils class for shared methods.

Change-Id: I6d49b7f4ae0c7d7dcf62551ee40b51ecb5fe4f47
2011-03-01 18:44:36 -08:00
Jake Hamby
51cd0d6d29 Remove "Allow incoming file transfers" option from BT settings.
The user preference to allow automatic incoming file transfers for
specific devices isn't implemented yet. Remove the preference from
the settings UI.

Bug: 3385941
Change-Id: Ib8fee9a0d99063a8c05d52a960664364e4812ace
2011-01-25 13:57:30 -08:00
Jake Hamby
55b7d27936 Only show "Allow incoming file transfer" option if device supports OPP
In the Bluetooth profiles settings screen for a device, the "Allow
incoming file transfer" item should only be shown if the device
supports the Object Push Profile.

Bug: 3297633
Change-Id: I4bbe66ef901feef9dd8a3916fb9827120c1fdfc0
2011-01-11 19:27:17 -08:00
Jake Hamby
39ef225e7c Enable reverse tethering in BT settings screen.
- Enable support for reverse tethering in BT settings.
- Add string resource for "Auto connect" preference.
- Remove unused imports and other minor cleanups.
- Add isConnectable() and isAutoConnectable() methods to Profile
  enum type and remove isConnectableProfile() method.

Change-Id: Ie606db04028a8278e98231f0671a388671f2f067
2010-12-22 14:54:33 -08:00
Jake Hamby
c090feb64f Implement BT settings functionality for new UI.
- 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
2010-12-09 16:32:41 -08:00
Amith Yamasani
43a673053f Use the new Preference:icon attribute and placeholder for showing icons on the left. 2010-11-17 16:37:16 -08:00
Jake Hamby
e79f990490 Implement individual Bluetooth profile connect/disconnect.
Allow individual Bluetooth profiles to be connected/disconnected from
the device's settings pane.

Bug: 3137982
Change-Id: I21512c5bf965fc523f3dc1e83d029b16b5e22440
2010-11-03 13:02:59 -07:00
Amith Yamasani
48e9000283 Bluetooth settings revamp
Added a separate scanning screen.
UI changes to not require long-press options.
Needs TODOs to be filled by BT team.

Bug: 3038327
2010-10-27 16:23:05 -07:00