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

Commit 67e46902 authored by kschulz's avatar kschulz Committed by Matthew Xie
Browse files

BT MAP: fix problem with fetching CDMA messages

A bug in Java makes the Long.parse() function throw and exception when message
handles start to become negative (which happens for CDMA SMS messages).
Fix simply shifts the handle masks on byte down in order to get around
the bug.

Bug: 17627572
Change-Id: Ie41aef589dc9d3ecb8bc7167472218e57a52fa33
parent 4f6a7c9c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -30,11 +30,11 @@ public class BluetoothMapUtils {
     *       in stead of a bit to indicate the message type. Then 4
     *       bit can be use for 16 different message types.
     */
    private static final long HANDLE_TYPE_MASK            = (((long)0xf)<<60);
    private static final long HANDLE_TYPE_MMS_MASK        = (((long)0x1)<<60);
    private static final long HANDLE_TYPE_EMAIL_MASK      = (((long)0x2)<<60);
    private static final long HANDLE_TYPE_SMS_GSM_MASK    = (((long)0x4)<<60);
    private static final long HANDLE_TYPE_SMS_CDMA_MASK   = (((long)0x8)<<60);
    private static final long HANDLE_TYPE_MASK            = (((long)0xf)<<56);
    private static final long HANDLE_TYPE_MMS_MASK        = (((long)0x1)<<56);
    private static final long HANDLE_TYPE_EMAIL_MASK      = (((long)0x2)<<56);
    private static final long HANDLE_TYPE_SMS_GSM_MASK    = (((long)0x4)<<56);
    private static final long HANDLE_TYPE_SMS_CDMA_MASK   = (((long)0x8)<<56);

    /**
     * This enum is used to convert from the bMessage type property to a type safe