am 005b228c: API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
Merge commit '005b228cdfb369d9b3b325884c0337ba5968bf8c' into eclair-plus-aosp * commit '005b228cdfb369d9b3b325884c0337ba5968bf8c': API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
This commit is contained in:
@@ -1434,10 +1434,10 @@ public class WifiService extends IWifiManager.Stub {
|
||||
return;
|
||||
}
|
||||
mPluggedType = pluggedType;
|
||||
} else if (action.equals(BluetoothA2dp.SINK_STATE_CHANGED_ACTION)) {
|
||||
} else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
|
||||
boolean isBluetoothPlaying =
|
||||
intent.getIntExtra(
|
||||
BluetoothA2dp.SINK_STATE,
|
||||
BluetoothA2dp.EXTRA_SINK_STATE,
|
||||
BluetoothA2dp.STATE_DISCONNECTED) == BluetoothA2dp.STATE_PLAYING;
|
||||
mWifiStateTracker.setBluetoothScanMode(isBluetoothPlaying);
|
||||
} else {
|
||||
@@ -1556,7 +1556,7 @@ public class WifiService extends IWifiManager.Stub {
|
||||
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||
intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
intentFilter.addAction(ACTION_DEVICE_IDLE);
|
||||
intentFilter.addAction(BluetoothA2dp.SINK_STATE_CHANGED_ACTION);
|
||||
intentFilter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
|
||||
mContext.registerReceiver(mReceiver, intentFilter);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.app.AlertDialog;
|
||||
import android.bluetooth.BluetoothA2dp;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothHeadset;
|
||||
import android.bluetooth.BluetoothIntent;
|
||||
import android.bluetooth.BluetoothPbap;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -362,8 +361,8 @@ public class StatusBarPolicy {
|
||||
onBatteryOkay(intent);
|
||||
}
|
||||
else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
|
||||
action.equals(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION) ||
|
||||
action.equals(BluetoothA2dp.SINK_STATE_CHANGED_ACTION) ||
|
||||
action.equals(BluetoothHeadset.ACTION_STATE_CHANGED) ||
|
||||
action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED) ||
|
||||
action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
|
||||
updateBluetooth(intent);
|
||||
}
|
||||
@@ -507,8 +506,8 @@ public class StatusBarPolicy {
|
||||
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
|
||||
filter.addAction(AudioManager.VIBRATE_SETTING_CHANGED_ACTION);
|
||||
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
|
||||
filter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
|
||||
filter.addAction(BluetoothA2dp.SINK_STATE_CHANGED_ACTION);
|
||||
filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
|
||||
filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
|
||||
filter.addAction(BluetoothPbap.PBAP_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
|
||||
@@ -1074,11 +1073,11 @@ public class StatusBarPolicy {
|
||||
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
|
||||
int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
|
||||
mBluetoothEnabled = state == BluetoothAdapter.STATE_ON;
|
||||
} else if (action.equals(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION)) {
|
||||
mBluetoothHeadsetState = intent.getIntExtra(BluetoothIntent.HEADSET_STATE,
|
||||
} else if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
|
||||
mBluetoothHeadsetState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE,
|
||||
BluetoothHeadset.STATE_ERROR);
|
||||
} else if (action.equals(BluetoothA2dp.SINK_STATE_CHANGED_ACTION)) {
|
||||
mBluetoothA2dpState = intent.getIntExtra(BluetoothA2dp.SINK_STATE,
|
||||
} else if (action.equals(BluetoothA2dp.ACTION_SINK_STATE_CHANGED)) {
|
||||
mBluetoothA2dpState = intent.getIntExtra(BluetoothA2dp.EXTRA_SINK_STATE,
|
||||
BluetoothA2dp.STATE_DISCONNECTED);
|
||||
} else if (action.equals(BluetoothPbap.PBAP_STATE_CHANGED_ACTION)) {
|
||||
mBluetoothPbapState = intent.getIntExtra(BluetoothPbap.PBAP_STATE,
|
||||
|
||||
Reference in New Issue
Block a user