diff options
author | Michael Wright <michaelwr@google.com> | 2014-03-17 12:58:21 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2014-03-20 01:14:06 +0000 |
commit | dcfcf5d0ae73b79af60da5e72c070c481ffb1189 (patch) | |
tree | 50c3bc21b982bbe6a15381458f51711a1b1e1c0b /services/inputflinger/InputReader.cpp | |
parent | bb9c93bb6e9a4c020d8166fd1ede59352a10ac94 (diff) | |
download | frameworks_native-dcfcf5d0ae73b79af60da5e72c070c481ffb1189.zip frameworks_native-dcfcf5d0ae73b79af60da5e72c070c481ffb1189.tar.gz frameworks_native-dcfcf5d0ae73b79af60da5e72c070c481ffb1189.tar.bz2 |
Add idc config option for handling key repeats
Bug: 13285870
Change-Id: I3c1cd5fb0a02dfb3432c1f04d0eef2d4970857ea
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r-- | services/inputflinger/InputReader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index 05b1a9c..e99f762 100644 --- a/services/inputflinger/InputReader.cpp +++ b/services/inputflinger/InputReader.cpp @@ -2041,6 +2041,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) { @@ -2049,6 +2053,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) { @@ -2166,6 +2172,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(); } |