summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2014-03-20 16:23:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-20 16:23:50 +0000
commit11e0ead8118d97d0e76a98065a4811fdb01b2db2 (patch)
treefeb083741700046ca0e51fb4c492c2bd58f1b824 /libs
parent4eefde23de23a5e9145a634e843964f6f6eaa6bd (diff)
parent69e58e446bc2a030ae423d650e60dbfe317331e6 (diff)
downloadframeworks_base-11e0ead8118d97d0e76a98065a4811fdb01b2db2.zip
frameworks_base-11e0ead8118d97d0e76a98065a4811fdb01b2db2.tar.gz
frameworks_base-11e0ead8118d97d0e76a98065a4811fdb01b2db2.tar.bz2
am 69e58e44: Merge "Add idc config option for handling key repeats" into klp-modular-dev
* commit '69e58e446bc2a030ae423d650e60dbfe317331e6': Add idc config option for handling key repeats
Diffstat (limited to 'libs')
-rw-r--r--libs/input/InputReader.cpp10
-rw-r--r--libs/input/InputReader.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/libs/input/InputReader.cpp b/libs/input/InputReader.cpp
index 3c037fb..48c5223 100644
--- a/libs/input/InputReader.cpp
+++ b/libs/input/InputReader.cpp
@@ -2030,6 +2030,10 @@ void KeyboardInputMapper::configureParameters() {
if (mParameters.orientationAware) {
mParameters.hasAssociatedDisplay = true;
}
+
+ mParameters.handlesKeyRepeat = false;
+ getDevice()->getConfiguration().tryGetProperty(String8("keyboard.handlesKeyRepeat"),
+ mParameters.handlesKeyRepeat);
}
void KeyboardInputMapper::dumpParameters(String8& dump) {
@@ -2038,6 +2042,8 @@ void KeyboardInputMapper::dumpParameters(String8& dump) {
toString(mParameters.hasAssociatedDisplay));
dump.appendFormat(INDENT4 "OrientationAware: %s\n",
toString(mParameters.orientationAware));
+ dump.appendFormat(INDENT4 "HandlesKeyRepeat: %s\n",
+ toString(mParameters.handlesKeyRepeat));
}
void KeyboardInputMapper::reset(nsecs_t when) {
@@ -2155,6 +2161,10 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
policyFlags |= POLICY_FLAG_WAKE_DROPPED;
}
+ if (mParameters.handlesKeyRepeat) {
+ policyFlags |= POLICY_FLAG_DISABLE_KEY_REPEAT;
+ }
+
if (metaStateChanged) {
getContext()->updateGlobalMetaState();
}
diff --git a/libs/input/InputReader.h b/libs/input/InputReader.h
index 6b5ce34..c90d483 100644
--- a/libs/input/InputReader.h
+++ b/libs/input/InputReader.h
@@ -1054,6 +1054,7 @@ private:
struct Parameters {
bool hasAssociatedDisplay;
bool orientationAware;
+ bool handlesKeyRepeat;
} mParameters;
void configureParameters();