diff options
author | kschulz <k.schulz@samsung.com> | 2014-09-25 09:41:39 +0200 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2014-09-25 16:13:25 -0700 |
commit | e796818505a0b57b225c3aeffc53f580c1e0c66e (patch) | |
tree | 50de10e2a303086a88b2e621ead48741fa366a17 /src/com/android/bluetooth/map | |
parent | 94023bd851cb80966d8f8006702d318057c83f09 (diff) | |
download | android_packages_apps_Bluetooth-e796818505a0b57b225c3aeffc53f580c1e0c66e.tar.gz android_packages_apps_Bluetooth-e796818505a0b57b225c3aeffc53f580c1e0c66e.tar.bz2 android_packages_apps_Bluetooth-e796818505a0b57b225c3aeffc53f580c1e0c66e.zip |
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
Diffstat (limited to 'src/com/android/bluetooth/map')
-rw-r--r-- | src/com/android/bluetooth/map/BluetoothMapUtils.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapUtils.java b/src/com/android/bluetooth/map/BluetoothMapUtils.java index d0b7e2de8..81057399d 100644 --- a/src/com/android/bluetooth/map/BluetoothMapUtils.java +++ b/src/com/android/bluetooth/map/BluetoothMapUtils.java @@ -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 |