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

Commit 80338af1 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-bf3460d4-15ec-4b2b-816a-b106ef372c4b-for-git_oc-dr1-release-41...

release-request-bf3460d4-15ec-4b2b-816a-b106ef372c4b-for-git_oc-dr1-release-4164433 snap-temp-L62100000080728136

Change-Id: If5818a574b0be77dce7b8c5eff54ba4d576c12c9
parents fc2cf71f fa0b9186
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@
                <data android:mimeType="video/*" />
                <data android:mimeType="audio/*" />
                <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/html" />
                <data android:mimeType="text/xml" />
+17 −1
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ public class AddressedMediaPlayer {
    static private final long SINGLE_QID = 1;
    static private final String UNKNOWN_TITLE = "(unknown)";

    static private final String GPM_BUNDLE_METADATA_KEY =
            "com.google.android.music.mediasession.music_metadata";

    private AvrcpMediaRspInterface mMediaInterface;
    private @NonNull List<MediaSession.QueueItem> mNowPlayingList;

@@ -186,6 +189,7 @@ public class AddressedMediaPlayer {

    private Bundle fillBundle(MediaMetadata metadata, Bundle currentExtras) {
        if (metadata == null) {
            Log.i(TAG, "fillBundle: metadata is null");
            return currentExtras;
        }

@@ -391,10 +395,22 @@ public class AddressedMediaPlayer {
            MediaDescription desc = item.getDescription();
            Bundle extras = desc.getExtras();
            boolean isCurrentTrack = item.getQueueId() == getActiveQueueItemId(mediaController);
            MediaMetadata data = null;
            if (isCurrentTrack) {
                if (DEBUG) Log.d(TAG, "getAttrValue: item is active, using current data");
                extras = fillBundle(mediaController.getMetadata(), extras);
                data = mediaController.getMetadata();
                if (data == null)
                    Log.e(TAG, "getMetadata didn't give us any metadata for the current track");
            }

            if (data == null) {
                // TODO: This code can be removed when b/63117921 is resolved
                data = (MediaMetadata) extras.get(GPM_BUNDLE_METADATA_KEY);
                extras = null; // We no longer need the data in here
            }

            extras = fillBundle(data, extras);

            if (DEBUG) Log.d(TAG, "getAttrValue: item " + item + " : " + desc);
            switch (attr) {
                case AvrcpConstants.ATTRID_TITLE:
+2 −1
Original line number Diff line number Diff line
@@ -323,7 +323,8 @@ class HeadsetPhoneState {
             */
            private int gsmAsuToSignal(SignalStrength signalStrength) {
                int asu = signalStrength.getGsmSignalStrength();
                if      (asu >= 16) return 5;
                if      (asu == 99) return 0;
                else if (asu >= 16) return 5;
                else if (asu >= 8)  return 4;
                else if (asu >= 4)  return 3;
                else if (asu >= 2)  return 2;
+3 −6
Original line number 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 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};
            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;

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

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

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