Commit Graph

61 Commits

Author SHA1 Message Date
Fabrice Di Meglio
79d8e80a30 Make Settings app aware of layout direction
- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I696c0f66a16640af767da3c05b5d300fd2284ecb
2012-07-24 15:02:12 -07:00
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Amith Yamasani
5fb53f36cb Don't crash if there's no bluetooth functionality (such as in an emulator)
Bug: 6079494
Change-Id: I12f729134407eaa719dc6a25e89a3b48476985e2
2012-02-27 17:18:45 -08:00
Jake Hamby
9a4543e1de Fix unresponsive UI during scan and display of "No Bluetooth devices"
- When there are no available Bluetooth devices, we show
  "No Bluetooth devices were found nearby" as a preference item after
  the scan completes. Update the layout for this Preference item so
  that the text is centered and doesn't highlight when touched.

- Fix slow responsiveness on scanning caused by repeated removal of
  "No Bluetooth devices were found" preference item on every call to
  onBindView().

- If no devices are paired, don't restart the scan on every rotation.

Bug: 5173935
Bug: 5055460
Change-Id: I52fb2d52f315c5e793f08499146842d54c5c3ead
2011-08-31 17:18:36 -07:00
jhtop.kim
8abbaab8b3 Bluetooth : fix for showing paired device list error
- Pair one devie, then turn off BT then reboot the phone
  and enter Bluetooth settings screen and turn on BT.
  The last paired device will not be displayed in paired list.
- After onResume() is called, the list is shown.

- The reason is that mDevicePreferenceMap is not empty. The paired
  devices are cached when BT is off and then skipped when BT is
  turned on and updateContent() is called again.
- Make the mDevicePreferenceMap clear when updateContent() is called
  and adapter state is BluetoothAdapter.STATE_ON.

Change-Id: Ia745e02bcb4e21a54ccc8477a4dfbad1fa5aed17
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
2011-08-25 11:42:38 -07:00
jhtop.kim
d66b61908d Bluetooth : fix for unnecessary device-scan starting
- When trying to pair with any device, if bond state changes
  device scan will be started automatically.

- add some flag to check proper scan time and to prevent unnecessary device scanning.

Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>

Change-Id: I4977ec122105f33cdd25a4f5c9fed59dda916379
2011-08-24 15:31:40 -07:00
Jeff Sharkey
dcf8ba9eb2 Follow preferences padding changes in framework.
Change-Id: Ia83237290da035e5ee7a2e92ef56fc02838aac56
2011-08-16 16:37:49 -07:00
jhtop.kim
e96f04c1ff Bluetooth : fix for Settings crashes while rotating the screen.
- Add some codes preventing setting crash when rotating the screen
  when the Rename device or Visibility timeout dialogs are visible.

Change-Id: I5e142a5d869a0d5c91c6ace80093d09178d79558
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
2011-08-15 15:14:58 -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
Jake Hamby
49cfe8a3c8 Fix some Bluetooth settings bugs.
- Remove BluetoothFindNearby.java (no longer used)
- Show message when Bluetooth is turning off
- Fix case where device name sometimes didn't show when turning BT on
- Disable "Rename device" and "Visibility timeout" menus when BT is off
- Remove "Got onDeviceAdded, but cachedDevice already exists" log message
- Never show "Rename device" in action menu (bug 5064378)
- Show discovery time remaining as "m:ss", not "mm:ss" (bug 5064104)

Bug: 5064378
Bug: 5064104
Change-Id: I79609dfdad61993a28cff64c9e082870ff74d180
2011-07-25 14:57:07 -07:00
Jake Hamby
ca9812a852 Upgrade Bluetooth pairing dialogs for ICS.
* Change Bluetooth pairing dialogs to match ICS wireframes.
* Default to numeric soft keyboard for PIN entry, and add checkbox
  to allow user to switch to alphanumeric keyboard if necessary.
* Move all Bluetooth advanced settings into action bar menu.
* Toggle visibility by touching "My device" entry in devices list.

Change-Id: Ic2377eb4364f41d215181cb1e3933997c9db9106
2011-07-15 15:39:53 -07:00
Gilles Debunne
6dc0f9639e Refactor Bluetooth settings
Two lists: paired devices and available devices.
New item at top for the device itself (not connected to discoverable, this is a larger
refactoring).

New settings icon.

Change-Id: I788a6c0afdb07309d449a4d41a02cf8480c95a37
2011-07-08 09:40:47 -07:00
Gilles Debunne
18e9992a5e Changed text and appearance when Wifi/Bluetooth is off
A TextView is used as an empty view, centered on screen with the message.

Change-Id: I33825775d6b2ed212e5839cfac84d055b9336667
2011-07-07 16:04:00 -07:00
Gilles Debunne
9416136b4d Bluetooth messages improved.
Tap to pair in place of searching. Message when no device is found.

