From 89e5c7ebb37fabc4368e87e17a502db62598bd61 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 10 Feb 2014 14:10:27 -0800 Subject: Move inputservice over to frameworks/native Remove all of the pieces except the PointerController and SpriteController over to frameworks/native in preparation for inputflinger. Those two need to stay in frameworks/base for now because they depend on Skia currently. In the long run they should be merged into either the InputManager or the WindowManager rather than as a part of the inputservice / inputflinger. Change-Id: Iebef71f3030fb3d26a5f338eb66d75bb37c17734 --- libs/input/InputManager.cpp | 93 --------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 libs/input/InputManager.cpp (limited to 'libs/input/InputManager.cpp') diff --git a/libs/input/InputManager.cpp b/libs/input/InputManager.cpp deleted file mode 100644 index 6a6547bdf03c..000000000000 --- a/libs/input/InputManager.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "InputManager" - -//#define LOG_NDEBUG 0 - -#include "InputManager.h" - -#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) { - ALOGE("Could not start InputDispatcher thread due to error %d.", result); - return result; - } - - result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY); - if (result) { - ALOGE("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) { - ALOGW("Could not stop InputReader thread due to error %d.", result); - } - - result = mDispatcherThread->requestExitAndWait(); - if (result) { - ALOGW("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