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

Commit 464c5c4c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "OPP: Remove un-supported formats from SDP"

parents 1c75df6e b16e4ea0
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -80,6 +80,14 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
    private static final boolean D = Constants.DEBUG;
    private static final boolean V = Constants.VERBOSE;

    private static final byte OPP_FORMAT_VCARD21 = 0x01;
    private static final byte OPP_FORMAT_VCARD30 = 0x02;
    private static final byte OPP_FORMAT_VCAL10 = 0x03;
    private static final byte OPP_FORMAT_ANY_TYPE_OF_OBJ = (byte) 0xFF;

    private static final byte[] SUPPORTED_OPP_FORMAT = {
            OPP_FORMAT_VCARD21, OPP_FORMAT_VCARD30, OPP_FORMAT_VCAL10, OPP_FORMAT_ANY_TYPE_OF_OBJ};

    private boolean userAccepted = false;

    private class BluetoothShareContentObserver extends ContentObserver {
@@ -358,7 +366,7 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
            return;
        }
        sdpManager.createOppOpsRecord("OBEX Object Push", mServerSocket.getRfcommChannel(),
                mServerSocket.getL2capPsm(), 0x0102, SdpManager.OPP_FORMAT_ALL);
                mServerSocket.getL2capPsm(), 0x0102, SUPPORTED_OPP_FORMAT);
    }

    @Override
+0 −20
Original line number Diff line number Diff line
@@ -49,26 +49,6 @@ public class SdpManager {
    public static final byte PBAP_REPO_SPEED_DAIL   = 0x01<<2;
    public static final byte PBAP_REPO_FAVORITES    = 0x01<<3;

    // TODO: When changing OPP to use this new API.
    //       Move the defines to the profile
    /* Object Push formats */
    public static final byte OPP_FORMAT_VCARD21     = 0x01;
    public static final byte OPP_FORMAT_VCARD30     = 0x02;
    public static final byte OPP_FORMAT_VCAL10      = 0x03;
    public static final byte OPP_FORMAT_ICAL20      = 0x04;
    public static final byte OPP_FORMAT_VNOTE       = 0x05;
    public static final byte OPP_FORMAT_VMESSAGE    = 0x06;
    public static final byte OPP_FORMAT_ANY_TYPE_OF_OBJ = (byte)0xFF;

    public static final byte[] OPP_FORMAT_ALL= {
        OPP_FORMAT_VCARD21,
        OPP_FORMAT_VCARD30,
        OPP_FORMAT_VCAL10,
        OPP_FORMAT_ICAL20,
        OPP_FORMAT_VNOTE,
        OPP_FORMAT_VMESSAGE,
        OPP_FORMAT_ANY_TYPE_OF_OBJ};

    /* Variables to keep track of ongoing and queued search requests.
     * mTrackerLock must be held, when using/changing sSdpSearchTracker
     * and mSearchInProgress. */