Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08adbb82 authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "Ported: Bluetooth Message Access Profile (MAP) from CM9"

This reverts commit 0e5fdcff.
parent ebcd2bba
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -56,10 +56,6 @@ 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 =
@@ -71,7 +67,7 @@ public final class BluetoothUuid {

    public static final ParcelUuid[] RESERVED_UUIDS = {
        AudioSink, AudioSource, AdvAudioDist, HSP, Handsfree, AvrcpController, AvrcpTarget,
        ObexObjectPush, MessageAccessServer, MessageNotificationServer, PANU, NAP};
        ObexObjectPush, PANU, NAP};

    public static boolean isAudioSource(ParcelUuid uuid) {
        return uuid.equals(AudioSource);
@@ -135,14 +131,6 @@ 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.
     *
+1 −11
Original line number Diff line number Diff line
/*
 * Copyright (c) 2010-2011, Motorola, Inc.
 * Copyright (c) 2008-2009, Motorola, Inc.
 *
 * All rights reserved.
 *
@@ -121,12 +121,6 @@ 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);

        }
    }

    /**
@@ -729,8 +723,4 @@ public final class ClientOperation implements Operation, BaseStream {
            }
        }
    }

    public void noEndofBody() {

    }
}
+0 −2
Original line number Diff line number Diff line
@@ -175,8 +175,6 @@ public interface Operation {

    DataOutputStream openDataOutputStream() throws IOException;

    void noEndofBody();

    void close() throws IOException;

    int getMaxPacketSize();
+11 −25
Original line number Diff line number Diff line
/*
 * Copyright (c) 2010-2011, Motorola, Inc.
 * Copyright (c) 2008-2009, Motorola, Inc.
 *
 * All rights reserved.
 *
@@ -88,8 +88,6 @@ 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
@@ -366,31 +364,24 @@ public final class ServerOperation implements Operation, BaseStream {
                 * (End of Body) otherwise, we need to send 0x48 (Body)
                 */
                if ((finalBitSet) || (mPrivateOutput.isClosed())) {
                    if (mEndofBody) {
                        out.write((byte)0x49);
                        bodyLength += 3;
                        out.write((byte)(bodyLength >> 8));
                        out.write((byte)bodyLength);
                        out.write(body);
                    }
                    out.write(0x49);
                } 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;
@@ -720,9 +711,4 @@ public final class ServerOperation implements Operation, BaseStream {
    public void streamClosed(boolean inStream) throws IOException {

    }

    public void noEndofBody() {
        mEndofBody = false;
    }

}