Loading core/java/android/bluetooth/BluetoothUuid.java +13 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public final class BluetoothUuid { ParcelUuid.fromString("00001105-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid Hid = ParcelUuid.fromString("00001124-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid MessageAccessServer = ParcelUuid.fromString("00001132-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid MessageNotificationServer = ParcelUuid.fromString("00001133-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid PANU = ParcelUuid.fromString("00001115-0000-1000-8000-00805F9B34FB"); public static final ParcelUuid NAP = Loading @@ -67,7 +71,7 @@ public final class BluetoothUuid { public static final ParcelUuid[] RESERVED_UUIDS = { AudioSink, AudioSource, AdvAudioDist, HSP, Handsfree, AvrcpController, AvrcpTarget, ObexObjectPush, PANU, NAP}; ObexObjectPush, MessageAccessServer, MessageNotificationServer, PANU, NAP}; public static boolean isAudioSource(ParcelUuid uuid) { return uuid.equals(AudioSource); Loading Loading @@ -131,6 +135,14 @@ public final class BluetoothUuid { return false; } public static boolean isMessageAccessServer(ParcelUuid uuid) { return uuid.equals(MessageAccessServer); } public static boolean isMessageNotificationServer(ParcelUuid uuid) { return uuid.equals(MessageNotificationServer); } /** * Returns true if there any common ParcelUuids in uuidA and uuidB. * Loading core/java/android/server/BluetoothService.java +3 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,8 @@ public class BluetoothService extends IBluetooth.Stub { private static final ParcelUuid[] RFCOMM_UUIDS = { BluetoothUuid.Handsfree, BluetoothUuid.HSP, BluetoothUuid.ObexObjectPush }; BluetoothUuid.ObexObjectPush, BluetoothUuid.MessageNotificationServer }; private final BluetoothAdapterProperties mAdapterProperties; private final BluetoothDeviceProperties mDeviceProperties; Loading Loading @@ -589,6 +590,7 @@ public class BluetoothService extends IBluetooth.Stub { if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { uuids.add(BluetoothUuid.HSP_AG); uuids.add(BluetoothUuid.ObexObjectPush); uuids.add(BluetoothUuid.MessageAccessServer); } if (R.getBoolean(com.android.internal.R.bool.config_voice_capable)) { Loading obex/javax/obex/ClientOperation.java +11 −1 Original line number Diff line number Diff line /* * Copyright (c) 2008-2009, Motorola, Inc. * Copyright (c) 2010-2011, Motorola, Inc. * * All rights reserved. * Loading Loading @@ -121,6 +121,12 @@ public final class ClientOperation implements Operation, BaseStream { (header).mAuthResp.length); } if ((header).mConnectionID != null) { mRequestHeader.mConnectionID = new byte[4]; System.arraycopy((header).mConnectionID, 0, mRequestHeader.mConnectionID, 0, 4); } } /** Loading Loading @@ -723,4 +729,8 @@ public final class ClientOperation implements Operation, BaseStream { } } } public void noEndofBody() { } } obex/javax/obex/Operation.java +2 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,8 @@ public interface Operation { DataOutputStream openDataOutputStream() throws IOException; void noEndofBody(); void close() throws IOException; int getMaxPacketSize(); Loading obex/javax/obex/ServerOperation.java +25 −11 Original line number Diff line number Diff line /* * Copyright (c) 2008-2009, Motorola, Inc. * Copyright (c) 2010-2011, Motorola, Inc. * * All rights reserved. * Loading Loading @@ -88,6 +88,8 @@ public final class ServerOperation implements Operation, BaseStream { private boolean mHasBody; private boolean mEndofBody = true; /** * Creates new ServerOperation * @param p the parent that created this object Loading Loading @@ -364,24 +366,31 @@ public final class ServerOperation implements Operation, BaseStream { * (End of Body) otherwise, we need to send 0x48 (Body) */ if ((finalBitSet) || (mPrivateOutput.isClosed())) { out.write(0x49); if (mEndofBody) { out.write((byte)0x49); bodyLength += 3; out.write((byte)(bodyLength >> 8)); out.write((byte)bodyLength); out.write(body); } } else { out.write(0x48); } bodyLength += 3; out.write((byte)(bodyLength >> 8)); out.write((byte)bodyLength); out.write(body); } } } if ((finalBitSet) && (type == ResponseCodes.OBEX_HTTP_OK) && (orginalBodyLength <= 0)) { if (mEndofBody) { out.write(0x49); orginalBodyLength = 3; out.write((byte)(orginalBodyLength >> 8)); out.write((byte)orginalBodyLength); } } mResponseSize = 3; Loading Loading @@ -711,4 +720,9 @@ public final class ServerOperation implements Operation, BaseStream { public void streamClosed(boolean inStream) throws IOException { } public void noEndofBody() { mEndofBody = false; } } Loading
core/java/android/bluetooth/BluetoothUuid.java +13 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public final class BluetoothUuid { ParcelUuid.fromString("00001105-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid Hid = ParcelUuid.fromString("00001124-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid MessageAccessServer = ParcelUuid.fromString("00001132-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid MessageNotificationServer = ParcelUuid.fromString("00001133-0000-1000-8000-00805f9b34fb"); public static final ParcelUuid PANU = ParcelUuid.fromString("00001115-0000-1000-8000-00805F9B34FB"); public static final ParcelUuid NAP = Loading @@ -67,7 +71,7 @@ public final class BluetoothUuid { public static final ParcelUuid[] RESERVED_UUIDS = { AudioSink, AudioSource, AdvAudioDist, HSP, Handsfree, AvrcpController, AvrcpTarget, ObexObjectPush, PANU, NAP}; ObexObjectPush, MessageAccessServer, MessageNotificationServer, PANU, NAP}; public static boolean isAudioSource(ParcelUuid uuid) { return uuid.equals(AudioSource); Loading Loading @@ -131,6 +135,14 @@ public final class BluetoothUuid { return false; } public static boolean isMessageAccessServer(ParcelUuid uuid) { return uuid.equals(MessageAccessServer); } public static boolean isMessageNotificationServer(ParcelUuid uuid) { return uuid.equals(MessageNotificationServer); } /** * Returns true if there any common ParcelUuids in uuidA and uuidB. * Loading
core/java/android/server/BluetoothService.java +3 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,8 @@ public class BluetoothService extends IBluetooth.Stub { private static final ParcelUuid[] RFCOMM_UUIDS = { BluetoothUuid.Handsfree, BluetoothUuid.HSP, BluetoothUuid.ObexObjectPush }; BluetoothUuid.ObexObjectPush, BluetoothUuid.MessageNotificationServer }; private final BluetoothAdapterProperties mAdapterProperties; private final BluetoothDeviceProperties mDeviceProperties; Loading Loading @@ -589,6 +590,7 @@ public class BluetoothService extends IBluetooth.Stub { if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { uuids.add(BluetoothUuid.HSP_AG); uuids.add(BluetoothUuid.ObexObjectPush); uuids.add(BluetoothUuid.MessageAccessServer); } if (R.getBoolean(com.android.internal.R.bool.config_voice_capable)) { Loading
obex/javax/obex/ClientOperation.java +11 −1 Original line number Diff line number Diff line /* * Copyright (c) 2008-2009, Motorola, Inc. * Copyright (c) 2010-2011, Motorola, Inc. * * All rights reserved. * Loading Loading @@ -121,6 +121,12 @@ public final class ClientOperation implements Operation, BaseStream { (header).mAuthResp.length); } if ((header).mConnectionID != null) { mRequestHeader.mConnectionID = new byte[4]; System.arraycopy((header).mConnectionID, 0, mRequestHeader.mConnectionID, 0, 4); } } /** Loading Loading @@ -723,4 +729,8 @@ public final class ClientOperation implements Operation, BaseStream { } } } public void noEndofBody() { } }
obex/javax/obex/Operation.java +2 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,8 @@ public interface Operation { DataOutputStream openDataOutputStream() throws IOException; void noEndofBody(); void close() throws IOException; int getMaxPacketSize(); Loading
obex/javax/obex/ServerOperation.java +25 −11 Original line number Diff line number Diff line /* * Copyright (c) 2008-2009, Motorola, Inc. * Copyright (c) 2010-2011, Motorola, Inc. * * All rights reserved. * Loading Loading @@ -88,6 +88,8 @@ public final class ServerOperation implements Operation, BaseStream { private boolean mHasBody; private boolean mEndofBody = true; /** * Creates new ServerOperation * @param p the parent that created this object Loading Loading @@ -364,24 +366,31 @@ public final class ServerOperation implements Operation, BaseStream { * (End of Body) otherwise, we need to send 0x48 (Body) */ if ((finalBitSet) || (mPrivateOutput.isClosed())) { out.write(0x49); if (mEndofBody) { out.write((byte)0x49); bodyLength += 3; out.write((byte)(bodyLength >> 8)); out.write((byte)bodyLength); out.write(body); } } else { out.write(0x48); } bodyLength += 3; out.write((byte)(bodyLength >> 8)); out.write((byte)bodyLength); out.write(body); } } } if ((finalBitSet) && (type == ResponseCodes.OBEX_HTTP_OK) && (orginalBodyLength <= 0)) { if (mEndofBody) { out.write(0x49); orginalBodyLength = 3; out.write((byte)(orginalBodyLength >> 8)); out.write((byte)orginalBodyLength); } } mResponseSize = 3; Loading Loading @@ -711,4 +720,9 @@ public final class ServerOperation implements Operation, BaseStream { public void streamClosed(boolean inStream) throws IOException { } public void noEndofBody() { mEndofBody = false; } }