track UID with connections

Change-Id: Id4865f3cd27a95acdbbfdff1f2bb4123f312a13b
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index c9b0f7c..cc2f745 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -383,7 +383,8 @@
 
 sp<ISensorEventConnection> SensorService::createSensorEventConnection()
 {
-    sp<SensorEventConnection> result(new SensorEventConnection(this));
+    uid_t uid = IPCThreadState::self()->getCallingUid();
+    sp<SensorEventConnection> result(new SensorEventConnection(this, uid));
     return result;
 }
 
@@ -553,8 +554,8 @@
 // ---------------------------------------------------------------------------
 
 SensorService::SensorEventConnection::SensorEventConnection(
-        const sp<SensorService>& service)
-    : mService(service), mChannel(new BitTube())
+        const sp<SensorService>& service, uid_t uid)
+    : mService(service), mChannel(new BitTube()), mUid(uid)
 {
 }