summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger/ISurfaceComposer.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-09-20 15:08:29 -0700
committerJeff Brown <jeffbrown@google.com>2011-09-21 19:26:15 -0700
commit01a98ddbdfbaf1f0d2bc602537e6e314364902a3 (patch)
treece904db3ee0772e0e2a35882a6cf86c7b9fcd84e /include/surfaceflinger/ISurfaceComposer.h
parent04ef5b8dd7262ee90b56df9c992f103695d0a21c (diff)
downloadframeworks_base-01a98ddbdfbaf1f0d2bc602537e6e314364902a3.zip
frameworks_base-01a98ddbdfbaf1f0d2bc602537e6e314364902a3.tar.gz
frameworks_base-01a98ddbdfbaf1f0d2bc602537e6e314364902a3.tar.bz2
Handle orientation changes more systematically.
Bug: 4981385 Simplify the orientation changing code path in the WindowManager. Instead of the policy calling setRotation() when the sensor determined orientation changes, it calls updateRotation(), which figures everything out. For the most part, the rotation actually passed to setRotation() was more or less ignored and just added confusion, particularly when handling deferred orientation changes. Ensure that 180 degree rotations are disallowed even when the application specifies SCREEN_ORIENTATION_SENSOR_*. These rotations are only enabled when docked upside-down for some reason or when the application specifies SCREEN_ORIENTATION_FULL_SENSOR. Ensure that special modes like HDMI connected, lid switch, dock and rotation lock all cause the sensor to be ignored even when the application asks for sensor-based orientation changes. The sensor is not relevant in these modes because some external factor (or the user) is determining the preferred rotation. Currently, applications can still override the preferred rotation even when there are special modes in play that might say otherwise. We could tweak this so that some special modes trump application choices completely (resulting in a letter-boxed application, perhaps). I tested this sort of tweak (not included in the patch) and it seems to work fine, including transitions between applications with varying orientation. Delete dead code related to animFlags. Handle pausing/resuming orientation changes more precisely. Ensure that a deferred orientation change is performed when a drag completes, even if endDragLw() is not called because the drag was aborted before the drop happened. We pause the orientation change in register() and resume in unregister() because those methods appear to always be called as needed. Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
Diffstat (limited to 'include/surfaceflinger/ISurfaceComposer.h')
-rw-r--r--include/surfaceflinger/ISurfaceComposer.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h
index 6b31ca4..e0f4cf9 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/surfaceflinger/ISurfaceComposer.h
@@ -88,11 +88,6 @@ public:
eElectronBeamAnimationOff = 0x10
};
- // flags for setOrientation
- enum {
- eOrientationAnimationDisable = 0x00000001
- };
-
/* create connection with surface flinger, requires
* ACCESS_SURFACE_FLINGER permission
*/
@@ -112,7 +107,8 @@ public:
virtual status_t freezeDisplay(DisplayID dpy, uint32_t flags) = 0;
virtual status_t unfreezeDisplay(DisplayID dpy, uint32_t flags) = 0;
- /* Set display orientation. requires ACCESS_SURFACE_FLINGER permission */
+ /* Set display orientation. requires ACCESS_SURFACE_FLINGER permission
+ * No flags are currently defined. Set flags to 0. */
virtual int setOrientation(DisplayID dpy, int orientation, uint32_t flags) = 0;
/* signal that we're done booting.