am 1ecd0a9b: Merge "modify the device to enable to get the state as slide-open/slide-close."
* commit '1ecd0a9b28f8d608cac1a1db6c9bd493ace0ca3e': modify the device to enable to get the state as slide-open/slide-close.
This commit is contained in:
commit
3b6b23e1ca
@ -547,9 +547,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -737,9 +737,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user