Plumb attribution tag to Sensor Service
Also updates noteOp() to use the attribution tag.
Bug: 171922082
Test: Flash, verify through logs that attribution tags are propagated
Change-Id: I4601f6f8696e8cf1517d2401f8ddfffae4a29d04
diff --git a/services/sensorservice/SensorEventConnection.h b/services/sensorservice/SensorEventConnection.h
index 7bd9d47..4e3f120 100644
--- a/services/sensorservice/SensorEventConnection.h
+++ b/services/sensorservice/SensorEventConnection.h
@@ -50,7 +50,8 @@
public:
SensorEventConnection(const sp<SensorService>& service, uid_t uid, String8 packageName,
- bool isDataInjectionMode, const String16& opPackageName);
+ bool isDataInjectionMode, const String16& opPackageName,
+ const String16& attributionTag);
status_t sendEvents(sensors_event_t const* buffer, size_t count, sensors_event_t* scratch,
wp<const SensorEventConnection> const * mapFlushEventsToConnections = nullptr);
@@ -190,6 +191,7 @@
int mEventsDropped;
String8 mPackageName;
const String16 mOpPackageName;
+ const String16 mAttributionTag;
int mTargetSdk;
#if DEBUG_CONNECTIONS
int mEventsReceived, mEventsSent, mEventsSentFromCache;