am 6ca90042
: Add touch.wake IDC property to control wakeup.
* commit '6ca90042b398153e063cf69dea784e201e76a9ee': Add touch.wake IDC property to control wakeup.
This commit is contained in:
@ -2831,6 +2831,13 @@ void TouchInputMapper::configureParameters() {
|
|||||||
mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
|
mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
|
||||||
&& getDevice()->isExternal();
|
&& getDevice()->isExternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initial downs on external touch devices should wake the device.
|
||||||
|
// Normally we don't do this for internal touch screens to prevent them from waking
|
||||||
|
// up in your pocket but you can enable it using the input device configuration.
|
||||||
|
mParameters.wake = getDevice()->isExternal();
|
||||||
|
getDevice()->getConfiguration().tryGetProperty(String8("touch.wake"),
|
||||||
|
mParameters.wake);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TouchInputMapper::dumpParameters(String8& dump) {
|
void TouchInputMapper::dumpParameters(String8& dump) {
|
||||||
@ -3733,11 +3740,7 @@ void TouchInputMapper::sync(nsecs_t when) {
|
|||||||
getContext()->fadePointer();
|
getContext()->fadePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial downs on external touch devices should wake the device.
|
if (mParameters.wake) {
|
||||||
// We don't do this for internal touch screens to prevent them from waking
|
|
||||||
// up in your pocket.
|
|
||||||
// TODO: Use the input device configuration to control this behavior more finely.
|
|
||||||
if (getDevice()->isExternal()) {
|
|
||||||
policyFlags |= POLICY_FLAG_WAKE_DROPPED;
|
policyFlags |= POLICY_FLAG_WAKE_DROPPED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1214,6 +1214,8 @@ protected:
|
|||||||
GESTURE_MODE_SPOTS,
|
GESTURE_MODE_SPOTS,
|
||||||
};
|
};
|
||||||
GestureMode gestureMode;
|
GestureMode gestureMode;
|
||||||
|
|
||||||
|
bool wake;
|
||||||
} mParameters;
|
} mParameters;
|
||||||
|
|
||||||
// Immutable calibration parameters in parsed form.
|
// Immutable calibration parameters in parsed form.
|
||||||
|
Reference in New Issue
Block a user