History log of /packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
77ad3c2531c00c7b654162be826e93abb5e4dc75 27-Apr-2016 Sanket Agarwal <sanketa@google.com> Handle return value when Bluetooth is enabled

If the Bluetooth enable(true) returns false currently we are waiting for
a broadcast (which may not happen if enable returns false). We mark the
toggle to have failed (i.e. it is clickable and in OFF state) and the
switch bar text is appropriately shown.

Bug: b/28318203
Change-Id: I09ba46d2e102e7f2c4ef9a72bf38dedc1346364f
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
9d1bfd1e8de6e46137a9571507c03526880d6a46 27-Jan-2016 Chris Wren <cwren@android.com> port settings over to new metrics enum

Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
1b6ffba9e69dc1926e3c4cbcb52d1844c6ccaa32 08-May-2015 Chris Wren <cwren@android.com> log more settings actions

airplane mode
bluetooth
cell data
do not disturb

Bug: 20264417
Change-Id: I726033a126fba9f9dffc916806d636feea04033b
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
f2982a9ba19340b474bafb6b0bf5832673984e0d 04-Feb-2015 Jason Monk <jmonk@google.com> 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
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
fc1b00cfe439b0c462b3acbba709c3cbc1132a1f 28-Jan-2015 Jason Monk <jmonk@google.com> Move some wifi tracking code to SettingsLib

Move tracking of which networks are available/saved and their state
over to SettingsLib to share it with Quick Settings.

Bug: 19180466
Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
797fc45ff65eccb6f967e93de913622c5225fb95 01-Oct-2014 PauloftheWest <paulofthewest@google.com> Fixed a Setting Bluetooth Airplane mode bug.

+ This patch moves the switch listeners from setup/teardown of the SwitchBar
to pause/resume of Bluetooth Settings. This prevents Bluetooth from
receiving connect messages while Airplane mode is turning off Bluetooth
(which is what caused Bluetooth to re-enable.)

Bug: 17465951
Change-Id: I4d32fcf5bb3a2241ed03e2295c86390e15743954
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
138ff8c0457c6e1345015973668d652fa17c7c3b 12-Jun-2014 Fabrice Di Meglio <fdimeglio@google.com> Make the SwitchBar appear immediately

- change the way the SwitchBar is shown and hidden
- save its state
- remove the delay transition code

Change-Id: I07260430e6709b42517ca011f6d3c3446a626731
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
cf37cb6bbc07ad8fd3833763ff9229c072711002 15-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Use SwitchBar for Bluetooth Settings

- follow up CL to 41937766981423c9252e12e3319b2e7532739627

Related to bug #14898161 On/Off switches must move down from Action Bar

Change-Id: Ic04de39599c91388cba8510bfd46d96e7bc30260
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
131f49feea754c25954945f4cd47a2f1223a6fdf 21-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Better decoupling of Index updates in Bluetooth Settings

- use a Handler
- force rebuilding

Change-Id: I474fa98ea0e0758abcc46d4812f744dff24fd455
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
490099b1352f9a4dd5c3f2becf3707d5c0d78452 14-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Allow partial Index rebuilding thru updateFromClassNameResource(...)

- add a new boolean parameter to ask for Index rebuilding:
passing "true" will delete first all the data corresponding to the
"className" and then apply the update.

Change-Id: Ifc42fc560a14f5470b466cf6982915d9207fa3c7
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
51bfee595c3ce587e2e26565fd9e8f4ae02c3482 21-Mar-2014 Fabrice Di Meglio <fdimeglio@google.com> Add dynamic Preferences indexing (part 2)

- change the Index SQL model. Add a new "enabled" column.
- use that column for issuing a more restrictive search query
- change the SearchIndexProvider API to pass the "enable" state
- apply it to Bluetooth settings
- refactor the list of indexable resources (SearchIndexableResources)

Change-Id: Ic900fb27cb12a285a80d953aa1aa88f0070cd986
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
a504c4dcdf18be1be9f67cf83b506638f19077b8 15-Feb-2014 Matthew Xie <mattx@google.com> Update context on resume calls for BluetoothAdvertisingEnabler and BluetoothEnabler

