track UID with connections
Change-Id: Id4865f3cd27a95acdbbfdff1f2bb4123f312a13b
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 54a76e8..18591bf 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -77,13 +77,14 @@
sp<SensorService> const mService;
sp<BitTube> const mChannel;
+ uid_t mUid;
mutable Mutex mConnectionLock;
// protected by SensorService::mLock
SortedVector<int> mSensorInfo;
public:
- SensorEventConnection(const sp<SensorService>& service);
+ SensorEventConnection(const sp<SensorService>& service, uid_t uid);
status_t sendEvents(sensors_event_t const* buffer, size_t count,
sensors_event_t* scratch = NULL);
@@ -91,6 +92,8 @@
bool hasAnySensor() const;
bool addSensor(int32_t handle);
bool removeSensor(int32_t handle);
+
+ uid_t getUid() const { return mUid; }
};
class SensorRecord {