summaryrefslogtreecommitdiffstats
path: root/services/input/InputReader.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-07-25 12:58:12 -0700
committerJeff Brown <jeffbrown@google.com>2011-07-25 20:10:12 -0700
commitbc68a59c024bdb745dac8e2ec7408a9f30595f1a (patch)
tree9b3cfa4dc30eb787cbd828e97f7d816d5a91e68d /services/input/InputReader.h
parent49754db5a304d995c1cc108ff6f19e4ba4265572 (diff)
downloadframeworks_base-bc68a59c024bdb745dac8e2ec7408a9f30595f1a.zip
frameworks_base-bc68a59c024bdb745dac8e2ec7408a9f30595f1a.tar.gz
frameworks_base-bc68a59c024bdb745dac8e2ec7408a9f30595f1a.tar.bz2
Report the external display size to the input reader.
The input reader needs this information so that it knows how to interpolate touches on an external touch screen. Changed Display so that it asks the WindowManager what the real display size is (as opposed to the raw display size). This means it now takes into the forced display size set by adb shell am display-size. Replaced all calls to getRealWidth() / getRealHeight() / getRealMetrics() in the WindowManager and replaced them with direct usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM doesn't end up making a reentrant Binder call into itself. Fixed the table status bar HeightReceiver so that it updates the height on all configuration changes since it is possible that the display size changed independently of an external HDMI display being plugged / unplugged. Improved the Display class documentation to make the distinctions betweeen the various sizes clearer. Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
Diffstat (limited to 'services/input/InputReader.h')
-rw-r--r--services/input/InputReader.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/input/InputReader.h b/services/input/InputReader.h
index f9750d0..ee6990b 100644
--- a/services/input/InputReader.h
+++ b/services/input/InputReader.h
@@ -180,9 +180,11 @@ public:
};
/* Gets information about the display with the specified id.
+ * If external is true, returns the size of the external mirrored
+ * counterpart of the specified display.
* Returns true if the display info is available, false otherwise.
*/
- virtual bool getDisplayInfo(int32_t displayId,
+ virtual bool getDisplayInfo(int32_t displayId, bool external,
int32_t* width, int32_t* height, int32_t* orientation) = 0;
/* Gets the input reader configuration. */
@@ -944,6 +946,7 @@ protected:
DeviceType deviceType;
int32_t associatedDisplayId;
+ bool associatedDisplayIsExternal;
bool orientationAware;
enum GestureMode {