diff options
author | Wei Wang <weiwa@google.com> | 2014-08-01 11:12:37 -0700 |
---|---|---|
committer | Wei Wang <weiwa@google.com> | 2014-08-01 11:12:37 -0700 |
commit | 6bf513d32db7fbc157681bd642e12a201cf20a89 (patch) | |
tree | f012db311cff4a4b99f06d716265c1d53b0484e9 /core/tests/bluetoothtests | |
parent | 9aa499ac42e8e047c9341715599b1ffba4c6f827 (diff) | |
download | frameworks_base-6bf513d32db7fbc157681bd642e12a201cf20a89.zip frameworks_base-6bf513d32db7fbc157681bd642e12a201cf20a89.tar.gz frameworks_base-6bf513d32db7fbc157681bd642e12a201cf20a89.tar.bz2 |
Revert "Revert "Service data and manufacturer data can be repeated fields.""
This reverts commit 14c797702543bb5ced989565d90abcfa55c7db46.
Diffstat (limited to 'core/tests/bluetoothtests')
-rw-r--r-- | core/tests/bluetoothtests/src/android/bluetooth/le/AdvertiseDataTest.java | 8 | ||||
-rw-r--r-- | core/tests/bluetoothtests/src/android/bluetooth/le/ScanRecordTest.java | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/le/AdvertiseDataTest.java b/core/tests/bluetoothtests/src/android/bluetooth/le/AdvertiseDataTest.java index 5e451ca..e58d905 100644 --- a/core/tests/bluetoothtests/src/android/bluetooth/le/AdvertiseDataTest.java +++ b/core/tests/bluetoothtests/src/android/bluetooth/le/AdvertiseDataTest.java @@ -66,7 +66,7 @@ public class AdvertiseDataTest extends TestCase { byte[] manufacturerData = new byte[0]; AdvertiseData data = mAdvertiseDataBuilder.setIncludeDeviceName(true) - .setManufacturerData(manufacturerId, manufacturerData).build(); + .addManufacturerData(manufacturerId, manufacturerData).build(); data.writeToParcel(parcel, 0); parcel.setDataPosition(0); AdvertiseData dataFromParcel = @@ -81,7 +81,7 @@ public class AdvertiseDataTest extends TestCase { byte[] serviceData = new byte[0]; AdvertiseData data = mAdvertiseDataBuilder.setIncludeDeviceName(true) - .setServiceData(uuid, serviceData).build(); + .addServiceData(uuid, serviceData).build(); data.writeToParcel(parcel, 0); parcel.setDataPosition(0); AdvertiseData dataFromParcel = @@ -117,7 +117,7 @@ public class AdvertiseDataTest extends TestCase { AdvertiseData data = mAdvertiseDataBuilder.setIncludeDeviceName(true) .addServiceUuid(uuid).addServiceUuid(uuid2) - .setManufacturerData(manufacturerId, manufacturerData).build(); + .addManufacturerData(manufacturerId, manufacturerData).build(); data.writeToParcel(parcel, 0); parcel.setDataPosition(0); @@ -134,7 +134,7 @@ public class AdvertiseDataTest extends TestCase { (byte) 0xF0, 0x00, 0x02, 0x15 }; AdvertiseData data = mAdvertiseDataBuilder.setIncludeDeviceName(true) - .setServiceData(uuid, serviceData).build(); + .addServiceData(uuid, serviceData).build(); data.writeToParcel(parcel, 0); parcel.setDataPosition(0); AdvertiseData dataFromParcel = diff --git a/core/tests/bluetoothtests/src/android/bluetooth/le/ScanRecordTest.java b/core/tests/bluetoothtests/src/android/bluetooth/le/ScanRecordTest.java index ccdd90a..8b3db7e 100644 --- a/core/tests/bluetoothtests/src/android/bluetooth/le/ScanRecordTest.java +++ b/core/tests/bluetoothtests/src/android/bluetooth/le/ScanRecordTest.java @@ -53,13 +53,13 @@ public class ScanRecordTest extends TestCase { assertEquals("Ped", data.getDeviceName()); assertEquals(-20, data.getTxPowerLevel()); - assertEquals(0x00e0, data.getManufacturerId()); + assertTrue(data.getManufacturerSpecificData().get(0x00E0) != null); assertArrayEquals(new byte[] { - 0x02, 0x15 }, data.getManufacturerSpecificData()); + 0x02, 0x15 }, data.getManufacturerSpecificData().get(0x00E0)); - assertEquals(uuid2, data.getServiceDataUuid()); + assertTrue(data.getServiceData().containsKey(uuid2)); assertArrayEquals(new byte[] { - 0x50, 0x64 }, data.getServiceData()); + 0x50, 0x64 }, data.getServiceData().get(uuid2)); } // Assert two byte arrays are equal. |