summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@android.com>2011-01-22 21:32:58 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-22 21:32:58 -0800
commitc3563eb9e75e0b9ae130ec22d5c6c6b1561d783b (patch)
tree45786dc28bd44e6c5db778c0ad64e5ad04f16f00 /libs
parent6d92cde287b6399d5c90f3eaccb73602d6d51313 (diff)
parent265cf2e76bef9ee369a7d43d567a22a0c39355ef (diff)
downloadframeworks_base-c3563eb9e75e0b9ae130ec22d5c6c6b1561d783b.zip
frameworks_base-c3563eb9e75e0b9ae130ec22d5c6c6b1561d783b.tar.gz
frameworks_base-c3563eb9e75e0b9ae130ec22d5c6c6b1561d783b.tar.bz2
am 265cf2e7: Merge "Fix getSwitchState."
* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef': Fix getSwitchState.
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/InputReader.cpp2
-rw-r--r--libs/ui/tests/InputReader_test.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index 83b382b..34e44e4 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -824,7 +824,7 @@ SwitchInputMapper::~SwitchInputMapper() {
}
uint32_t SwitchInputMapper::getSources() {
- return 0;
+ return AINPUT_SOURCE_SWITCH;
}
void SwitchInputMapper::process(const RawEvent* rawEvent) {
diff --git a/libs/ui/tests/InputReader_test.cpp b/libs/ui/tests/InputReader_test.cpp
index f31a6be..09d1680 100644
--- a/libs/ui/tests/InputReader_test.cpp
+++ b/libs/ui/tests/InputReader_test.cpp
@@ -1368,7 +1368,7 @@ TEST_F(SwitchInputMapperTest, GetSources) {
SwitchInputMapper* mapper = new SwitchInputMapper(mDevice);
addMapperAndConfigure(mapper);
- ASSERT_EQ(uint32_t(0), mapper->getSources());
+ ASSERT_EQ(uint32_t(AINPUT_SOURCE_SWITCH), mapper->getSources());
}
TEST_F(SwitchInputMapperTest, GetSwitchState) {