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

Commit f623be44 authored by Jack He's avatar Jack He Committed by android-build-merger
Browse files

Merge "OPP: Fix support for vCal 1.0 and iCal 2.0" am: aa7be78f

am: 9bb3c43c

Change-Id: I646d9b44380744627533c23b105ea7467acd3f8a
parents cb6ffc3f 9bb3c43c
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -147,6 +147,8 @@
                <data android:mimeType="video/*" />
                <data android:mimeType="video/*" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="text/x-vcard" />
                <data android:mimeType="text/x-vcard" />
                <data android:mimeType="text/x-vcalendar" />
                <data android:mimeType="text/calendar" />
                <data android:mimeType="text/plain" />
                <data android:mimeType="text/plain" />
                <data android:mimeType="text/html" />
                <data android:mimeType="text/html" />
                <data android:mimeType="text/xml" />
                <data android:mimeType="text/xml" />
+3 −6
Original line number Original line Diff line number Diff line
@@ -80,13 +80,10 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
    private static final boolean D = Constants.DEBUG;
    private static final boolean D = Constants.DEBUG;
    private static final boolean V = Constants.VERBOSE;
    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 = {
    private static final byte[] SUPPORTED_OPP_FORMAT = {
            OPP_FORMAT_VCARD21, OPP_FORMAT_VCARD30, OPP_FORMAT_VCAL10, OPP_FORMAT_ANY_TYPE_OF_OBJ};
            0x01 /* vCard 2.1 */, 0x02 /* vCard 3.0 */, 0x03 /* vCal 1.0 */, 0x04 /* iCal 2.0 */,
            (byte) 0xFF /* Any type of object */
    };


    private boolean userAccepted = false;
    private boolean userAccepted = false;


+3 −21
Original line number Original line Diff line number Diff line
@@ -192,24 +192,6 @@ public class Constants {


    public static final int MEDIA_SCANNED_SCANNED_FAILED = 2;
    public static final int MEDIA_SCANNED_SCANNED_FAILED = 2;


    /**
     * The MIME type(s) of we could share to other device.
     */
    /*
     * TODO: define correct type list
     */
    public static final String[] ACCEPTABLE_SHARE_OUTBOUND_TYPES = new String[] {
        "image/*", "text/x-vcard",
    };

    /**
     * The MIME type(s) of we could not share to other device. TODO: define
     * correct type list
     */
    public static final String[] UNACCEPTABLE_SHARE_OUTBOUND_TYPES = new String[] {
        "virus/*",
    };

    /**
    /**
     * The MIME type(s) of we could accept from other device.
     * The MIME type(s) of we could accept from other device.
     * This is in essence a "white list" of acceptable types.
     * This is in essence a "white list" of acceptable types.
@@ -220,6 +202,8 @@ public class Constants {
        "video/*",
        "video/*",
        "audio/*",
        "audio/*",
        "text/x-vcard",
        "text/x-vcard",
        "text/x-vcalendar",
        "text/calendar",
        "text/plain",
        "text/plain",
        "text/html",
        "text/html",
        "text/xml",
        "text/xml",
@@ -238,9 +222,7 @@ public class Constants {
     * The MIME type(s) of we could not accept from other device. TODO: define
     * The MIME type(s) of we could not accept from other device. TODO: define
     * correct type list
     * correct type list
     */
     */
    public static final String[] UNACCEPTABLE_SHARE_INBOUND_TYPES = new String[] {
    public static final String[] UNACCEPTABLE_SHARE_INBOUND_TYPES = new String[] {};
        "text/x-vcalendar",
    };


    /** Where we store Bluetooth received files on the external storage */
    /** Where we store Bluetooth received files on the external storage */
    public static final String DEFAULT_STORE_SUBDIR = "/bluetooth";
    public static final String DEFAULT_STORE_SUBDIR = "/bluetooth";