Commit Graph

87 Commits

Author SHA1 Message Date
Jason Monk
2071eda150 Workarounds to avoid removing all prefs
Removing all prefs causes ugly animations, so avoid it at all cost
and cache all the prefs (while still added) as long as possible.

Bug: 26271353
Change-Id: I33b84d751938b460f4b66c0158057407dd45d974
2016-02-26 11:00:01 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jason Monk
f2819e0ead Fix battery usage screen issues
Tint icons properly
Bug: 21077770

Show better icons for wifi and bt (remove the old ones)
Bug: 21172936

Also add a way to show fake items in power list for testing.

Change-Id: I6b6804673a68190ebc3f2ea32802e30811a7f5b2
2015-06-02 16:03:32 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Jason Monk
88643ac6ba Support some changes to SettingsLib
SettingsLib has a couple of bluetooth changes to support quick
settings and as a result a few updates are needed in Settings.

Depends on I7f828f0038ad0cf39274986ece6d486d545f0286
Change-Id: I9b207b74abb0175148fd4a3c421d33ab9a861587
2015-02-24 14:01:47 +00:00
Jason Monk
f2982a9ba1 Move isolatable bluetooth code to SettingsLib
Move the non-ui bluetooth control/tracking code to SettingsLib so
that it can be shared with others.

Mostly just move classes to frameworks/base/packages/SettingsLib,
however a few things had to move around.
 - Dock handling had to move back to code still in settings
 - Local preference related code had to be moved back to settings
 - Added an error flow from SettingsLib to Settings

Depends on I69fd888362c6dbb325f6113b32c4b15cc6a23a41
Bug: 19180466
Change-Id: Ie57fe26a27bbb0adc2ef69e042a05c7290c6a52a
2015-02-05 10:43:57 -05:00
PauloftheWest
a7aef13fbb Fix the truncating of Bluetooth icons.
Bug: 17347150
Change-Id: Iad6bec51bf9327ee0c6752ddaa161aec3b4ff590
2014-09-04 08:27:32 -07:00
Paul West
c0963dd7c5 Revert "Tapping a connected Bluetooth device now presents its settings dialog."
This reverts commit 893be9cc34.

Change-Id: Idefe6a1972ca1130a687632f74051e5b5a2e54e1
2014-08-27 20:31:38 +00:00
PauloftheWest
893be9cc34 Tapping a connected Bluetooth device now presents its settings dialog.
Bug: 14184769
Change-Id: I1de3110dd7460e0329dbe6df99abf3451d3041cc
2014-08-25 15:40:56 +00:00
PauloftheWest
5badff7622 Added a default Bluetooth icon for Bluetooth Preferences.
Bug: 17139683
Change-Id: I7b68950685732a85319a0dca7bd77234d345dbb7
2014-08-20 14:48:38 -07:00
PauloftheWest
da43135d7e bug #15543626 Bluetooth Settings headers need to support Quantum styling
+ Changed cog to teal
+ Eliminated double vertical bar
+ Removed dimming the cog

Change-Id: I6311408658328b5cc9c7e2846a8ba74a32d1af6e
2014-06-18 13:26:19 -07:00
Zhihai Xu
c5f5e93702 am 3cfb6885: am d6b0b172: am 7dd84651: Merge "Display BTH connected status correctly"
* commit '3cfb6885b4075a3887cb0acb437704394fc9e90e':
  Display BTH connected status correctly
2014-04-30 18:44:13 +00:00
Tsuyoshi Kamata
89377530c7 Display BTH connected status correctly
This patch removes incorrect condition.
(to not use LocalBluetoothProfile#isPreferred())
This condition uses the priority that already disconnected profile,
so this codition always returns false.

To verify this issue:
1. Turn on Bluetooth.
2. Pair and connect to BTH(A2DP/HFP)
3. The display now says "Connected"
3. Disconnect HFP profile
4. The display still says "Connected" but it should say "Connected (no phone)"

Change-Id: I9e2bfa6d23bf1be7587c9556b4b05459d02c4817
2014-04-30 18:20:55 +00: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
Maggie Benthall
11b69bf86d Implement Settings app UX for when a user has bluetooth config locked down.
When a user has the user restriction DISALLOW_CONFIG_BLUETOOTH
- Remove all the menu items for searching and other config
- Hide "available" but non-paired devices
- Remove settings button from paired devices
- Remove ability to make the device visible to others

Change-Id: Icaebf29d3cce55d924fdd65449447b5b7a438bbe
2013-04-08 16:05:38 -04: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
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
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
Amith Yamasani
3a5b3494a7 Make the BT class icon visible.
This change is required due to a change in the framework to accomodate smaller screen sizes.

Bug: 4519989
Change-Id: I77c5d72b29dec69df2bdd4d82811f4828ad155a6
2011-06-02 11:48:55 -07:00
Jaikumar Ganesh
50e0b0cf87 Fix settings app not showing correct profile connection state message.
Bug:3385085
Change-Id: Ie4b7eb6bc9d8c91264cf7f68d7830c110e34496d
2011-03-04 10:27:31 -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
3d1fd57e30 Increase size of BT profile icons and decrease alpha for inactive profiles
Increase the size of the Bluetooth profile icons from 20dp to 30dp.
Decrease the alpha for disabled profile icons to 50% of theme default.

Bug: 3400851
Change-Id: Ieb5ecb01ccbd7185d383828e0d9c9f78525ee0c4
2011-01-27 18:33: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
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
Danica Chang
32711b6752 bluetooth tethering
Change-Id: I8dfb1c85bb8b963d2937b8bc4a4c9f0cf641785d
2010-08-17 19:07:07 -07:00
Michael Chan
e6531e253b b/2154978 Show only connectable profiles (Headset and& A2DP but not OPP) in Bluetooth Device Advance Options aka "Connect to..."
Change-Id: I34249a4828707bde491da4a82dca94ecf37cf490
2009-09-30 17:43:12 -07:00
Yue Lixin
a41e2f94b7 Implement Bluetooth device picker
Add Bluetooth device picker in Settings
- add resource to support device picker
- show different UI accroding to start Intent
- add OPP profile manager
2009-08-19 20:45:18 -07:00
Nick Pelly
d63c011225 Bluetooth: Update Settings.apk to match BT API change.
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).
2009-08-17 17:09:44 -07:00
Michael Chan
5eb32e86a2 b/2005377 Fixed the problem where previously paired devics can't be access(grayed out) in Bluetooth settings after a reboot. 2009-08-14 13:57:25 -07:00
Michael Chan
487843886d 2005382 Disable long press on Bluetooth device when BT is off
1930418 Grey BT device when BT is off
2009-07-30 16:35:44 -07:00
Michael Chan
132b21440b Disable the individual remote Bluetooth devices when BT is off 2009-07-01 14:06:43 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
abc48f80d8 Code drop from //branches/cupcake/...@124589 2008-12-17 18:06:01 -08:00