Change-Id: I0a4b1fa140e8a30b154ae2686e9c75d3768fc44e
2011-06-30 15:44:07 -07:00
Gilles Debunne
4346cda76c Double list in Bluetooth Settings
Paired devices are listed first (from cache), followed by unpaired ones.
A scan is only started on user request or when there is no paired device
(should it be when there is no paired *connected* device?).

Wrench icon only displayed for paired devices.

Wrench click listener no longer uses mDeviceSettings which is unreliable
with ListView view recycling.

Fixed blinking ProgressCategory when the category was first in the list.

Change-Id: Ie749883426c12bd354da64733bd04b00304bc1f5
2011-06-28 18:17:30 -07:00
Gilles Debunne
dc7101ff88 Split ActionBar in Settings
Made menu item visible to force action bar, changed style.

Also change parent_fragment for items that have been moved to top level (wifi,
bluetooth, development, battery).

Change-Id: I62932ba55356abdfbf94942f5b4efaa0f15dbd6a
2011-06-27 17:00:23 -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
f1139aab80 Fix NPE in WirelessSettings.onCreate() for SDK and non-BT devices.
Fix NPE when entering Settings app in the SDK (and for devices without
Bluetooth). Also remove the "Bluetooth settings" item in addition to
the Bluetooth toggle item from Wireless settings when BT is missing.

Bug: 4149307
Change-Id: Iecc5960a193cf88664d3217b4d7bdbc2276dabc0
2011-03-28 20:25:23 -07: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
Chris Wren
1b0489cb3e Allow users to change the length of Bluetooth discoverability to
be two minues, five minutes, an hour, or forever discoverable.

This addresses the internal bug 2413429:
	http://b/issue?id=2413429
and external issue 6348:
	http://code.google.com/p/android/issues/detail?id=6348

Original Author: Chris Wren <crwen@google.com>
Modifications done by: Jaikumar Ganesh<jaikumar@google.com>

Change-Id: Ie12e56ac41aa01a161d263c7525b6e021d4eeb1f
2011-02-01 16:25:44 -08:00
Jake Hamby
4ee12032a3 Implement "show received files" preference item.
Add handler to send an intent to the Bluetooth OPP app to show the
list of received files to the user.

Bug: 3167219
Change-Id: I59e18559a0c35add7f1be56a5f040dae4dccc7f1
2011-01-26 10:51:32 -08:00
Jake Hamby
2748fc24cf Close scan screen when pairing and remove device when unpairing.
Close the scan screen after successful pairing, and remove a
device from the list of paired devices after unpairing.

As part of the fix, BluetoothSettings was refactored into a parent
class, DeviceListPreferenceFragment, and three subclasses for each
variant type: BluetoothSettings, BluetoothFindNearby, and
DevicePickerFragment, replacing the checks against mScreenType with
custom logic in the child classes.

Bug: 3325848
Change-Id: If64fddc3ba5b4f1136451491c7d5a1139b696e47
2011-01-12 20:33:27 -08:00
Jake Hamby
c6e1b293a7 Don't throw exception on unexpected BT device addition.
Fix for reported bug where settings app crashes while trying to share
a picture. Bug report showed IllegalStateException thrown with message
"Got onDeviceAdded, but cachedDevice already exists." Changed code to
print an error message to the log and ignore the unexpected event,
rather than throwing an uncaught exception that crashes the app.

Bug: 2192884
Change-Id: I016be6a1616b317b2289768d18ae9f069a49445e
2011-01-11 13:27:50 -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
3f0f998aa7 Remove Bluetooth tethering settings screen.
Remove obsolete Bluetooth tethering settings screen. BT tethering can
be turned on and off, but the connection must be initiated by the
remote device. For reverse tethering, there will be a checkbox for
that profile in the regular Bluetooth device settings screen.

Bug: 3283928
Change-Id: Ic25139f8862b305feb0381e61c24b7783fad2366
2010-12-14 13:40:10 -08:00
Jaikumar Ganesh
498d12bac0 Add ability to connect to only headset profile.
Fix some SDP records issues.

Change-Id: I42816527b1ae0749b4b59b7947f1acb9d2e6f001
2010-12-10 17:51:52 -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
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
Amith Yamasani
290ba7c1ae Fix NPE in BT Settings launch from a shortcut.
Bug: 3089335
2010-10-13 13:33:32 -07:00
Daisuke Miyakawa
6ebf8619d7 Fragmentize BluetoothSettings.
Add UserLeaveHintListener.java, so that the settings won't use
its implementation around Activity#onUserLeaveHint().

Also fragmentize bluetooth tethering screen.

Change-Id: Id06ae3161fbdb5854ddb7a257f464fb16ea9b089
2010-09-13 16:18:05 -07:00
Jaikumar Ganesh
8eb4986049 Match devices by Class for tethering.
Change-Id: I711de3c8d6f6b1dafeec4fb5dde4fa33d997bcca
2010-08-23 11:49:19 -07:00
Jake Hamby
2cd6aad561 am 2876ad62: am 2fcfb289: Merge " Fix Bluetooth Settings activity memory leak."
Merge commit '2876ad62082207e0e02cbc38b65ce9993cb121bf'

