summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Chan <mchan@android.com>2009-09-27 12:46:51 -0700
committerMichael Chan <mchan@android.com>2009-09-27 12:46:51 -0700
commitb662f545427c3082b95d780cbc7b162ff930bee9 (patch)
tree6c53418e9fa709585e9d43a3b31cbbfd7b804164 /src
parent9281c929d6e4abf0ddf77d614b2eb57f7528397a (diff)
downloadpackages_apps_settings-b662f545427c3082b95d780cbc7b162ff930bee9.zip
packages_apps_settings-b662f545427c3082b95d780cbc7b162ff930bee9.tar.gz
packages_apps_settings-b662f545427c3082b95d780cbc7b162ff930bee9.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/bluetooth/BluetoothEnabler.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothEnabler.java b/src/com/android/settings/bluetooth/BluetoothEnabler.java
index 3189810..2e7734b 100644
--- a/src/com/android/settings/bluetooth/BluetoothEnabler.java
+++ b/src/com/android/settings/bluetooth/BluetoothEnabler.java
@@ -99,7 +99,7 @@ public class BluetoothEnabler implements Preference.OnPreferenceChangeListener {
// Don't update UI to opposite state until we're sure
return false;
}
-
+
private void setEnabled(final boolean enable) {
// Disable preference
mCheckBoxPreference.setEnabled(false);
@@ -115,8 +115,16 @@ public class BluetoothEnabler implements Preference.OnPreferenceChangeListener {
mCheckBoxPreference.setSummary(state == BluetoothAdapter.STATE_OFF ?
mOriginalSummary :
null);
-
- mCheckBoxPreference.setEnabled(isEnabledByDependency());
+
+ /*
+ * Don't ever disable the preference. Only enable here. Disablement
+ * is taken care of by the dependency code. If this is disabled
+ * here, it may not be re-enabled from the framework when dependency
+ * is met. http://b/issue?id=2053751
+ */
+ if (isEnabledByDependency()) {
+ mCheckBoxPreference.setEnabled(true);
+ }
} else if (state == BluetoothAdapter.STATE_TURNING_ON ||
state == BluetoothAdapter.STATE_TURNING_OFF) {