The saved context could be invalid if not updated
bug 12991455

Change-Id: I93abb8420d0fa53add1f0e843a5069d59743891c
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
5a740ab1b9d5757d684f6a798932f0b4729cc9a7 19-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "More migration to Global settings." into jb-mr1-dev
860eceba2c1e5aea13eafb0d60b64abe9f7c700d 19-Oct-2012 Jeff Sharkey <jsharkey@android.com> More migration to Global settings.

Bug: 7375796
Change-Id: I43079368c32e91e8bb75b00377cd57d1766f15d4
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
ec16c0ae42ca6092e543b553981e9f426838f237 18-Oct-2012 Zhihai Xu <zhihaixu@google.com> bluetooth won't turn on after turn Airplane mode off on setting screen on manta(tablet)

The root cause is normally when change the airplane mode, the bluetooth setting UI
will not be foreground. No listener is setup for bluetooth setting UI when it is
in background. So the onCheckedChanged won't be called and mLocalAdapter.setBluetoothEnabled
won't be called. But for manta, airplane mode setting and bluetooth setting UI both
will show on the foreground due to bigger screen size. When we turn ariplane mode on,
bluetooth manager service will disable bluetooth without changing the persist bluetooth setting.
But bluetooth setting UI will listen to the bluetooth state change intent, it will receive
bluetooth state turn-off intent then it will call mSwitch.setChecked(false) in handleStateChanged,
which cause checked status changed from true to false to trigger the listener (onCheckedChanged)
being called. The listener will call mAdapter.disable() which will call mManagerService.disable(true)
to change bluetooth persist state to OFF. So when we turn back airplane more to OFF,
due to the bluetooth persist state is OFF, we won't turn back bluetooth to ON.
Don't need to consider thread synchronization, because everything is running on the main thread.

bug 7366814

Change-Id: I138d1904df6cb17c7828295caa51a7d80abf99f2
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
4aaebfe5911fe33149f88228e7273ac045ad6cba 18-Oct-2012 Irfan Sheriff <isheriff@google.com> Revert "bluetooth won't turn on after turn Airplane mode off on setting screen on manta(tablet)"

This reverts commit 0b21b3d725935c03a4ca4ab8476da2b0675a53cd.
Bug: 7366814

Change-Id: I0992e9ca1a6e36ebc3a717137a6c494835fad712
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
0b21b3d725935c03a4ca4ab8476da2b0675a53cd 17-Oct-2012 Zhihai Xu <zhihaixu@google.com> bluetooth won't turn on after turn Airplane mode off on setting screen on manta(tablet)

The root cause is normally when change the airplane mode, the bluetooth setting UI
will not be foreground. No listener is setup for bluetooth setting UI when it is
in background. So the onCheckedChanged won't be called and mLocalAdapter.setBluetoothEnabled
won't be called. But for manta, airplane mode setting and bluetooth setting UI both
will show on the foreground due to bigger screen size. When we turn ariplane mode on,
bluetooth manager service will disable bluetooth without changing the persist bluetooth setting.
But bluetooth setting UI will listen to the bluetooth state change intent, it will receive
bluetooth state turn-off intent then it will call mSwitch.setChecked(false) in handleStateChanged,
which cause checked status changed from true to false to trigger the listener (onCheckedChanged)
being called. The listener will call mAdapter.disable() which will call mManagerService.disable(true)
to change bluetooth persist state to OFF. So when we turn back airplane more to OFF,
due to the bluetooth persist state is OFF, we won't turn back bluetooth to ON.

bug 7366814
Change-Id: I07d4a2dfe03fc6775cfeabb28cd3a0cc1fded44e
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
2454f49c93a5e45ba5ee9c4c0e88a9de2987e8a9 22-Jun-2011 Gilles Debunne <debunne@google.com> Fixed Bluetooth availability test in Settings

Added similar test for WiFi to be consistent.

Added null tests in BluetoothEnabler.

