OSDN Git Service

service: Improve creating UUIDs from string
authorArman Uguray <armansito@google.com>
Wed, 7 Oct 2015 23:09:54 +0000 (16:09 -0700)
committerArman Uguray <armansito@google.com>
Wed, 14 Oct 2015 19:45:57 +0000 (12:45 -0700)
commitde5cc7034275bf0dfc0124d07b28c70ec634aed7
tree32e29061a1b6e3086fc5108c554961fb8d8a5c21
parent79d1678a7714cb457cdb3435db41ef2336bf429c
service: Improve creating UUIDs from string

- When UUIDs are initialized from a 128-bit UUID, they are now parsed
  from the canonical UUID string representation.

- Invalid strings now cause the UUID to be marked as invalid, rather than
  causing a crash.

- Input such as "0x180d" is now valid.

- Added the GetShortestRepresentationSize() method to use in determining whether
  a UUID is within Base BT SIG UUID domain.

Bug: 24247700

Change-Id: Id28255ec963bc6da27a8e871598016d41920b688
service/common/bluetooth/uuid.cpp
service/common/bluetooth/uuid.h
service/test/uuid_unittest.cpp