Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4baa5bea authored by Brian Stack's avatar Brian Stack
Browse files

Remove "using namespace SensorServiceUtil"

The SensorService was polluting the android namespace by "using
namespace SensorServiceUtil".

Bug: 116026128
Test: Compiles, a_sns_test receives events
Change-Id: Iec353322cb73f48f7ac38a959730e85e8fd5bce0
parent 84ae607b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ const Sensor& SensorService::registerSensor(SensorInterface* s, bool isDebug, bo
    int handle = s->getSensor().getHandle();
    int type = s->getSensor().getType();
    if (mSensors.add(handle, s, isDebug, isVirtual)){
        mRecentEvent.emplace(handle, new RecentEventLogger(type));
        mRecentEvent.emplace(handle, new SensorServiceUtil::RecentEventLogger(type));
        return s->getSensor();
    } else {
        return mSensors.getNonSensor();
+2 −3
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@
namespace android {
// ---------------------------------------------------------------------------
class SensorInterface;
using namespace SensorServiceUtil;

class SensorService :
        public BinderService<SensorService>,
@@ -277,7 +276,7 @@ private:
    static uint8_t sHmacGlobalKey[128];
    static bool sHmacGlobalKeyIsValid;

    SensorList mSensors;
    SensorServiceUtil::SensorList mSensors;
    status_t mInitCheck;

    // Socket buffersize used to initialize BitTube. This size depends on whether batching is
@@ -294,7 +293,7 @@ private:
    bool mWakeLockAcquired;
    sensors_event_t *mSensorEventBuffer, *mSensorEventScratch;
    wp<const SensorEventConnection> * mMapFlushEventsToConnections;
    std::unordered_map<int, RecentEventLogger*> mRecentEvent;
    std::unordered_map<int, SensorServiceUtil::RecentEventLogger*> mRecentEvent;
    SortedVector< wp<SensorDirectConnection> > mDirectConnections;
    Mode mCurrentOperatingMode;