From 6069139356ceb4d257f749954a2220b1f4fbf9cb Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 15 Jul 2011 19:08:26 -0700 Subject: Remove more edge flag cruft. Change-Id: I4f9f4f4cc7c771a918aee82a941a3e86ecfe48fe --- services/input/InputReader.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'services/input/InputReader.cpp') diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index b2fbcb15bfba..ea9da3914699 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -120,31 +120,11 @@ static const int32_t keyCodeRotationMap[][4] = { static const size_t keyCodeRotationMapSize = sizeof(keyCodeRotationMap) / sizeof(keyCodeRotationMap[0]); -int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) { +static int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) { return rotateValueUsingRotationMap(keyCode, orientation, keyCodeRotationMap, keyCodeRotationMapSize); } -static const int32_t edgeFlagRotationMap[][4] = { - // edge flags enumerated counter-clockwise with the original (unrotated) edge flag first - // no rotation, 90 degree rotation, 180 degree rotation, 270 degree rotation - { AMOTION_EVENT_EDGE_FLAG_BOTTOM, AMOTION_EVENT_EDGE_FLAG_RIGHT, - AMOTION_EVENT_EDGE_FLAG_TOP, AMOTION_EVENT_EDGE_FLAG_LEFT }, - { AMOTION_EVENT_EDGE_FLAG_RIGHT, AMOTION_EVENT_EDGE_FLAG_TOP, - AMOTION_EVENT_EDGE_FLAG_LEFT, AMOTION_EVENT_EDGE_FLAG_BOTTOM }, - { AMOTION_EVENT_EDGE_FLAG_TOP, AMOTION_EVENT_EDGE_FLAG_LEFT, - AMOTION_EVENT_EDGE_FLAG_BOTTOM, AMOTION_EVENT_EDGE_FLAG_RIGHT }, - { AMOTION_EVENT_EDGE_FLAG_LEFT, AMOTION_EVENT_EDGE_FLAG_BOTTOM, - AMOTION_EVENT_EDGE_FLAG_RIGHT, AMOTION_EVENT_EDGE_FLAG_TOP }, -}; -static const size_t edgeFlagRotationMapSize = - sizeof(edgeFlagRotationMap) / sizeof(edgeFlagRotationMap[0]); - -static int32_t rotateEdgeFlag(int32_t edgeFlag, int32_t orientation) { - return rotateValueUsingRotationMap(edgeFlag, orientation, - edgeFlagRotationMap, edgeFlagRotationMapSize); -} - static inline bool sourcesMatchMask(uint32_t sources, uint32_t sourceMask) { return (sources & sourceMask & ~ AINPUT_SOURCE_CLASS_MASK) != 0; } -- cgit v1.2.3-59-g8ed1b