Fix sensor uuid, retrofit recent event logger

Fix an issue that causes uuid field not being initialzed in
sensorservice.

MostRecentEventLogger in sensorservice is migrated to use RingBuffer
instead of a custom circular buffer. This is expected to improve
readability and maintainability of code.

Dumpsys print format is retouched to offer more information in easier
to read format.

Bug: 28305085

Change-Id: I190e43350b60a22a9fccb92a95d6eab06a471560
diff --git a/services/sensorservice/Android.mk b/services/sensorservice/Android.mk
index 85e96d6..5a36961 100644
--- a/services/sensorservice/Android.mk
+++ b/services/sensorservice/Android.mk
@@ -2,21 +2,22 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
-	BatteryService.cpp \
-	CorrectedGyroSensor.cpp \
+    BatteryService.cpp \
+    CorrectedGyroSensor.cpp \
     Fusion.cpp \
     GravitySensor.cpp \
     LinearAccelerationSensor.cpp \
     OrientationSensor.cpp \
+    RecentEventLogger.cpp \
     RotationVectorSensor.cpp \
     SensorDevice.cpp \
+    SensorEventConnection.cpp \
     SensorFusion.cpp \
     SensorInterface.cpp \
-    SensorService.cpp \
-    SensorEventConnection.cpp \
-    MostRecentEventLogger.cpp \
-    SensorRecord.cpp \
     SensorList.cpp \
+    SensorRecord.cpp \
+    SensorService.cpp \
+    SensorServiceUtils.cpp \
 
 
 LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
@@ -26,14 +27,14 @@
 LOCAL_CFLAGS += -fvisibility=hidden
 
 LOCAL_SHARED_LIBRARIES := \
-	libcutils \
-	libhardware \
-	libhardware_legacy \
-	libutils \
-	liblog \
-	libbinder \
-	libui \
-	libgui
+    libcutils \
+    libhardware \
+    libhardware_legacy \
+    libutils \
+    liblog \
+    libbinder \
+    libui \
+    libgui
 
 LOCAL_MODULE:= libsensorservice
 
@@ -44,12 +45,12 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
-	main_sensorservice.cpp
+    main_sensorservice.cpp
 
 LOCAL_SHARED_LIBRARIES := \
-	libsensorservice \
-	libbinder \
-	libutils
+    libsensorservice \
+    libbinder \
+    libutils
 
 LOCAL_CFLAGS := -Wall -Werror -Wextra