API_CHANGE
Another round of Bluetooth API clean up, javadoc'ing and unhide'ing.
-- Symbols for getting/setting bluetooth state --
BluetoothAdapter.ACTION_STATE_CHANGED
BluetoothAdapter.EXTRA_STATE
BluetoothAdapter.EXTRA_PREVIOUS_STATE
BluetoothAdapter.STATE_OFF
BluetoothAdapter.STATE_TURNING_ON
BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
BluetoothAdapter.isEnabled()
BluetoothAdapter.getState()
BluetoothAdapter.enable()
BluetoothAdapter.disable()
-- Symbols for getting/setting scan mode --
BluetoothAdapter.ACTION_SCAN_MODE_CHANGED
BluetoothAdapter.EXTRA_SCAN_MODE
BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_DISCOVERABLE
BluetoothAdapter.getScanMode()
BluetoothAdapter.setScanMode()
-- Symbols for getting address/names --
BluetoothAdapter.getAddress()
BluetoothAdapter.getName()
BluetoothAdapter.setName()
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index 10680dd..c663e54 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -362,7 +362,7 @@
|| action.equals(Intent.ACTION_POWER_CONNECTED)) {
onBatteryOkay(intent);
}
- else if (action.equals(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION) ||
+ else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
action.equals(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION) ||
action.equals(BluetoothA2dp.SINK_STATE_CHANGED_ACTION) ||
action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
@@ -507,7 +507,7 @@
filter.addAction(Intent.ACTION_SYNC_STATE_CHANGED);
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
filter.addAction(AudioManager.VIBRATE_SETTING_CHANGED_ACTION);
- filter.addAction(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION);
+ filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
filter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
filter.addAction(BluetoothA2dp.SINK_STATE_CHANGED_ACTION);
filter.addAction(BluetoothPbap.PBAP_STATE_CHANGED_ACTION);
@@ -1072,10 +1072,10 @@
int iconId = com.android.internal.R.drawable.stat_sys_data_bluetooth;
String action = intent.getAction();
- if (action.equals(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION)) {
- int state = intent.getIntExtra(BluetoothIntent.BLUETOOTH_STATE,
+ if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
+ int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
BluetoothError.ERROR);
- mBluetoothEnabled = state == BluetoothAdapter.BLUETOOTH_STATE_ON;
+ mBluetoothEnabled = state == BluetoothAdapter.STATE_ON;
} else if (action.equals(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION)) {
mBluetoothHeadsetState = intent.getIntExtra(BluetoothIntent.HEADSET_STATE,
BluetoothHeadset.STATE_ERROR);