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
This commit is contained in:
Michael Chan
2009-09-27 12:46:51 -07:00
parent 9281c929d6
commit b662f54542

View File

@@ -116,7 +116,15 @@ public class BluetoothEnabler implements Preference.OnPreferenceChangeListener {
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) {