diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-16 14:48:36 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-16 14:48:36 -0800 |
commit | 71586eb7ddbd310fa00f19c9ad101f4775539945 (patch) | |
tree | 4968789da93c5c913b330473dc60e85f1b67d3a2 | |
parent | 1443fc87018d26b34bfbac3cecfba09dcc3c8b85 (diff) | |
parent | f1bf05ffa71767cff4edbacd39acd38478066bdd (diff) | |
download | android_packages_apps_BluetoothExt-71586eb7ddbd310fa00f19c9ad101f4775539945.tar.gz android_packages_apps_BluetoothExt-71586eb7ddbd310fa00f19c9ad101f4775539945.tar.bz2 android_packages_apps_BluetoothExt-71586eb7ddbd310fa00f19c9ad101f4775539945.zip |
Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/vendor/qcom-opensource/bluetooth into cm-13.0
-rw-r--r-- | QLogging/AndroidManifest.xml | 2 | ||||
-rw-r--r-- | src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/QLogging/AndroidManifest.xml b/QLogging/AndroidManifest.xml index 6abf32b..99eea95 100644 --- a/QLogging/AndroidManifest.xml +++ b/QLogging/AndroidManifest.xml @@ -66,7 +66,7 @@ <receiver android:name=".BTStateReceiver" android:enabled="true"> - <intent-filter> + <intent-filter android:priority="-10"> <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" /> </intent-filter> <intent-filter> diff --git a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java index 9fa5ad1..95d2124 100644 --- a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java +++ b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java @@ -404,12 +404,6 @@ public class BluetoothFtpService extends Service { VERBOSE = Log.isLoggable(BluetoothFtpService.LOG_TAG, Log.VERBOSE) ? true : false; Log.v(TAG, "Ftp Service startRfcommSocketListener"); - if (mRfcommServerSocket == null) { - if (!initRfcommSocket()) { - closeService(); - return; - } - } if (mRfcommAcceptThread == null) { mRfcommAcceptThread = new RfcommSocketAcceptThread(); mRfcommAcceptThread.setName("BluetoothFtpRfcommAcceptThread"); @@ -425,7 +419,7 @@ public class BluetoothFtpService extends Service { // It's possible that create will fail in some cases. retry for 10 times for (int i = 0; i < CREATE_RETRY_TIME && !mInterrupted; i++) { try { - // It is mandatory for PSE to support initiation of bonding and + // It is mandatory for FTP to support initiation of bonding and // encryption. mRfcommServerSocket = mAdapter.listenUsingRfcommWithServiceRecord("OBEX File Transfer", FileTransfer.getUuid()); initSocketOK = true; @@ -645,6 +639,14 @@ public class BluetoothFtpService extends Service { @Override public void run() { + + if (mRfcommServerSocket == null) { + if (!initRfcommSocket()) { + closeService(); + return; + } + } + while (!stopped && mRfcommServerSocket != null) { try { Log.v(RTAG,"Run Accept thread"); |