summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-02-27 02:02:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-27 02:02:22 +0000
commitba61962b3308881e6200870c8d6420b81c6f9225 (patch)
treef998dec729f2d714c2d6d0b9ffce500c29844b5c /libs
parentf85da42512d5dd76a899097907974b48b887be60 (diff)
parent71e21fec61d17b41a3f0ed817bfa2ae5fb357212 (diff)
downloadframeworks_base-ba61962b3308881e6200870c8d6420b81c6f9225.zip
frameworks_base-ba61962b3308881e6200870c8d6420b81c6f9225.tar.gz
frameworks_base-ba61962b3308881e6200870c8d6420b81c6f9225.tar.bz2
am 71e21fec: am 6ca90042: Add touch.wake IDC property to control wakeup.
* commit '71e21fec61d17b41a3f0ed817bfa2ae5fb357212': Add touch.wake IDC property to control wakeup.
Diffstat (limited to 'libs')
-rw-r--r--libs/input/InputReader.cpp13
-rw-r--r--libs/input/InputReader.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/libs/input/InputReader.cpp b/libs/input/InputReader.cpp
index 03852a5..b1b7c7d 100644
--- a/libs/input/InputReader.cpp
+++ b/libs/input/InputReader.cpp
@@ -2831,6 +2831,13 @@ void TouchInputMapper::configureParameters() {
mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
&& 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) {
@@ -3733,11 +3740,7 @@ void TouchInputMapper::sync(nsecs_t when) {
getContext()->fadePointer();
}
- // Initial downs on external touch devices should wake the device.
- // 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()) {
+ if (mParameters.wake) {
policyFlags |= POLICY_FLAG_WAKE_DROPPED;
}
}
diff --git a/libs/input/InputReader.h b/libs/input/InputReader.h
index a8bb636..eb5746b 100644
--- a/libs/input/InputReader.h
+++ b/libs/input/InputReader.h
@@ -1214,6 +1214,8 @@ protected:
GESTURE_MODE_SPOTS,
};
GestureMode gestureMode;
+
+ bool wake;
} mParameters;
// Immutable calibration parameters in parsed form.