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

Commit a551237d authored by Steve Block's avatar Steve Block Committed by Mathias Agopian
Browse files

Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
parent 1a62301f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -182,13 +182,13 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled)
    Info& info( mActivationCount.editValueFor(handle) );


    LOGD_IF(DEBUG_CONNECTIONS,
    ALOGD_IF(DEBUG_CONNECTIONS,
            "SensorDevice::activate: ident=%p, handle=0x%08x, enabled=%d, count=%d",
            ident, handle, enabled, info.rates.size());

    if (enabled) {
        Mutex::Autolock _l(mLock);
        LOGD_IF(DEBUG_CONNECTIONS, "... index=%ld",
        ALOGD_IF(DEBUG_CONNECTIONS, "... index=%ld",
                info.rates.indexOfKey(ident));

        if (info.rates.indexOfKey(ident) < 0) {
@@ -201,7 +201,7 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled)
        }
    } else {
        Mutex::Autolock _l(mLock);
        LOGD_IF(DEBUG_CONNECTIONS, "... index=%ld",
        ALOGD_IF(DEBUG_CONNECTIONS, "... index=%ld",
                info.rates.indexOfKey(ident));

        ssize_t idx = info.rates.removeItem(ident);
@@ -215,7 +215,7 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled)
    }

    if (actuateHardware) {
        LOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w");
        ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w");

        err = mSensorDevice->activate(mSensorDevice, handle, enabled);
        if (enabled) {
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ template <typename T> inline T max(T a, T b) { return a>b ? a : b; }

status_t SensorFusion::activate(void* ident, bool enabled) {

    LOGD_IF(DEBUG_CONNECTIONS,
    ALOGD_IF(DEBUG_CONNECTIONS,
            "SensorFusion::activate(ident=%p, enabled=%d)",
            ident, enabled);

+7 −7
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ SensorService::SensorService()

void SensorService::onFirstRef()
{
    LOGD("nuSensorService starting...");
    ALOGD("nuSensorService starting...");

    SensorDevice& dev(SensorDevice::getInstance());

@@ -222,7 +222,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args)

bool SensorService::threadLoop()
{
    LOGD("nuSensorService thread starting...");
    ALOGD("nuSensorService thread starting...");

    const size_t numEventMax = 16 * (1 + mVirtualSensorList.size());
    sensors_event_t buffer[numEventMax];
@@ -363,11 +363,11 @@ void SensorService::cleanupConnection(SensorEventConnection* c)
    Mutex::Autolock _l(mLock);
    const wp<SensorEventConnection> connection(c);
    size_t size = mActiveSensors.size();
    LOGD_IF(DEBUG_CONNECTIONS, "%d active sensors", size);
    ALOGD_IF(DEBUG_CONNECTIONS, "%d active sensors", size);
    for (size_t i=0 ; i<size ; ) {
        int handle = mActiveSensors.keyAt(i);
        if (c->hasSensor(handle)) {
            LOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle);
            ALOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle);
            SensorInterface* sensor = mSensorMap.valueFor( handle );
            LOGE_IF(!sensor, "mSensorMap[handle=0x%08x] is null!", handle);
            if (sensor) {
@@ -376,12 +376,12 @@ void SensorService::cleanupConnection(SensorEventConnection* c)
        }
        SensorRecord* rec = mActiveSensors.valueAt(i);
        LOGE_IF(!rec, "mActiveSensors[%d] is null (handle=0x%08x)!", i, handle);
        LOGD_IF(DEBUG_CONNECTIONS,
        ALOGD_IF(DEBUG_CONNECTIONS,
                "removing connection %p for sensor[%d].handle=0x%08x",
                c, i, handle);

        if (rec && rec->removeConnection(connection)) {
            LOGD_IF(DEBUG_CONNECTIONS, "... and it was the last connection");
            ALOGD_IF(DEBUG_CONNECTIONS, "... and it was the last connection");
            mActiveSensors.removeItemsAt(i, 1);
            mActiveVirtualSensors.removeItem(handle);
            delete rec;
@@ -528,7 +528,7 @@ SensorService::SensorEventConnection::SensorEventConnection(

SensorService::SensorEventConnection::~SensorEventConnection()
{
    LOGD_IF(DEBUG_CONNECTIONS, "~SensorEventConnection(%p)", this);
    ALOGD_IF(DEBUG_CONNECTIONS, "~SensorEventConnection(%p)", this);
    mService->cleanupConnection(this);
}