summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/mapclient/MnsService.java
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2020-06-01 20:43:45 -0600
committerKevin F. Haggerty <haggertk@lineageos.org>2020-06-01 20:43:45 -0600
commitcf38327eba534b6354b44e4d29a3fef8190b481e (patch)
tree84195c87dacf64c2d7df6be202f9f62a62258aba /src/com/android/bluetooth/mapclient/MnsService.java
parent837b47f2b5613cb2e6235229831f9c80ec28c741 (diff)
parent906df07061fcf46aac856894fb6d68b2ccccfa2c (diff)
downloadandroid_packages_apps_Bluetooth-lineage-17.1.tar.gz
android_packages_apps_Bluetooth-lineage-17.1.tar.bz2
android_packages_apps_Bluetooth-lineage-17.1.zip
Merge tag 'android-10.0.0_r37' into staging/lineage-17.1_merge-android-10.0.0_r37lineage-17.1
Android 10.0.0 Release 37 (QQ3A.200605.001) * tag 'android-10.0.0_r37': (37 commits) Import translations. DO NOT MERGE Revert "PBAP server, send favorite contacts" Import translations. DO NOT MERGE Delete call logs when calls are made without PBAP Set Browsing bit to 0 in PbapSupportedFeatures Prevent phone's bd_addr from appearing in Accounts Return an empty list when the requested node is not in the tree AvrcpController Test update AVRCP Controller Media Controller not ready Allow subsequent requests for media keys to replay the silent audio sample HFP Client call status update PBAP server, send favorite contacts AVRCP Controller Disable Automatic Focus Request A2DP Sink: Focus gain while transient loss AVRCP Controller State without Browsing Add bluetooth prefs for Android Automotive MAP Client disconnect state machine if MAS client disconnected MAP Client close connection on MNS disconnect MAP Client Only connect MNS in connected state MAP Client BMessage parser length ... Change-Id: I1398f4ffe79e4ac0a37765927e4afd2e05ee0908
Diffstat (limited to 'src/com/android/bluetooth/mapclient/MnsService.java')
-rw-r--r--src/com/android/bluetooth/mapclient/MnsService.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/mapclient/MnsService.java b/src/com/android/bluetooth/mapclient/MnsService.java
index c1ab39e00..b3317df90 100644
--- a/src/com/android/bluetooth/mapclient/MnsService.java
+++ b/src/com/android/bluetooth/mapclient/MnsService.java
@@ -17,6 +17,7 @@
package com.android.bluetooth.mapclient;
import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothServerSocket;
import android.bluetooth.BluetoothSocket;
import android.os.Handler;
@@ -129,6 +130,11 @@ public class MnsService {
Log.e(TAG, "Error: NO statemachine for device: " + device.getAddress()
+ " (name: " + device.getName());
return false;
+ } else if (stateMachine.getState() != BluetoothProfile.STATE_CONNECTED) {
+ Log.e(TAG, "Error: statemachine for device: " + device.getAddress()
+ + " (name: " + device.getName() + ") is not currently CONNECTED : "
+ + stateMachine.getCurrentState());
+ return false;
}
MnsObexServer srv = new MnsObexServer(stateMachine, sServerSockets);
BluetoothObexTransport transport = new BluetoothObexTransport(socket);