Loading libutils/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ cc_defaults { "-Wall", "-Werror", "-Wno-exit-time-destructors", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], header_libs: [ "libbase_headers", Loading libutils/Looper.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -107,15 +107,14 @@ sp<Looper> Looper::getForThread() { int result = pthread_once(& gTLSOnce, initTLSKey); LOG_ALWAYS_FATAL_IF(result != 0, "pthread_once failed"); Looper* looper = (Looper*)pthread_getspecific(gTLSKey); return sp<Looper>::fromExisting(looper); return (Looper*)pthread_getspecific(gTLSKey); } sp<Looper> Looper::prepare(int opts) { bool allowNonCallbacks = opts & PREPARE_ALLOW_NON_CALLBACKS; sp<Looper> looper = Looper::getForThread(); if (looper == nullptr) { looper = sp<Looper>::make(allowNonCallbacks); looper = new Looper(allowNonCallbacks); Looper::setForThread(looper); } if (looper->getAllowNonCallbacks() != allowNonCallbacks) { Loading Loading @@ -425,11 +424,7 @@ void Looper::pushResponse(int events, const Request& request) { } int Looper::addFd(int fd, int ident, int events, Looper_callbackFunc callback, void* data) { sp<SimpleLooperCallback> looperCallback; if (callback) { looperCallback = sp<SimpleLooperCallback>::make(callback); } return addFd(fd, ident, events, looperCallback, data); return addFd(fd, ident, events, callback ? new SimpleLooperCallback(callback) : nullptr, data); } int Looper::addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data) { Loading libutils/NativeHandle.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ namespace android { sp<NativeHandle> NativeHandle::create(native_handle_t* handle, bool ownsHandle) { return handle ? sp<NativeHandle>::make(handle, ownsHandle) : nullptr; return handle ? new NativeHandle(handle, ownsHandle) : nullptr; } NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) Loading libutils/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -693,7 +693,7 @@ status_t Thread::run(const char* name, int32_t priority, size_t stack) mThread = thread_id_t(-1); // hold a strong reference on ourself mHoldSelf = sp<Thread>::fromExisting(this); mHoldSelf = this; mRunning = true; Loading libutils/include/utils/NativeHandle.h +0 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ public: private: // for access to the destructor friend class LightRefBase<NativeHandle>; // for access to the constructor friend class sp<NativeHandle>; NativeHandle(native_handle_t* handle, bool ownsHandle); ~NativeHandle(); Loading Loading
libutils/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ cc_defaults { "-Wall", "-Werror", "-Wno-exit-time-destructors", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], header_libs: [ "libbase_headers", Loading
libutils/Looper.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -107,15 +107,14 @@ sp<Looper> Looper::getForThread() { int result = pthread_once(& gTLSOnce, initTLSKey); LOG_ALWAYS_FATAL_IF(result != 0, "pthread_once failed"); Looper* looper = (Looper*)pthread_getspecific(gTLSKey); return sp<Looper>::fromExisting(looper); return (Looper*)pthread_getspecific(gTLSKey); } sp<Looper> Looper::prepare(int opts) { bool allowNonCallbacks = opts & PREPARE_ALLOW_NON_CALLBACKS; sp<Looper> looper = Looper::getForThread(); if (looper == nullptr) { looper = sp<Looper>::make(allowNonCallbacks); looper = new Looper(allowNonCallbacks); Looper::setForThread(looper); } if (looper->getAllowNonCallbacks() != allowNonCallbacks) { Loading Loading @@ -425,11 +424,7 @@ void Looper::pushResponse(int events, const Request& request) { } int Looper::addFd(int fd, int ident, int events, Looper_callbackFunc callback, void* data) { sp<SimpleLooperCallback> looperCallback; if (callback) { looperCallback = sp<SimpleLooperCallback>::make(callback); } return addFd(fd, ident, events, looperCallback, data); return addFd(fd, ident, events, callback ? new SimpleLooperCallback(callback) : nullptr, data); } int Looper::addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data) { Loading
libutils/NativeHandle.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ namespace android { sp<NativeHandle> NativeHandle::create(native_handle_t* handle, bool ownsHandle) { return handle ? sp<NativeHandle>::make(handle, ownsHandle) : nullptr; return handle ? new NativeHandle(handle, ownsHandle) : nullptr; } NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) Loading
libutils/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -693,7 +693,7 @@ status_t Thread::run(const char* name, int32_t priority, size_t stack) mThread = thread_id_t(-1); // hold a strong reference on ourself mHoldSelf = sp<Thread>::fromExisting(this); mHoldSelf = this; mRunning = true; Loading
libutils/include/utils/NativeHandle.h +0 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ public: private: // for access to the destructor friend class LightRefBase<NativeHandle>; // for access to the constructor friend class sp<NativeHandle>; NativeHandle(native_handle_t* handle, bool ownsHandle); ~NativeHandle(); Loading