diff options
author | Wei Wang <weiwa@google.com> | 2014-05-07 14:54:43 -0700 |
---|---|---|
committer | Wei Wang <weiwa@google.com> | 2014-05-19 19:37:05 -0700 |
commit | 51800847d9a9965a5d00a7960abb50983651d4a2 (patch) | |
tree | a2ab92c6b13bb1f15ba009d0dc7ee2778d72015a /core/tests/bluetoothtests | |
parent | 2f4a82af91faf76aa7dd59b22c1354f06410b634 (diff) | |
download | frameworks_base-51800847d9a9965a5d00a7960abb50983651d4a2.zip frameworks_base-51800847d9a9965a5d00a7960abb50983651d4a2.tar.gz frameworks_base-51800847d9a9965a5d00a7960abb50983651d4a2.tar.bz2 |
Add a method to check whether a UUID is 32bit.
Change-Id: I92e8bab560b2083e9f4855d28b3f54f2120ef628
Diffstat (limited to 'core/tests/bluetoothtests')
-rw-r--r-- | core/tests/bluetoothtests/src/android/bluetooth/BluetoothUuidTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothUuidTest.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothUuidTest.java index 0f3ea0e..536d7226 100644 --- a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothUuidTest.java +++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothUuidTest.java @@ -47,4 +47,20 @@ public class BluetoothUuidTest extends TestCase { assertEquals(ParcelUuid.fromString("FF0F0E0D-0C0B-0A09-0807-0060504030201"), BluetoothUuid.parseUuidFrom(uuid128)); } + + @SmallTest + public void testUuidType() { + assertTrue(BluetoothUuid.is16BitUuid( + ParcelUuid.fromString("0000110B-0000-1000-8000-00805F9B34FB"))); + assertFalse(BluetoothUuid.is32BitUuid( + ParcelUuid.fromString("0000110B-0000-1000-8000-00805F9B34FB"))); + + assertFalse(BluetoothUuid.is16BitUuid( + ParcelUuid.fromString("FE33110B-0000-1000-8000-00805F9B34FB"))); + assertTrue(BluetoothUuid.is32BitUuid( + ParcelUuid.fromString("FE33110B-0000-1000-8000-00805F9B34FB"))); + assertFalse(BluetoothUuid.is32BitUuid( + ParcelUuid.fromString("FE33110B-1000-1000-8000-00805F9B34FB"))); + + } } |