OSDN Git Service

Fix GATT Characteristic write type serialization
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 1 Apr 2016 14:17:15 +0000 (07:17 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 1 Apr 2016 17:59:09 +0000 (17:59 +0000)
Default writeType for GATT characteristic was not being
serialized into Parcel. This cause errors when trying to
write into Characteristic.

Bug: 27910548
Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33

core/java/android/bluetooth/BluetoothGattCharacteristic.java

index 7d698b3..01f82e6 100644 (file)
@@ -284,6 +284,8 @@ public class BluetoothGattCharacteristic implements Parcelable {
         out.writeInt(mInstance);
         out.writeInt(mProperties);
         out.writeInt(mPermissions);
+        out.writeInt(mKeySize);
+        out.writeInt(mWriteType);
         out.writeTypedList(mDescriptors);
     }
 
@@ -303,6 +305,8 @@ public class BluetoothGattCharacteristic implements Parcelable {
         mInstance = in.readInt();
         mProperties = in.readInt();
         mPermissions = in.readInt();
+        mKeySize = in.readInt();
+        mWriteType = in.readInt();
 
         mDescriptors = new ArrayList<BluetoothGattDescriptor>();