Use one type for UUID (1/5)

Currently, we have few different representations for UUID in stack:
tBT_UUID, tSDP_UUID, bt_uuid_t, bluetooth:UUID, or uint8_t*.

Additionally, tBT_UUID and bt_uuid_t are used to hold UUID as 128bit
as Little Endian or Big Endian, depending on which part of stack (GATT
or SDP) is using it.

This patch is creating one type, bluetooth::Uuid, that will replace all
other types.

Bug: 66912853
Test: all sl4a tests for GATT and RFCOMM
Merged-In: Ia42d3233146db0488728ed6f878f99b368fe8838
Change-Id: Ia42d3233146db0488728ed6f878f99b368fe8838
diff --git a/service/low_energy_scanner.h b/service/low_energy_scanner.h
index 279ea7b..5e93bc6 100644
--- a/service/low_energy_scanner.h
+++ b/service/low_energy_scanner.h
@@ -22,6 +22,7 @@
 #include <mutex>
 
 #include <base/macros.h>
+#include <bluetooth/uuid.h>
 
 #include "service/bluetooth_instance.h"
 #include "service/common/bluetooth/advertise_data.h"
@@ -30,7 +31,6 @@
 #include "service/common/bluetooth/scan_filter.h"
 #include "service/common/bluetooth/scan_result.h"
 #include "service/common/bluetooth/scan_settings.h"
-#include "service/common/bluetooth/uuid.h"
 #include "service/hal/bluetooth_gatt_interface.h"
 
 namespace bluetooth {
@@ -81,7 +81,7 @@
   const ScanSettings& scan_settings() const { return scan_settings_; }
 
   // BluetoothInstace overrides:
-  const UUID& GetAppIdentifier() const override;
+  const Uuid& GetAppIdentifier() const override;
   int GetInstanceId() const override;
 
   void ScanResultCallback(hal::BluetoothGattInterface* gatt_iface,
@@ -93,7 +93,7 @@
 
   // Constructor shouldn't be called directly as instances are meant to be
   // obtained from the factory.
-  LowEnergyScanner(Adapter& adapter, const UUID& uuid, int scanner_id);
+  LowEnergyScanner(Adapter& adapter, const Uuid& uuid, int scanner_id);
 
   // Calls and clears the pending callbacks.
   void InvokeAndClearStartCallback(BLEStatus status);
@@ -103,7 +103,7 @@
   Adapter& adapter_;
 
   // See getters above for documentation.
-  UUID app_identifier_;
+  Uuid app_identifier_;
   int scanner_id_;
 
   // Protects device scan related members below.
@@ -137,7 +137,7 @@
   ~LowEnergyScannerFactory() override;
 
   // BluetoothInstanceFactory override:
-  bool RegisterInstance(const UUID& app_uuid,
+  bool RegisterInstance(const Uuid& app_uuid,
                         const RegisterCallback& callback) override;
 
  private:
@@ -145,12 +145,12 @@
 
   // BluetoothGattInterface::ScannerObserver overrides:
   void RegisterScannerCallback(const RegisterCallback& callback,
-                               const UUID& app_uuid, uint8_t scanner_id,
+                               const Uuid& app_uuid, uint8_t scanner_id,
                                uint8_t status);
 
   // Map of pending calls to register.
   std::mutex pending_calls_lock_;
-  std::unordered_set<UUID> pending_calls_;
+  std::unordered_set<Uuid> pending_calls_;
 
   // Raw pointer to the Adapter that owns this factory.
   Adapter& adapter_;