Searched refs:BluetoothProfile (Results 1 - 22 of 22) sorted by relevance

/frameworks/base/core/java/android/bluetooth/
H A DBluetoothProfile.java29 public interface BluetoothProfile { interface
157 * An interface for notifying BluetoothProfile IPC clients when they have
169 public void onServiceConnected(int profile, BluetoothProfile proxy);
H A DBluetoothProfileState.java66 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
67 if (mProfile == HFP && (newState == BluetoothProfile.STATE_CONNECTED ||
68 newState == BluetoothProfile.STATE_DISCONNECTED)) {
72 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
73 if (mProfile == A2DP && (newState == BluetoothProfile.STATE_CONNECTED ||
74 newState == BluetoothProfile.STATE_DISCONNECTED)) {
78 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
79 if (mProfile == HID && (newState == BluetoothProfile.STATE_CONNECTED ||
80 newState == BluetoothProfile.STATE_DISCONNECTED)) {
H A DBluetoothInputDevice.java42 public final class BluetoothInputDevice implements BluetoothProfile {
110 mServiceListener.onServiceConnected(BluetoothProfile.INPUT_DEVICE, this);
246 return BluetoothProfile.STATE_DISCONNECTED;
250 return BluetoothProfile.STATE_DISCONNECTED;
272 if (priority != BluetoothProfile.PRIORITY_OFF &&
273 priority != BluetoothProfile.PRIORITY_ON) {
308 return BluetoothProfile.PRIORITY_OFF;
312 return BluetoothProfile.PRIORITY_OFF;
H A DBluetoothA2dp.java44 public final class BluetoothA2dp implements BluetoothProfile {
121 mServiceListener.onServiceConnected(BluetoothProfile.A2DP, this);
259 return BluetoothProfile.STATE_DISCONNECTED;
263 return BluetoothProfile.STATE_DISCONNECTED;
285 if (priority != BluetoothProfile.PRIORITY_OFF &&
286 priority != BluetoothProfile.PRIORITY_ON) {
321 return BluetoothProfile.PRIORITY_OFF;
325 return BluetoothProfile.PRIORITY_OFF;
H A DBluetoothDeviceProfileState.java119 private int mHeadsetState = BluetoothProfile.STATE_DISCONNECTED;
120 private int mA2dpState = BluetoothProfile.STATE_DISCONNECTED;
136 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
137 int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, 0);
147 if (newState == BluetoothProfile.STATE_CONNECTED ||
148 newState == BluetoothProfile.STATE_DISCONNECTED) {
152 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
153 int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, 0);
163 if (newState == BluetoothProfile.STATE_CONNECTED ||
164 newState == BluetoothProfile
[all...]
H A DBluetoothPan.java42 public final class BluetoothPan implements BluetoothProfile {
131 mServiceListener.onServiceConnected(BluetoothProfile.PAN, this);
265 return BluetoothProfile.STATE_DISCONNECTED;
269 return BluetoothProfile.STATE_DISCONNECTED;
H A DBluetoothTetheringDataTracker.java99 adapter.getProfileProxy(mContext, mProfileServiceListener, BluetoothProfile.PAN);
103 private BluetoothProfile.ServiceListener mProfileServiceListener =
104 new BluetoothProfile.ServiceListener() {
105 public void onServiceConnected(int profile, BluetoothProfile proxy) {
H A DBluetoothAdapter.java785 * Profile can be one of {@link BluetoothProfile#HEALTH}, {@link BluetoothProfile#HEADSET},
786 * {@link BluetoothProfile#A2DP}.
791 * {@link BluetoothProfile#STATE_DISCONNECTED},
792 * {@link BluetoothProfile#STATE_CONNECTING},
793 * {@link BluetoothProfile#STATE_CONNECTED},
794 * {@link BluetoothProfile#STATE_DISCONNECTING}
797 if (getState() != STATE_ON) return BluetoothProfile.STATE_DISCONNECTED;
803 return BluetoothProfile.STATE_DISCONNECTED;
1136 * <p>Profile can be one of {@link BluetoothProfile#HEALT
[all...]
H A DBluetoothHeadset.java46 public final class BluetoothHeadset implements BluetoothProfile {
374 return BluetoothProfile.STATE_DISCONNECTED;
378 return BluetoothProfile.STATE_DISCONNECTED;
400 if (priority != BluetoothProfile.PRIORITY_OFF &&
401 priority != BluetoothProfile.PRIORITY_ON) {
769 mServiceListener.onServiceConnected(BluetoothProfile.HEADSET, BluetoothHeadset.this);
776 mServiceListener.onServiceDisconnected(BluetoothProfile.HEADSET);
H A DBluetoothHealth.java55 public final class BluetoothHealth implements BluetoothProfile {
444 mServiceListener.onServiceConnected(BluetoothProfile.HEALTH, this);
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
H A DBluetoothTestUtils.java20 import android.bluetooth.BluetoothProfile;
220 case BluetoothProfile.A2DP:
223 case BluetoothProfile.HEADSET:
226 case BluetoothProfile.INPUT_DEVICE:
229 case BluetoothProfile.PAN:
244 int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
247 case BluetoothProfile.STATE_DISCONNECTED:
250 case BluetoothProfile.STATE_CONNECTING:
253 case BluetoothProfile.STATE_CONNECTED:
256 case BluetoothProfile
[all...]
H A DBluetoothStressTest.java215 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.A2DP, null);
219 mTestUtils.connectProfile(adapter, device, BluetoothProfile.A2DP,
221 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.A2DP,
248 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET, null);
252 mTestUtils.connectProfile(adapter, device, BluetoothProfile.HEADSET,
254 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET,
281 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE, null);
285 mTestUtils.connectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE,
287 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE,
378 mTestUtils.disconnectProfile(adapter, device, BluetoothProfile
[all...]
/frameworks/base/core/java/android/server/
H A DBluetoothBondState.java21 import android.bluetooth.BluetoothProfile;
303 BluetoothProfile.A2DP);
308 BluetoothProfile.HEADSET);
316 bluetoothAdapter.closeProfileProxy(BluetoothProfile.A2DP, mA2dpProxy);
320 bluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mHeadsetProxy);
324 private BluetoothProfile.ServiceListener mProfileServiceListener =
325 new BluetoothProfile.ServiceListener() {
327 public void onServiceConnected(int profile, BluetoothProfile proxy) {
328 if (profile == BluetoothProfile.A2DP) {
330 } else if (profile == BluetoothProfile
[all...]
H A DBluetoothService.java35 import android.bluetooth.BluetoothProfile;
1757 mBluetoothProfileServiceListener, BluetoothProfile.HEADSET);
1759 mBluetoothProfileServiceListener, BluetoothProfile.INPUT_DEVICE);
1761 mBluetoothProfileServiceListener, BluetoothProfile.PAN);
1775 mAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));
1777 mAdapter.getProfileConnectionState(BluetoothProfile.A2DP));
1779 mAdapter.getProfileConnectionState(BluetoothProfile.INPUT_DEVICE));
1781 mAdapter.getProfileConnectionState(BluetoothProfile.PAN));
1800 BluetoothProfile.STATE_CONNECTED, BluetoothProfile
[all...]
H A DBluetoothA2dpService.java28 import android.bluetooth.BluetoothProfile;
272 if (getConnectionState(sinkDevice) != BluetoothProfile.STATE_DISCONNECTED) {
519 intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
520 intent.putExtra(BluetoothProfile.EXTRA_STATE, state);
526 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.A2DP, state,
534 intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
535 intent.putExtra(BluetoothProfile.EXTRA_STATE, state);
H A DBluetoothEventLoop.java26 import android.bluetooth.BluetoothProfile;
124 mAdapter.getProfileProxy(mContext, mProfileServiceListener, BluetoothProfile.A2DP);
125 mAdapter.getProfileProxy(mContext, mProfileServiceListener, BluetoothProfile.INPUT_DEVICE);
128 private BluetoothProfile.ServiceListener mProfileServiceListener =
129 new BluetoothProfile.ServiceListener() {
130 public void onServiceConnected(int profile, BluetoothProfile proxy) {
131 if (profile == BluetoothProfile.A2DP) {
136 if (profile == BluetoothProfile.A2DP) {
779 authorized = mA2dp.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
H A DBluetoothInputProfileHandler.java23 import android.bluetooth.BluetoothProfile;
195 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.INPUT_DEVICE, state,
H A DBluetoothPanProfileHandler.java22 import android.bluetooth.BluetoothProfile;
307 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.PAN, state,
H A DBluetoothHealthProfileHandler.java23 import android.bluetooth.BluetoothProfile;
639 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.HEALTH,
/frameworks/base/services/java/com/android/server/am/
H A DBatteryStatsService.java21 import android.bluetooth.BluetoothProfile;
298 BluetoothProfile.HEADSET);
310 private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener =
311 new BluetoothProfile.ServiceListener() {
312 public void onServiceConnected(int profile, BluetoothProfile proxy) {
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
H A DScoAudioTest.java23 import android.bluetooth.BluetoothProfile;
159 BluetoothProfile.HEADSET);
174 btAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
641 private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener =
642 new BluetoothProfile.ServiceListener() {
644 public void onServiceConnected(int profile, BluetoothProfile proxy) {
675 int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
/frameworks/base/media/java/android/media/
H A DAudioService.java32 import android.bluetooth.BluetoothProfile;
1523 BluetoothProfile.HEADSET);
1576 private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener =
1577 new BluetoothProfile.ServiceListener() {
1578 public void onServiceConnected(int profile, BluetoothProfile proxy) {
1582 case BluetoothProfile.A2DP:
1591 case BluetoothProfile.HEADSET:
1639 case BluetoothProfile.A2DP:
1648 case BluetoothProfile.HEADSET:
2403 if (isConnected && state != BluetoothProfile
[all...]

Completed in 393 milliseconds