replicant-frameworks_native/services/surfaceflinger
Jeff Brown 21230c6410 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
2011-09-21 19:26:15 -07:00
..
DisplayHardware fix transition from full overlays to fb 2011-09-20 17:53:33 -07:00
tests SF transactions are now O(1) wrt IPC instead of O(N). 2011-06-29 15:05:41 -07:00
Android.mk as a debug option SrufaceFlinger can now connect to DDMS 2011-08-15 20:44:40 -07:00
Barrier.h
clz.cpp
clz.h implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation" 2011-07-19 15:24:46 -07:00
DdmConnection.cpp as a debug option SrufaceFlinger can now connect to DDMS 2011-08-15 20:44:40 -07:00
DdmConnection.h as a debug option SrufaceFlinger can now connect to DDMS 2011-08-15 20:44:40 -07:00
GLExtensions.cpp
GLExtensions.h
Layer.cpp SurfaceFlinger: fix isOpaque check in lockPageFlip 2011-09-14 18:23:37 -07:00
Layer.h improve hwc dumpsys 2011-09-20 17:53:33 -07:00
LayerBase.cpp Fix another problem with refreshing the screen when switching to/from overlay 2011-09-09 01:47:48 -07:00
LayerBase.h improve hwc dumpsys 2011-09-20 17:53:33 -07:00
LayerDim.cpp
LayerDim.h
MessageQueue.cpp
MessageQueue.h
MODULE_LICENSE_APACHE2
SurfaceFlinger.cpp Handle orientation changes more systematically. 2011-09-21 19:26:15 -07:00
SurfaceFlinger.h Handle orientation changes more systematically. 2011-09-21 19:26:15 -07:00
SurfaceTextureLayer.cpp Add a debug option to turn the "transformation hint" off 2011-08-23 21:10:35 -07:00
SurfaceTextureLayer.h return correct value from query after connecting a surface 2011-08-08 20:25:44 -07:00
Transform.cpp fix Surface positions are not floats 2011-08-30 18:51:54 -07:00
Transform.h fix Surface positions are not floats 2011-08-30 18:51:54 -07:00