summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputReader.h
diff options
context:
space:
mode:
authornadlabak <pavel@doshaska.net>2014-12-21 00:10:54 +0200
committerSteve Kondik <steve@cyngn.com>2015-10-17 13:58:48 -0700
commit437e2364270105dfe109ab61dbd985fa444e1996 (patch)
tree44e5fc828ab4686d178fb069a9ee5856061b4d84 /services/inputflinger/InputReader.h
parentb87c4564313c180a10f96120ec53d481f354b010 (diff)
downloadframeworks_native-437e2364270105dfe109ab61dbd985fa444e1996.zip
frameworks_native-437e2364270105dfe109ab61dbd985fa444e1996.tar.gz
frameworks_native-437e2364270105dfe109ab61dbd985fa444e1996.tar.bz2
Forward port 'Swap volume buttons' (2/3)
[mikeioannina]: Adjust for 5.0 changes Change-Id: I5ed4ae2b7e69e2ada067ed1d3524b3d3fad30e2e
Diffstat (limited to 'services/inputflinger/InputReader.h')
-rw-r--r--services/inputflinger/InputReader.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h
index 3b783c1..22a5dc8 100644
--- a/services/inputflinger/InputReader.h
+++ b/services/inputflinger/InputReader.h
@@ -144,6 +144,9 @@ struct InputReaderConfiguration {
// The presence of an external stylus has changed.
CHANGE_EXTERNAL_STYLUS_PRESENCE = 1 << 7,
+ // Volume keys rotation option changed.
+ CHANGE_VOLUME_KEYS_ROTATION = 1 << 7,
+
// All devices must be reopened.
CHANGE_MUST_REOPEN = 1 << 31,
};
@@ -230,7 +233,11 @@ struct InputReaderConfiguration {
// True to show the location of touches on the touch screen as spots.
bool showTouches;
-
+
+ // Remap volume keys according to display rotation
+ // 0 - disabled, 1 - phone or hybrid rotation mode, 2 - tablet rotation mode
+ int volumeKeysRotationMode;
+
// Ignore finger touches this long after the stylus has been used (including hover)
nsecs_t stylusPalmRejectionTime;
@@ -251,7 +258,8 @@ struct InputReaderConfiguration {
pointerGestureMovementSpeedRatio(0.8f),
pointerGestureZoomSpeedRatio(0.3f),
stylusPalmRejectionTime(50 * 10000000LL), // 50 ms
- showTouches(false) { }
+ showTouches(false),
+ volumeKeysRotationMode(0) { }
bool getDisplayInfo(bool external, DisplayViewport* outViewport) const;
void setDisplayInfo(bool external, const DisplayViewport& viewport);
@@ -1130,7 +1138,8 @@ private:
uint32_t mSource;
int32_t mKeyboardType;
- int32_t mOrientation; // orientation for dpad keys
+ int32_t mRotationMapOffset; // determines if and how volume keys rotate
+ int32_t mOrientation; // orientation for dpad and volume keys
Vector<KeyDown> mKeyDowns; // keys that are down
int32_t mMetaState;