diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-10-18 00:06:47 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-18 00:06:48 -0700 |
| commit | 586503d51fbcc622af62b43b25579ce2f299d68b (patch) | |
| tree | dc68e1a9233db3cfbcbbee31fc01dc94cc3fc15a /services/java/com/android/server/display/LogicalDisplay.java | |
| parent | bd4f2181077ab35a26bcca115c1337e78814bb9d (diff) | |
| parent | 27f1d674bf9fb53af7facdcb746912e036d5bf75 (diff) | |
| download | frameworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.zip frameworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.tar.gz frameworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.tar.bz2 | |
Merge "Add special mirroring modes for demonstration purposes." into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server/display/LogicalDisplay.java')
| -rw-r--r-- | services/java/com/android/server/display/LogicalDisplay.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/display/LogicalDisplay.java b/services/java/com/android/server/display/LogicalDisplay.java index 680662e..aa7ea82 100644 --- a/services/java/com/android/server/display/LogicalDisplay.java +++ b/services/java/com/android/server/display/LogicalDisplay.java @@ -241,10 +241,13 @@ final class LogicalDisplay { // is rotated when the contents of the logical display are rendered. int orientation = Surface.ROTATION_0; if (device == mPrimaryDisplayDevice - && (displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_SUPPORTS_ROTATION) != 0) { + && (displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT) != 0) { orientation = displayInfo.rotation; } + // Apply the physical rotation of the display device itself. + orientation = (orientation + displayDeviceInfo.rotation) % 4; + // Set the frame. // The frame specifies the rotated physical coordinates into which the viewport // is mapped. We need to take care to preserve the aspect ratio of the viewport. |