* commit '2876ad62082207e0e02cbc38b65ce9993cb121bf':
  Fix Bluetooth Settings activity memory leak.
2010-08-21 09:35:49 -07:00
Danica Chang
32711b6752 bluetooth tethering
Change-Id: I8dfb1c85bb8b963d2937b8bc4a4c9f0cf641785d
2010-08-17 19:07:07 -07:00
thigobr
d4cebee1e4 Fix Bluetooth Settings activity memory leak.
There were two leaks in Bluetooth Settings: one when rotating the
    phone and other when scanning for bluetooth devices.
2010-08-17 12:59:41 -03:00
Jaikumar Ganesh
cdc5e6eea2 Stop scanning as soon as device is picked in the device picker.
This improves OPP transfer time by a couple of seconds.

Change-Id: I40e8f092ca3950a2d180b78f07f1cc717f2daaf6
2010-03-25 14:21:10 -07:00
Michael Chan
628f9b3889 b/2482585 Bluetooth settings: remove "Scan for devices" from menu
Change-Id: I206794245a6afeb97366dd32e609f4e7f9374c20
2010-03-02 17:42:32 -08:00
Michael Chan
bd0b2542a8 am a87f2fd7: b/2320107 Fixed NPE for class bits. Docks do not have class bits.
Merge commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef' into eclair-mr2

* commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef':
  b/2320107 Fixed NPE for class bits. Docks do not have class bits.
2009-12-10 19:48:21 -08:00
Michael Chan
a87f2fd7d8 b/2320107 Fixed NPE for class bits. Docks do not have class bits.
Change-Id: Ibe4f697a906010f8f3ee270b891db286a4976f8a
2009-12-10 16:07:11 -08:00
Michael Chan
4fcf94c47b am 5469ff8b: b/2226832 Showing Pairing Dialog in the foreground
Merge commit '5469ff8b3f9966c6f141078b37da5f178b7825e4' into eclair-mr2

* commit '5469ff8b3f9966c6f141078b37da5f178b7825e4':
  b/2226832 Showing Pairing Dialog in the foreground
2009-11-10 11:06:36 -08:00
Michael Chan
5469ff8b3f b/2226832 Showing Pairing Dialog in the foreground
Pairing Dialogs notifications (in the window shade) were not visible in full
screen apps e.g. gallery.  Showing Pairing Dialog in the foreground:
1) if the remote device was picked in the device picker in the last minute or
2) if the device was in discoverable mode in the last minute.
2009-11-10 10:37:54 -08:00
Jaikumar Ganesh
db99bb3644 am c065348e: Show an error message when the remote side cancels the authentication and show OPP device list correctly.
Merge commit 'c065348ebaf1ea9301d7b96633bea4de8c78c2aa' into eclair-mr2

* commit 'c065348ebaf1ea9301d7b96633bea4de8c78c2aa':
  Show an error message when the remote side cancels the authentication
2009-10-08 17:30:28 -07:00
Michael Chan
81cdaff7b5 b/2173596 Cancel Bluetooth scanning when the user leaves Bluetooth Settings.
Change-Id: Ib4dd6254c90da619e853b1be22fba3ff1365258e
2009-10-08 11:55:47 -07:00
Jaikumar Ganesh
c065348eba Show an error message when the remote side cancels the authentication
and show OPP device list correctly.

Dr No: Eastham
Bug: 2174874
2009-10-08 08:06:27 -07:00
Nick Pelly
079ee952bd Update application for android.bluetooth.ParcelUuid -> android.os.ParcelUuid
Change-Id: Iebf2b3ea9cac224e3e6c67e503b1063491dce5bb
2009-09-28 13:05:28 -07:00
Lixin Yue
cd47ae6af2 Fix device picker minor bug
When in device picker screen, if other device triggers pairing process with own
device, after paired succssfully, it should not send intent to OppReceiver to
start file sending. We need check if the paired device is the one user selected.

Original Author: Lixin Yue
Modified by: Jaikumar Ganesh (jaikumar@google.com)

Change-Id: I32df995ba94417470cccaead492844a9c61c0846
2009-09-25 10:27:25 -07:00
Jaikumar Ganesh
1bfe73d0b1 Filter devices by UUID and then class.
The settings app has been updated to use UUIDs.
When there is a filter type set for device picket UI, use the
UUIDs first and then the class bits.

Change-Id: Ifde5dbc3a1cf25babce4c686002315aa3933de59
2009-09-23 10:35:36 -07:00
Nick Pelly
16cc86315d Update application for Bluetooth API changes.
Change-Id: I8351611f0f0c5eda3e423dbe7e7b53e52d75ac36
2009-09-10 18:44:25 -07:00
Nick Pelly
f4779354b3 Update application for Bluetooth API change: deprecation of BluetoothError. 2009-09-08 17:49:57 -07:00
Nick Pelly
ca564d6bda Update application for Bluetooth API change. 2009-09-08 16:24:03 -07:00