summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authornao <nao.tanaka.cy@kyocera.jp>2011-03-30 15:39:12 +0900
committernadlabak <pavel@doshaska.net>2011-05-09 13:00:37 +0200
commitf631d5f85790b16ea5158879fa0f78554db10b67 (patch)
treeaf93a3f8c40c77d6b19958329ddaef5262a07915 /libs
parent2a9cbc29166b173454f81a814517958f65a6cff9 (diff)
downloadframeworks_base-f631d5f85790b16ea5158879fa0f78554db10b67.zip
frameworks_base-f631d5f85790b16ea5158879fa0f78554db10b67.tar.gz
frameworks_base-f631d5f85790b16ea5158879fa0f78554db10b67.tar.bz2
modify the device to enable to get the state as slide-open/slide-close.
This modify is for the devices which have a slidable H/W keyboard with backlight. For example of current issues: - Backlight of H/W keyboard doesn't turn on when the device starts up with slide-open. - Home screen doesn't display with proper orientation when the device starts up with slide-open. Change-Id: I6a6a18d0b09d0ba484ca992c9fb34f24de9bf21b
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/InputReader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index 92249ba..df647e3 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -552,9 +552,9 @@ int32_t InputReader::getState(int32_t deviceId, uint32_t sourceMask, int32_t cod
for (size_t i = 0; i < numDevices; i++) {
InputDevice* device = mDevices.valueAt(i);
if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) {
- result = (device->*getStateFunc)(sourceMask, code);
- if (result >= AKEY_STATE_DOWN) {
- return result;
+ int32_t state = (device->*getStateFunc)(sourceMask, code);
+ if (state > result) {
+ result = state;
}
}
}
@@ -742,9 +742,9 @@ int32_t InputDevice::getState(uint32_t sourceMask, int32_t code, GetStateFunc ge
for (size_t i = 0; i < numMappers; i++) {
InputMapper* mapper = mMappers[i];
if (sourcesMatchMask(mapper->getSources(), sourceMask)) {
- result = (mapper->*getStateFunc)(sourceMask, code);
- if (result >= AKEY_STATE_DOWN) {
- return result;
+ int32_t state = (mapper->*getStateFunc)(sourceMask, code);
+ if (state > result) {
+ result = state;
}
}
}