From b4ff35df5c04aec71fce7e90a6d6f9ef7180c2ad Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Sun, 2 Jan 2011 16:37:43 -0800 Subject: Mouse pointer integration. Added support for loading the pointer icon from a resource. Moved the system server related bits of the input manager out of libui and into libinput since they do not need to be linked into applications. Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67 --- libs/ui/InputManager.cpp | 83 ------------------------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 libs/ui/InputManager.cpp (limited to 'libs/ui/InputManager.cpp') diff --git a/libs/ui/InputManager.cpp b/libs/ui/InputManager.cpp deleted file mode 100644 index 09fce38d9c18..000000000000 --- a/libs/ui/InputManager.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright 2010 The Android Open Source Project -// -// The input manager. -// -#define LOG_TAG "InputManager" - -//#define LOG_NDEBUG 0 - -#include -#include -#include -#include - -namespace android { - -InputManager::InputManager( - const sp& eventHub, - const sp& readerPolicy, - const sp& dispatcherPolicy) { - mDispatcher = new InputDispatcher(dispatcherPolicy); - mReader = new InputReader(eventHub, readerPolicy, mDispatcher); - initialize(); -} - -InputManager::InputManager( - const sp& reader, - const sp& dispatcher) : - mReader(reader), - mDispatcher(dispatcher) { - initialize(); -} - -InputManager::~InputManager() { - stop(); -} - -void InputManager::initialize() { - mReaderThread = new InputReaderThread(mReader); - mDispatcherThread = new InputDispatcherThread(mDispatcher); -} - -status_t InputManager::start() { - status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY); - if (result) { - LOGE("Could not start InputDispatcher thread due to error %d.", result); - return result; - } - - result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY); - if (result) { - LOGE("Could not start InputReader thread due to error %d.", result); - - mDispatcherThread->requestExit(); - return result; - } - - return OK; -} - -status_t InputManager::stop() { - status_t result = mReaderThread->requestExitAndWait(); - if (result) { - LOGW("Could not stop InputReader thread due to error %d.", result); - } - - result = mDispatcherThread->requestExitAndWait(); - if (result) { - LOGW("Could not stop InputDispatcher thread due to error %d.", result); - } - - return OK; -} - -sp InputManager::getReader() { - return mReader; -} - -sp InputManager::getDispatcher() { - return mDispatcher; -} - -} // namespace android -- cgit v1.2.3-59-g8ed1b