diff options
author | Sungsoo Lim <sungsoo@google.com> | 2014-08-01 01:24:14 +0000 |
---|---|---|
committer | Sungsoo Lim <sungsoo@google.com> | 2014-08-01 01:24:14 +0000 |
commit | 67c01a4b6d890212fb4647973a627e25a3a9788b (patch) | |
tree | 27cc21eceaa75dd0905bdb54f8d46979909f34dd /core/tests/bluetoothtests/src | |
parent | 3f7a39063ab7b3d7a38b773449ba2b37674e3458 (diff) | |
download | frameworks_base-67c01a4b6d890212fb4647973a627e25a3a9788b.zip frameworks_base-67c01a4b6d890212fb4647973a627e25a3a9788b.tar.gz frameworks_base-67c01a4b6d890212fb4647973a627e25a3a9788b.tar.bz2 |
Revert "Service data and manufacturer data can be repeated fields."
This reverts commit 26dc9b99b17ca9d8ce3632c48e8b6c1450ee53e9.
Change-Id: I1846d0a6491c5b2ba5905411bd98f5d17909b705
Diffstat (limited to 'core/tests/bluetoothtests/src')
-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 e58d905..5e451ca 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) - .addManufacturerData(manufacturerId, manufacturerData).build(); + .setManufacturerData(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) - .addServiceData(uuid, serviceData).build(); + .setServiceData(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) - .addManufacturerData(manufacturerId, manufacturerData).build(); + .setManufacturerData(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) - .addServiceData(uuid, serviceData).build(); + .setServiceData(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 8b3db7e..ccdd90a 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()); - assertTrue(data.getManufacturerSpecificData().get(0x00E0) != null); + assertEquals(0x00e0, data.getManufacturerId()); assertArrayEquals(new byte[] { - 0x02, 0x15 }, data.getManufacturerSpecificData().get(0x00E0)); + 0x02, 0x15 }, data.getManufacturerSpecificData()); - assertTrue(data.getServiceData().containsKey(uuid2)); + assertEquals(uuid2, data.getServiceDataUuid()); assertArrayEquals(new byte[] { - 0x50, 0x64 }, data.getServiceData().get(uuid2)); + 0x50, 0x64 }, data.getServiceData()); } // Assert two byte arrays are equal. |