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
tests
Android.mk as a debug option SrufaceFlinger can now connect to DDMS 2011-08-15 20:44:40 -07:00
Barrier.h move native services under services/ 2010-07-14 17:59:35 -07:00
clz.cpp move native services under services/ 2010-07-14 17:59:35 -07:00
clz.h
DdmConnection.cpp as a debug option SrufaceFlinger can now connect to DDMS 2011-08-15 20:44:40 -07:00
DdmConnection.h
GLExtensions.cpp add support for [1974164] Be able to take a screen shot on the device 2010-09-24 14:56:39 -07:00
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
LayerBase.h
LayerDim.cpp unify SurfaceTexture and Surface 2011-06-13 15:51:35 -07:00
LayerDim.h unify SurfaceTexture and Surface 2011-06-13 15:51:35 -07:00
MessageQueue.cpp
MessageQueue.h
MODULE_LICENSE_APACHE2 move native services under services/ 2010-07-14 17:59:35 -07:00
SurfaceFlinger.cpp
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
Transform.cpp
Transform.h