Home
last modified time | relevance | path

Searched refs:BluetoothProfile (Results 1 – 25 of 52) sorted by relevance

123

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DMapProfile.java23 import android.bluetooth.BluetoothProfile;
60 implements BluetoothProfile.ServiceListener {
62 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
76 BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
103 BluetoothProfile.MAP); in MapProfile()
123 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect()
124 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
133 if (mService == null) return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
139 : BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
144 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
[all …]
DSapProfile.java23 import android.bluetooth.BluetoothProfile;
59 implements BluetoothProfile.ServiceListener {
61 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
75 BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
101 BluetoothProfile.SAP); in SapProfile()
127 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect()
128 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
137 if (mService == null) return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
142 : BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
147 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
[all …]
DHfpClientProfile.java23 import android.bluetooth.BluetoothProfile;
60 implements BluetoothProfile.ServiceListener {
63 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
77 HfpClientProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
102 BluetoothProfile.HEADSET_CLIENT); in HfpClientProfile()
118 new int[] {BluetoothProfile.STATE_CONNECTED, in getConnectedDevices()
119 BluetoothProfile.STATE_CONNECTING, in getConnectedDevices()
120 BluetoothProfile.STATE_DISCONNECTING}); in getConnectedDevices()
143 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){ in disconnect()
144 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
[all …]
DMapClientProfile.java23 import android.bluetooth.BluetoothProfile;
61 implements BluetoothProfile.ServiceListener {
63 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
77 BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
104 BluetoothProfile.MAP_CLIENT); in MapClientProfile()
129 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect()
130 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
136 if (mService == null) return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
143 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
147 if (mService == null) return BluetoothProfile.PRIORITY_OFF; in getPreferred()
[all …]
DA2dpSinkProfile.java23 import android.bluetooth.BluetoothProfile;
57 implements BluetoothProfile.ServiceListener {
59 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
72 … device.onProfileStateChanged(A2dpSinkProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
95 BluetoothProfile.A2DP_SINK); in A2dpSinkProfile()
109 new int[] {BluetoothProfile.STATE_CONNECTED, in getConnectedDevices()
110 BluetoothProfile.STATE_CONNECTING, in getConnectedDevices()
111 BluetoothProfile.STATE_DISCONNECTING}); in getConnectedDevices()
132 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){ in disconnect()
133 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
[all …]
DHeadsetProfile.java23 import android.bluetooth.BluetoothProfile;
60 implements BluetoothProfile.ServiceListener {
62 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
76 BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
102 BluetoothProfile.HEADSET); in HeadsetProfile()
133 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect()
134 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
144 if (mService == null) return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
153 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
158 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
[all …]
DA2dpProfile.java25 import android.bluetooth.BluetoothProfile;
65 implements BluetoothProfile.ServiceListener {
67 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
81 device.onProfileStateChanged(A2dpProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
106 BluetoothProfile.A2DP); in A2dpProfile()
125 new int[] {BluetoothProfile.STATE_CONNECTED, in getConnectedDevices()
126 BluetoothProfile.STATE_CONNECTING, in getConnectedDevices()
127 BluetoothProfile.STATE_DISCONNECTING}); in getConnectedDevices()
148 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){ in disconnect()
149 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect()
[all …]
DHidProfile.java23 import android.bluetooth.BluetoothProfile;
52 implements BluetoothProfile.ServiceListener {
54 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
67 device.onProfileStateChanged(HidProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
90 BluetoothProfile.INPUT_DEVICE); in HidProfile()
113 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
119 : BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
124 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
128 if (mService == null) return BluetoothProfile.PRIORITY_OFF; in getPreferred()
135 if (mService.getPriority(device) < BluetoothProfile.PRIORITY_ON) { in setPreferred()
[all …]
DPbapClientProfile.java23 import android.bluetooth.BluetoothProfile;
57 implements BluetoothProfile.ServiceListener {
59 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
74 … device.onProfileStateChanged(PbapClientProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected()
110 BluetoothProfile.PBAP_CLIENT); in PbapClientProfile()
126 new int[] {BluetoothProfile.STATE_CONNECTED, in getConnectedDevices()
127 BluetoothProfile.STATE_CONNECTING, in getConnectedDevices()
128 BluetoothProfile.STATE_DISCONNECTING}); in getConnectedDevices()
165 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
174 return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF; in isPreferred()
[all …]
DUtils.java3 import android.bluetooth.BluetoothProfile;
16 case BluetoothProfile.STATE_CONNECTED: in getConnectionStateSummary()
18 case BluetoothProfile.STATE_CONNECTING: in getConnectionStateSummary()
20 case BluetoothProfile.STATE_DISCONNECTED: in getConnectionStateSummary()
22 case BluetoothProfile.STATE_DISCONNECTING: in getConnectionStateSummary()
DPanProfile.java23 import android.bluetooth.BluetoothProfile;
53 implements BluetoothProfile.ServiceListener {
55 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected()
74 BluetoothProfile.PAN); in PanProfile()
103 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
139 case BluetoothProfile.STATE_DISCONNECTED: in getSummaryResourceForDevice()
142 case BluetoothProfile.STATE_CONNECTED: in getSummaryResourceForDevice()
175 … BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.PAN, mService); in finalize()
DOppProfile.java23 import android.bluetooth.BluetoothProfile;
52 return BluetoothProfile.STATE_DISCONNECTED; // Settings app doesn't handle OPP in getConnectionStatus()
60 return BluetoothProfile.PRIORITY_OFF; // Settings app doesn't handle OPP in getPreferred()
DCachedBluetoothDevice.java21 import android.bluetooth.BluetoothProfile;
132 if (newProfileState == BluetoothProfile.STATE_CONNECTED) { in onProfileStateChanged()
145 newProfileState == BluetoothProfile.STATE_DISCONNECTED) { in onProfileStateChanged()
149 newProfileState == BluetoothProfile.STATE_DISCONNECTED) { in onProfileStateChanged()
177 if (PbapProfile.getConnectionStatus(mDevice) == BluetoothProfile.STATE_CONNECTED) in disconnect()
350 mProfileConnectionState.put(profile, BluetoothProfile.STATE_DISCONNECTED); in clearProfileConnectionState()
447 if (status == BluetoothProfile.STATE_CONNECTED) { in isConnected()
457 return status == BluetoothProfile.STATE_CONNECTED; in isConnectedProfile()
464 if (status == BluetoothProfile.STATE_CONNECTING in isBusy()
465 || status == BluetoothProfile.STATE_DISCONNECTING) { in isBusy()
[all …]
DPbapServerProfile.java22 import android.bluetooth.BluetoothProfile;
97 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
100 return BluetoothProfile.STATE_CONNECTED; in getConnectionStatus()
102 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionStatus()
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
DBluetoothTestUtils.java20 import android.bluetooth.BluetoothProfile;
224 case BluetoothProfile.A2DP: in ConnectProfileReceiver()
227 case BluetoothProfile.HEADSET: in ConnectProfileReceiver()
230 case BluetoothProfile.INPUT_DEVICE: in ConnectProfileReceiver()
233 case BluetoothProfile.PAN: in ConnectProfileReceiver()
248 int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1); in onReceive()
251 case BluetoothProfile.STATE_DISCONNECTED: in onReceive()
254 case BluetoothProfile.STATE_CONNECTING: in onReceive()
257 case BluetoothProfile.STATE_CONNECTED: in onReceive()
260 case BluetoothProfile.STATE_DISCONNECTING: in onReceive()
[all …]
DBluetoothStressTest.java199 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.A2DP, null); in testConnectA2dp()
203 mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.A2DP, in testConnectA2dp()
205 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.A2DP, in testConnectA2dp()
229 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, null); in testConnectHeadset()
233 mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.HEADSET, in testConnectHeadset()
235 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, in testConnectHeadset()
259 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE, null); in testConnectInput()
263 mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE, in testConnectInput()
265 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE, in testConnectInput()
347 mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, null); in testStartStopSco()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/car/
DCarBatteryController.java22 import android.bluetooth.BluetoothProfile;
23 import android.bluetooth.BluetoothProfile.ServiceListener;
86 BluetoothProfile.HEADSET_CLIENT); in CarBatteryController()
153 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1); in onReceive()
156 int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1); in onReceive()
213 if (newState == BluetoothProfile.STATE_CONNECTED) { in updateBatteryIcon()
235 } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { in updateBatteryIcon()
266 public void onServiceConnected(int profile, BluetoothProfile proxy) {
267 if (profile == BluetoothProfile.HEADSET_CLIENT) {
274 if (profile == BluetoothProfile.HEADSET_CLIENT) {
DConnectedDeviceSignalController.java6 import android.bluetooth.BluetoothProfile;
7 import android.bluetooth.BluetoothProfile.ServiceListener;
94 BluetoothProfile.HEADSET_CLIENT); in ConnectedDeviceSignalController()
147 int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1); in onReceive()
150 int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1); in onReceive()
206 if (newState == BluetoothProfile.STATE_CONNECTED) { in updateViewVisibility()
230 } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { in updateViewVisibility()
242 public void onServiceConnected(int profile, BluetoothProfile proxy) {
243 if (profile == BluetoothProfile.HEADSET_CLIENT) {
250 if (profile == BluetoothProfile.HEADSET_CLIENT) {
/frameworks/base/core/java/android/bluetooth/
DBluetoothManager.java104 return BluetoothProfile.STATE_CONNECTED; in getConnectionState()
108 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
127 if (profile != BluetoothProfile.GATT && profile != BluetoothProfile.GATT_SERVER) { in getConnectedDevices()
139 new int[] { BluetoothProfile.STATE_CONNECTED }); in getConnectedDevices()
171 if (profile != BluetoothProfile.GATT && profile != BluetoothProfile.GATT_SERVER) { in getDevicesMatchingConnectionStates()
DBluetoothAdapter.java1616 for (int i = 0; i <= BluetoothProfile.MAX_PROFILE_ID; i++) { in getSupportedProfiles()
1670 if (getState() != STATE_ON) return BluetoothProfile.STATE_DISCONNECTED; in getProfileConnectionState()
1679 return BluetoothProfile.STATE_DISCONNECTED; in getProfileConnectionState()
2020 public boolean getProfileProxy(Context context, BluetoothProfile.ServiceListener listener, in getProfileProxy()
2024 if (profile == BluetoothProfile.HEADSET) { in getProfileProxy()
2027 } else if (profile == BluetoothProfile.A2DP) { in getProfileProxy()
2030 } else if (profile == BluetoothProfile.A2DP_SINK) { in getProfileProxy()
2033 } else if (profile == BluetoothProfile.AVRCP_CONTROLLER) { in getProfileProxy()
2036 } else if (profile == BluetoothProfile.INPUT_DEVICE) { in getProfileProxy()
2039 } else if (profile == BluetoothProfile.PAN) { in getProfileProxy()
[all …]
DBluetoothA2dpSink.java41 public final class BluetoothA2dpSink implements BluetoothProfile {
341 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
345 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
393 if (priority != BluetoothProfile.PRIORITY_OFF && in setPriority()
394 priority != BluetoothProfile.PRIORITY_ON){ in setPriority()
429 return BluetoothProfile.PRIORITY_OFF; in getPriority()
433 return BluetoothProfile.PRIORITY_OFF; in getPriority()
488 mServiceListener.onServiceConnected(BluetoothProfile.A2DP_SINK,
496 mServiceListener.onServiceDisconnected(BluetoothProfile.A2DP_SINK);
DBluetoothPbapClient.java34 public final class BluetoothPbapClient implements BluetoothProfile {
278 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
284 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
294 … mServiceListener.onServiceConnected(BluetoothProfile.PBAP_CLIENT, BluetoothPbapClient.this);
303 mServiceListener.onServiceDisconnected(BluetoothProfile.PBAP_CLIENT);
348 if (priority != BluetoothProfile.PRIORITY_OFF && in setPriority()
349 priority != BluetoothProfile.PRIORITY_ON) { in setPriority()
DBluetoothInputDevice.java45 public final class BluetoothInputDevice implements BluetoothProfile {
413 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
417 return BluetoothProfile.STATE_DISCONNECTED; in getConnectionState()
438 if (priority != BluetoothProfile.PRIORITY_OFF && in setPriority()
439 priority != BluetoothProfile.PRIORITY_ON) { in setPriority()
473 return BluetoothProfile.PRIORITY_OFF; in getPriority()
477 return BluetoothProfile.PRIORITY_OFF; in getPriority()
486 … mServiceListener.onServiceConnected(BluetoothProfile.INPUT_DEVICE, BluetoothInputDevice.this);
493 mServiceListener.onServiceDisconnected(BluetoothProfile.INPUT_DEVICE);
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DA2dpProfileTest.java22 import android.bluetooth.BluetoothProfile;
58 BluetoothProfile.ServiceListener mServiceListener;
70 mServiceListener = (BluetoothProfile.ServiceListener) invocation.getArguments()[1]; in setUp()
72 }).when(mAdapter).getProfileProxy(any(Context.class), any(), eq(BluetoothProfile.A2DP)); in setUp()
76 mServiceListener.onServiceConnected(BluetoothProfile.A2DP, mBluetoothA2dp); in setUp()
111 BluetoothProfile.STATE_DISCONNECTED); in isHighQualityAudioEnabled()
122 BluetoothProfile.STATE_CONNECTED); in isHighQualityAudioEnabled()
168 BluetoothProfile.STATE_DISCONNECTED); in getLabelDeviceDisconnected()
176 BluetoothProfile.STATE_CONNECTED); in getLabelDeviceConnectedButNotHighQualityCodec()
191 BluetoothProfile.STATE_CONNECTED); in getLabelDeviceConnectedWithHighQualityCodec()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java25 import android.bluetooth.BluetoothProfile;
80 when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED); in testNoConnectionWithDevices()
93 assertEquals(BluetoothProfile.STATE_DISCONNECTED, in testDefaultConnectionState()
121 when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED); in testAsyncConnectionState()
129 assertEquals(BluetoothProfile.STATE_DISCONNECTED, in testAsyncConnectionState()
135 assertEquals(BluetoothProfile.STATE_CONNECTED, in testAsyncConnectionState()

123