Merge "Add idc config option for handling key repeats" into klp-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
69e58e446b
@@ -2030,6 +2030,10 @@ void KeyboardInputMapper::configureParameters() {
|
|||||||
if (mParameters.orientationAware) {
|
if (mParameters.orientationAware) {
|
||||||
mParameters.hasAssociatedDisplay = true;
|
mParameters.hasAssociatedDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mParameters.handlesKeyRepeat = false;
|
||||||
|
getDevice()->getConfiguration().tryGetProperty(String8("keyboard.handlesKeyRepeat"),
|
||||||
|
mParameters.handlesKeyRepeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyboardInputMapper::dumpParameters(String8& dump) {
|
void KeyboardInputMapper::dumpParameters(String8& dump) {
|
||||||
@@ -2038,6 +2042,8 @@ void KeyboardInputMapper::dumpParameters(String8& dump) {
|
|||||||
toString(mParameters.hasAssociatedDisplay));
|
toString(mParameters.hasAssociatedDisplay));
|
||||||
dump.appendFormat(INDENT4 "OrientationAware: %s\n",
|
dump.appendFormat(INDENT4 "OrientationAware: %s\n",
|
||||||
toString(mParameters.orientationAware));
|
toString(mParameters.orientationAware));
|
||||||
|
dump.appendFormat(INDENT4 "HandlesKeyRepeat: %s\n",
|
||||||
|
toString(mParameters.handlesKeyRepeat));
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyboardInputMapper::reset(nsecs_t when) {
|
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;
|
policyFlags |= POLICY_FLAG_WAKE_DROPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mParameters.handlesKeyRepeat) {
|
||||||
|
policyFlags |= POLICY_FLAG_DISABLE_KEY_REPEAT;
|
||||||
|
}
|
||||||
|
|
||||||
if (metaStateChanged) {
|
if (metaStateChanged) {
|
||||||
getContext()->updateGlobalMetaState();
|
getContext()->updateGlobalMetaState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1054,6 +1054,7 @@ private:
|
|||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool hasAssociatedDisplay;
|
bool hasAssociatedDisplay;
|
||||||
bool orientationAware;
|
bool orientationAware;
|
||||||
|
bool handlesKeyRepeat;
|
||||||
} mParameters;
|
} mParameters;
|
||||||
|
|
||||||
void configureParameters();
|
void configureParameters();
|
||||||
|
|||||||
Reference in New Issue
Block a user