summaryrefslogtreecommitdiffstats
path: root/obex
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumarg@android.com>2011-04-19 16:01:36 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-19 16:01:36 -0700
commitee1c033f6e0c2e709bd63adb419de3c5212fdf8f (patch)
tree8c96706f5747248077f90895df0956196e2a1f9b /obex
parent67dc13ed6764cd96194f57ee8221c88df551d040 (diff)
parent24a16e6c53d9b45c0cfdf150425002adc919955b (diff)
downloadframeworks_base-ee1c033f6e0c2e709bd63adb419de3c5212fdf8f.zip
frameworks_base-ee1c033f6e0c2e709bd63adb419de3c5212fdf8f.tar.gz
frameworks_base-ee1c033f6e0c2e709bd63adb419de3c5212fdf8f.tar.bz2
am 24a16e6c: am c34c88b9: am ec1a8f7a: Merge "Unable to push files to Windows 7"
* commit '24a16e6c53d9b45c0cfdf150425002adc919955b': Unable to push files to Windows 7
Diffstat (limited to 'obex')
-rw-r--r--obex/javax/obex/ClientSession.java4
-rw-r--r--obex/javax/obex/ObexHelper.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/obex/javax/obex/ClientSession.java b/obex/javax/obex/ClientSession.java
index 0935383..27d8976 100644
--- a/obex/javax/obex/ClientSession.java
+++ b/obex/javax/obex/ClientSession.java
@@ -449,8 +449,8 @@ public final class ClientSession extends ObexSession {
maxPacketSize = (mInput.read() << 8) + mInput.read();
//check with local max size
- if (maxPacketSize > ObexHelper.MAX_PACKET_SIZE_INT) {
- maxPacketSize = ObexHelper.MAX_PACKET_SIZE_INT;
+ if (maxPacketSize > ObexHelper.MAX_CLIENT_PACKET_SIZE) {
+ maxPacketSize = ObexHelper.MAX_CLIENT_PACKET_SIZE;
}
if (length > 7) {
diff --git a/obex/javax/obex/ObexHelper.java b/obex/javax/obex/ObexHelper.java
index df0e0fb..8c12a20 100644
--- a/obex/javax/obex/ObexHelper.java
+++ b/obex/javax/obex/ObexHelper.java
@@ -70,6 +70,12 @@ public final class ObexHelper {
*/
public static final int MAX_PACKET_SIZE_INT = 0xFFFE;
+ /**
+ * Temporary workaround to be able to push files to Windows 7.
+ * TODO: Should be removed as soon as Microsoft updates their driver.
+ */
+ public static final int MAX_CLIENT_PACKET_SIZE = 0xFC00;
+
public static final int OBEX_OPCODE_CONNECT = 0x80;
public static final int OBEX_OPCODE_DISCONNECT = 0x81;