summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-11-10 22:04:25 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-10 22:04:25 -0800
commit8f6abb6760dd3cd6b5c2d096416bc380587c2e8e (patch)
tree3e9e4d1d2b0be8ef2e5d69328314b66d8b389a19
parent23872771fd7eb5c69199829261041d8ecf3a85ed (diff)
parent54b9efa08d305293278bd391cca79e4a66ff7e7c (diff)
downloadandroid_packages_apps_BluetoothExt-8f6abb6760dd3cd6b5c2d096416bc380587c2e8e.tar.gz
android_packages_apps_BluetoothExt-8f6abb6760dd3cd6b5c2d096416bc380587c2e8e.tar.bz2
android_packages_apps_BluetoothExt-8f6abb6760dd3cd6b5c2d096416bc380587c2e8e.zip
Merge "FTP: Update isWaitingAuthorization as FALSE when user presses cancel"
-rw-r--r--src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
index 164aa4a..cd2f583 100644
--- a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
+++ b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
@@ -83,7 +83,7 @@ public class BluetoothFtpService extends Service {
//public static final boolean VERBOSE = false;
public static final boolean DEBUG = true;
- public static boolean VERBOSE;
+ public static boolean VERBOSE = true;
private int mState;
/**
@@ -314,6 +314,7 @@ public class BluetoothFtpService extends Service {
} else if (action.equals(ACCESS_ALLOWED_ACTION)) {
if (!isWaitingAuthorization) {
// this reply is not for us
+ if (VERBOSE) Log.v(TAG, "isWaitingAuthorization = " + isWaitingAuthorization);
return;
}
@@ -336,6 +337,8 @@ public class BluetoothFtpService extends Service {
}
removeFtpNotification(NOTIFICATION_ID_ACCESS);
} else if (action.equals(ACCESS_DISALLOWED_ACTION)) {
+ if (VERBOSE) Log.v(TAG, "ACCESS_DISALLOWED_ACTION");
+ isWaitingAuthorization = false;
stopObexServerSession();
} else if (action.equals(AUTH_RESPONSE_ACTION)) {
String sessionkey = intent.getStringExtra(EXTRA_SESSION_KEY);
@@ -528,6 +531,7 @@ public class BluetoothFtpService extends Service {
if (VERBOSE) Log.v(TAG, "Ftp Service stopObexServerSession");
if (mServerSession != null) {
+ if (VERBOSE) Log.v(TAG, "stopObexServerSession, closing mServerSession");
mServerSession.close();
mServerSession = null;
}
@@ -535,6 +539,7 @@ public class BluetoothFtpService extends Service {
mRfcommAcceptThread = null;
try {
+ if (VERBOSE) Log.v(TAG, "stopObexServerSession, closeRfcommSocket");
closeRfcommSocket(false, true);
} catch (IOException e) {
Log.e(TAG, "closeSocket error: " + e.toString());
@@ -542,6 +547,7 @@ public class BluetoothFtpService extends Service {
// Last obex transaction is finished, we start to listen for incoming
// connection again
if (mAdapter.isEnabled()) {
+ if (VERBOSE) Log.v(TAG, "stopObexServerSession, startRfcommSocketListener");
startRfcommSocketListener();
}
}