Change-Id: Ia6e7b150a1bc060c7ce0b4db12ab3f6c958af104
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
e78c1879058571c00879f0d3e756951302adf513 21-Jun-2011 Gilles Debunne <debunne@google.com> Settings refactoring

Wifi and bluetooth pane refactored, main toggles moved to left pane.

Change-Id: I42ea4cf3bdf24158f3c67e0dea311258206cd78a
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
f1139aab801f89a19cf7c95f7c25fe49a4efc67b 29-Mar-2011 Jake Hamby <jhamby@google.com> 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
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
436b29e68e6608bed9e8e7d54385b8f62d89208e 08-Feb-2011 Jake Hamby <jhamby@google.com> 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
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
39ef225e7c44a48aa9cfdf5c56ecd4ddfb95ae89 17-Dec-2010 Jake Hamby <jhamby@google.com> 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
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
c090feb64f674d9840993736a24f9667f8b0e0d5 08-Dec-2010 Jake Hamby <jhamby@google.com> 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
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
b90452f3d26201ea6a231f2150204241e66cd3fb 12-Jan-2010 Chia-chi Yeh <chiachi@android.com> Settings: revise WifiEnabler and BluetoothEnabler.

This mainly changes the way both enablers react to the airplane mode. Now
enablers show a toast message instead of disabling the check box directly. This
avoids the inconsistent state introduced by WirelessSettings which controls the
check box using layout dependency.

Related bug: 2053751
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
1c4e96864f054f0d3d754d21eb4803fe0df6d89f 02-Dec-2009 Jeff Sharkey <jsharkey@android.com> Allow bluetooth in airplane mode when in "toggleable" list.

Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS is a list of
radios that can be toggled while in airplane mode. This CL
changes BluetoothEnabler to respect this.

It parallels the logic in WifiEnabler, which enables OEMs
to allow Wifi changes when in airplane mode.

Most existing devices don't include "bluetooth" in the
toggleable list, which means bluetooth will continue to be
disabled when in airplane mode for those devices.

Fixes http://b/2297314
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
e6531e253bf646324d3a68de0e9cc612c5e1c8ac 30-Sep-2009 Michael Chan <mchan@android.com> b/2154978 Show only connectable profiles (Headset and& A2DP but not OPP) in Bluetooth Device Advance Options aka "Connect to..."

Change-Id: I34249a4828707bde491da4a82dca94ecf37cf490
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
b662f545427c3082b95d780cbc7b162ff930bee9 27-Sep-2009 Michael Chan <mchan@android.com> b/2137747 Fixed the problem where BT is stuck grayed out if you turned off BT, turned on Airplane mode, turn off then on screen, turned off Airplane mode.

Change-Id: I37c628e4a98157ed91d519518773a458dca36c00
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
16cc86315d7a8e1f6a0f3083d0a810a7cb097832 10-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API changes.

Change-Id: I8351611f0f0c5eda3e423dbe7e7b53e52d75ac36
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
f4779354b39353a48d0bec6cc5c71fd73e3f369a 09-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API change: deprecation of BluetoothError.
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
ca564d6bdaa56fba60f499e092e1024fff5d1aba 09-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API change.
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
d63c0112251ab4e4e977545368dd703d875012a4 15-Aug-2009 Nick Pelly <npelly@google.com> 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).
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
f25063aee3d8eeaf3767b3a4bf43e1895f2deb2d 29-Apr-2009 Michael Chan <mchan@android.com> Fixed the Bluetooth On/Off Checkbox in settings so it is enabled/disable properly.

In the BroadcastReceiver, pickup the new bluetooth status from the intent instead
of calling back to LocalBluetoothManager. There could be race condition since
LocalBluetoothManager itself gets the same info via the BroadcastReceiver mechanism.
Also cleaned up logs.
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
e6dd1fa1851302710ac7845d25d8ad8a5b6ee438 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
afc4ab2ffbb8327ddce9907961295a32cbf49d0f 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
4e14e5ccbf1ef27220419849133d482a546d5c04 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java
abc48f80d8747b4fc051b7dd364355ee667a9bac 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEnabler.java