From fe761ab6c72bdcdb8a2cf0df1524f526d8609fee Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Thu, 12 Dec 2013 23:13:18 -0800 Subject: [PATCH] Track Looper decoupling from ALooper Change-Id: I612f0de7002e24948a4cbbea7b416b4fbb3929aa --- include/android/looper.h | 2 +- services/surfaceflinger/MessageQueue.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/android/looper.h b/include/android/looper.h index 24e3967b9..74c0383be 100644 --- a/include/android/looper.h +++ b/include/android/looper.h @@ -253,4 +253,4 @@ int ALooper_removeFd(ALooper* looper, int fd); }; #endif -#endif // ANDROID_NATIVE_WINDOW_H +#endif // ANDROID_LOOPER_H diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp index c9c7b964f..cc672b67d 100644 --- a/services/surfaceflinger/MessageQueue.cpp +++ b/services/surfaceflinger/MessageQueue.cpp @@ -105,7 +105,7 @@ void MessageQueue::setEventThread(const sp& eventThread) mEventThread = eventThread; mEvents = eventThread->createEventConnection(); mEventTube = mEvents->getDataChannel(); - mLooper->addFd(mEventTube->getFd(), 0, ALOOPER_EVENT_INPUT, + mLooper->addFd(mEventTube->getFd(), 0, Looper::EVENT_INPUT, MessageQueue::cb_eventReceiver, this); } @@ -114,12 +114,12 @@ void MessageQueue::waitMessage() { IPCThreadState::self()->flushCommands(); int32_t ret = mLooper->pollOnce(-1); switch (ret) { - case ALOOPER_POLL_WAKE: - case ALOOPER_POLL_CALLBACK: + case Looper::POLL_WAKE: + case Looper::POLL_CALLBACK: continue; - case ALOOPER_POLL_ERROR: - ALOGE("ALOOPER_POLL_ERROR"); - case ALOOPER_POLL_TIMEOUT: + case Looper::POLL_ERROR: + ALOGE("Looper::POLL_ERROR"); + case Looper::POLL_TIMEOUT: // timeout (should not happen) continue; default: