summaryrefslogtreecommitdiff
path: root/services/sensorservice/SensorEventConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/sensorservice/SensorEventConnection.h')
-rw-r--r--services/sensorservice/SensorEventConnection.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/services/sensorservice/SensorEventConnection.h b/services/sensorservice/SensorEventConnection.h
index 909053be50..9487a39a92 100644
--- a/services/sensorservice/SensorEventConnection.h
+++ b/services/sensorservice/SensorEventConnection.h
@@ -50,8 +50,7 @@ class SensorService::SensorEventConnection:
public:
SensorEventConnection(const sp<SensorService>& service, uid_t uid, String8 packageName,
- bool isDataInjectionMode, const String16& opPackageName,
- const String16& attributionTag);
+ bool isDataInjectionMode, const String16& opPackageName);
status_t sendEvents(sensors_event_t const* buffer, size_t count, sensors_event_t* scratch,
wp<const SensorEventConnection> const * mapFlushEventsToConnections = nullptr);
@@ -69,9 +68,6 @@ public:
String8 getPackageName() const;
uid_t getUid() const { return mUid; }
- // cap/uncap existing connection depending on the state of the mic toggle.
- void onMicSensorAccessChanged(bool isMicToggleOn);
- userid_t getUserId() const { return mUserId; }
private:
virtual ~SensorEventConnection();
@@ -141,14 +137,10 @@ private:
// Call noteOp for the sensor if the sensor requires a permission
bool noteOpIfRequired(const sensors_event_t& event);
- // Limits all active connections when the mic toggle is flipped to on.
- void capRates();
- // Recover sensor connection previously capped by capRates().
- void uncapRates();
+
sp<SensorService> const mService;
sp<BitTube> mChannel;
uid_t mUid;
- std::atomic_bool mIsRateCappedBasedOnPermission;
mutable Mutex mConnectionLock;
// Number of events from wake up sensors which are still pending and haven't been delivered to
// the corresponding application. It is incremented by one unit for each write to the socket.
@@ -185,7 +177,6 @@ private:
int mEventsDropped;
String8 mPackageName;
const String16 mOpPackageName;
- const String16 mAttributionTag;
int mTargetSdk;
#if DEBUG_CONNECTIONS
int mEventsReceived, mEventsSent, mEventsSentFromCache;
@@ -198,9 +189,6 @@ private:
// Store a mapping of sensor handles to required AppOp for a sensor. This map only contains a
// valid mapping for sensors that require a permission in order to reduce the lookup time.
std::unordered_map<int32_t, int32_t> mHandleToAppOp;
- // Mapping of sensor handles to its rate before being capped by the mic toggle.
- std::unordered_map<int, nsecs_t> mMicSamplingPeriodBackup;
- userid_t mUserId;
};
} // namepsace android