diff options
author | Ashwini Munigala <AshwiniM@codeaurora.org> | 2015-08-14 17:05:27 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:27:43 -0600 |
commit | 76f9fb7a231da44b65e7448e70b200b456910f91 (patch) | |
tree | 1e43714b72f0b2d2e611a24679fdda13a257ed3c /obex/javax/obex/ServerOperation.java | |
parent | a6942694bfe2a4291777e33efad0255f98e9b869 (diff) | |
download | frameworks_base-76f9fb7a231da44b65e7448e70b200b456910f91.zip frameworks_base-76f9fb7a231da44b65e7448e70b200b456910f91.tar.gz frameworks_base-76f9fb7a231da44b65e7448e70b200b456910f91.tar.bz2 |
OBEX: Dynamic VERBOSE level logging for OBEX.
- Support runtime VERBOSE level logging control
for OBEX lib.
- Added extra informative logs useful to
debug issues from obex layer.
Change-Id: If94c88b438b3c283aca0ba4cc46f42bb1d8c37eb
Diffstat (limited to 'obex/javax/obex/ServerOperation.java')
-rw-r--r-- | obex/javax/obex/ServerOperation.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/obex/javax/obex/ServerOperation.java b/obex/javax/obex/ServerOperation.java index 56a675a..28f5906 100644 --- a/obex/javax/obex/ServerOperation.java +++ b/obex/javax/obex/ServerOperation.java @@ -59,7 +59,7 @@ public final class ServerOperation implements Operation, BaseStream { private static final String TAG = "ServerOperation"; - private static final boolean V = ObexHelper.VDBG; // Verbose debugging + private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE); public boolean isAborted; @@ -124,6 +124,7 @@ public final class ServerOperation implements Operation, BaseStream { */ public ServerOperation(ServerSession p, InputStream in, int request, int maxSize, ServerRequestHandler listen) throws IOException { + if (V) Log.v(TAG, "ServerOperation"); isAborted = false; mParent = p; @@ -330,14 +331,17 @@ public final class ServerOperation implements Operation, BaseStream { */ public synchronized boolean continueOperation(boolean sendEmpty, boolean inStream) throws IOException { + if (V) Log.v(TAG, "continueOperation"); if (!mGetOperation) { if (!finalBitSet) { if (sendEmpty) { sendReply(ResponseCodes.OBEX_HTTP_CONTINUE); + if (V) Log.v(TAG, "continueOperation:ServerSet SRM sendEmpty clause"); return true; } else { if ((mResponseSize > 3) || (mPrivateOutput.size() > 0)) { sendReply(ResponseCodes.OBEX_HTTP_CONTINUE); + if (V) Log.v(TAG, "continueOperation: Server setting SRM"); return true; } else { return false; @@ -347,6 +351,7 @@ public final class ServerOperation implements Operation, BaseStream { return false; } } else { + if (V) Log.v(TAG, "Get continueOperation "); sendReply(ResponseCodes.OBEX_HTTP_CONTINUE); return true; } @@ -395,6 +400,8 @@ public final class ServerOperation implements Operation, BaseStream { bodyLength = mPrivateOutput.size(); orginalBodyLength = bodyLength; } + if(V)Log.v(TAG, "mMaxPcKLen : " + mMaxPacketLength); + if(V)Log.v(TAG, "headerArryLen : " + headerArray.length); if ((ObexHelper.BASE_PACKET_LENGTH + headerArray.length) > mMaxPacketLength) { |