Loading services/sensorservice/BatteryService.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ void BatteryService::cleanupImpl(uid_t uid) { bool BatteryService::checkService() { if (mBatteryStatService == nullptr) { const sp<IServiceManager> sm(defaultServiceManager()); if (sm != NULL) { if (sm != nullptr) { const String16 name("batterystats"); mBatteryStatService = interface_cast<IBatteryStats>(sm->getService(name)); } Loading services/sensorservice/RotationVectorSensor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ const char* RotationVectorSensor::getSensorName() const { return "GeoMag Rotation Vector Sensor"; default: assert(0); return NULL; return nullptr; } } Loading services/sensorservice/SensorDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ ssize_t SensorDevice::poll(sensors_event_t* buffer, size_t count) { if(numHidlTransportErrors > 0) { ALOGE("Saw %d Hidl transport failures", numHidlTransportErrors); HidlTransportErrorLog errLog(time(NULL), numHidlTransportErrors); HidlTransportErrorLog errLog(time(nullptr), numHidlTransportErrors); mHidlTransportErrors.add(errLog); mTotalHidlTransportErrors++; } Loading services/sensorservice/SensorEventConnection.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ SensorService::SensorEventConnection::SensorEventConnection( const sp<SensorService>& service, uid_t uid, String8 packageName, bool isDataInjectionMode, const String16& opPackageName, bool hasSensorAccess) : mService(service), mUid(uid), mWakeLockRefCount(0), mHasLooperCallbacks(false), mDead(false), mDataInjectionMode(isDataInjectionMode), mEventCache(NULL), mDead(false), mDataInjectionMode(isDataInjectionMode), mEventCache(nullptr), mCacheSize(0), mMaxCacheSize(0), mPackageName(packageName), mOpPackageName(opPackageName), mDestroyed(false), mHasSensorAccess(hasSensorAccess) { mChannel = new BitTube(mService->mSocketBufferSize); Loading @@ -55,7 +55,7 @@ void SensorService::SensorEventConnection::destroy() { } mService->cleanupConnection(this); if (mEventCache != NULL) { if (mEventCache != nullptr) { delete[] mEventCache; } mDestroyed = true; Loading Loading @@ -200,7 +200,7 @@ void SensorService::SensorEventConnection::updateLooperRegistrationLocked( // Add the file descriptor to the Looper for receiving acknowledegments if the app has // registered for wake-up sensors OR for sending events in the cache. int ret = looper->addFd(mChannel->getSendFd(), 0, looper_flags, this, NULL); int ret = looper->addFd(mChannel->getSendFd(), 0, looper_flags, this, nullptr); if (ret == 1) { ALOGD_IF(DEBUG_CONNECTIONS, "%p addFd fd=%d", this, mChannel->getSendFd()); mHasLooperCallbacks = true; Loading Loading @@ -371,7 +371,7 @@ status_t SensorService::SensorEventConnection::sendEvents( --mTotalAcksNeeded; #endif } if (mEventCache == NULL) { if (mEventCache == nullptr) { mMaxCacheSize = computeMaxCacheSizeLocked(); mEventCache = new sensors_event_t[mMaxCacheSize]; mCacheSize = 0; Loading services/sensorservice/SensorEventConnection.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public: bool hasSensorAccess); status_t sendEvents(sensors_event_t const* buffer, size_t count, sensors_event_t* scratch, wp<const SensorEventConnection> const * mapFlushEventsToConnections = NULL); wp<const SensorEventConnection> const * mapFlushEventsToConnections = nullptr); bool hasSensor(int32_t handle) const; bool hasAnySensor() const; bool hasOneShotSensors() const; Loading Loading
services/sensorservice/BatteryService.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ void BatteryService::cleanupImpl(uid_t uid) { bool BatteryService::checkService() { if (mBatteryStatService == nullptr) { const sp<IServiceManager> sm(defaultServiceManager()); if (sm != NULL) { if (sm != nullptr) { const String16 name("batterystats"); mBatteryStatService = interface_cast<IBatteryStats>(sm->getService(name)); } Loading
services/sensorservice/RotationVectorSensor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ const char* RotationVectorSensor::getSensorName() const { return "GeoMag Rotation Vector Sensor"; default: assert(0); return NULL; return nullptr; } } Loading
services/sensorservice/SensorDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ ssize_t SensorDevice::poll(sensors_event_t* buffer, size_t count) { if(numHidlTransportErrors > 0) { ALOGE("Saw %d Hidl transport failures", numHidlTransportErrors); HidlTransportErrorLog errLog(time(NULL), numHidlTransportErrors); HidlTransportErrorLog errLog(time(nullptr), numHidlTransportErrors); mHidlTransportErrors.add(errLog); mTotalHidlTransportErrors++; } Loading
services/sensorservice/SensorEventConnection.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ SensorService::SensorEventConnection::SensorEventConnection( const sp<SensorService>& service, uid_t uid, String8 packageName, bool isDataInjectionMode, const String16& opPackageName, bool hasSensorAccess) : mService(service), mUid(uid), mWakeLockRefCount(0), mHasLooperCallbacks(false), mDead(false), mDataInjectionMode(isDataInjectionMode), mEventCache(NULL), mDead(false), mDataInjectionMode(isDataInjectionMode), mEventCache(nullptr), mCacheSize(0), mMaxCacheSize(0), mPackageName(packageName), mOpPackageName(opPackageName), mDestroyed(false), mHasSensorAccess(hasSensorAccess) { mChannel = new BitTube(mService->mSocketBufferSize); Loading @@ -55,7 +55,7 @@ void SensorService::SensorEventConnection::destroy() { } mService->cleanupConnection(this); if (mEventCache != NULL) { if (mEventCache != nullptr) { delete[] mEventCache; } mDestroyed = true; Loading Loading @@ -200,7 +200,7 @@ void SensorService::SensorEventConnection::updateLooperRegistrationLocked( // Add the file descriptor to the Looper for receiving acknowledegments if the app has // registered for wake-up sensors OR for sending events in the cache. int ret = looper->addFd(mChannel->getSendFd(), 0, looper_flags, this, NULL); int ret = looper->addFd(mChannel->getSendFd(), 0, looper_flags, this, nullptr); if (ret == 1) { ALOGD_IF(DEBUG_CONNECTIONS, "%p addFd fd=%d", this, mChannel->getSendFd()); mHasLooperCallbacks = true; Loading Loading @@ -371,7 +371,7 @@ status_t SensorService::SensorEventConnection::sendEvents( --mTotalAcksNeeded; #endif } if (mEventCache == NULL) { if (mEventCache == nullptr) { mMaxCacheSize = computeMaxCacheSizeLocked(); mEventCache = new sensors_event_t[mMaxCacheSize]; mCacheSize = 0; Loading
services/sensorservice/SensorEventConnection.h +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public: bool hasSensorAccess); status_t sendEvents(sensors_event_t const* buffer, size_t count, sensors_event_t* scratch, wp<const SensorEventConnection> const * mapFlushEventsToConnections = NULL); wp<const SensorEventConnection> const * mapFlushEventsToConnections = nullptr); bool hasSensor(int32_t handle) const; bool hasAnySensor() const; bool hasOneShotSensors() const; Loading