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/libs/sensor/SensorManager.cpp b/libs/sensor/SensorManager.cpp
index a4a5d13..62f4b4e 100644
--- a/libs/sensor/SensorManager.cpp
+++ b/libs/sensor/SensorManager.cpp
@@ -225,13 +225,14 @@
return nullptr;
}
-sp<SensorEventQueue> SensorManager::createEventQueue(String8 packageName, int mode) {
+sp<SensorEventQueue> SensorManager::createEventQueue(
+ String8 packageName, int mode, String16 attributionTag) {
sp<SensorEventQueue> queue;
Mutex::Autolock _l(mLock);
while (assertStateLocked() == NO_ERROR) {
- sp<ISensorEventConnection> connection =
- mSensorServer->createSensorEventConnection(packageName, mode, mOpPackageName);
+ sp<ISensorEventConnection> connection = mSensorServer->createSensorEventConnection(
+ packageName, mode, mOpPackageName, attributionTag);
if (connection == nullptr) {
// SensorService just died or the app doesn't have required permissions.
ALOGE("createEventQueue: connection is NULL.");