Backport ICS rotation animations to gingerbread

Require ICS transitions patch: http://review.cyanogenmod.com/11938

This is a combination of 3 AOSP commits, adapted for gingerbread,
i've hidden new public constants to keep current API intact.

these 3 commits are from Dianne Hackborn <hackbod@google.com> :

- Change rotation freeze to all be implemented in window manager.

Lots of work for no visible change in behavior, but now we can
do some fancier stuff...

Also allow rotation in all 4 directions.

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	services/java/com/android/server/WindowManagerService.java

AOSP-Change-Id: I7e5e9537c5e359f69b83c10f65cc1ce95f371461

- Implement rotation animations.

This introduces a small new feature for ScaleAnimation allowing
the scaling factor to be expressed as a percentage of the object
(which is the same as the existing float interpretation), a
percentage of the container, or a fixed dimension.  Maybe not
useful for anything else, but I needed it for this.

Also fix a bug in how transformation matrices were propagated
from the Animation to Surface Flinger, so that rotate and skew
animations will actually work. :p

AOSP-Change-Id: I301f4caa2147aa35564b5e511cb9c0b368d2425d

- Don't leak.

AOSP-Change-Id: I756d54feeef4ff73f17c80d4b4405de56a5787a6

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: I301f4caa2147aa35564b5e511cb9c0b368d2425d
Improve scrolling cache (ported from ICS)

Scrolling cache helps make short scrolls/flings smooth but will
cause stutter when long flings are made. This patch automatically
disables scrolling cache when long flings are made.

ported from ICS commit, http://review.cyanogenmod.com/#change,12537

Change-Id: I120a5ac50b36dfcdab16ef77aed5ac40930a2dc5
ICS Transitions

Something for the kangers to tide themselves over 'til CM9. Inspired
by Capez's thread: http://forum.xda-developers.com/showthread.php?t=1342117

Change-Id: I58e709b3beb0ce07d445ee993106cc5d1349ab7a
telephony: merge ics call waiting tweaks

These tweaks are already in ics and other android repo's, eg. android-x86.

Change-Id: I754ea6034a589d54d26818240361d90975955bc0
Signed-off-by: Spencer Oliver <spenoliver@gmail.com>
camera: Add more CAF constants

More possible camera effect symbols used by libcamera blobs

Change-Id: I308f9b8b373daee841931533a2c64be9260ce0aa
Let maintainers disable the new rotation animation

On some old phones (zeppelin, morrison, motus, hero?) the new ICS rotation
animation doesn't perform well. This patch adds a boolean property,
"persist.sys.rotationanimation", to give device maintainers and advanced
users the ability to enable/disable it.

Change-Id: I6b88eb8ec410f83c6566c07108daae442b59f79c
Don't animate rotations when screen is off

Avoid error loops like these:

W/WindowManager( 1744): Animation repeat aborted after too many iterations
W/WindowManager( 1744): Layout repeat skipped after too many iterations
W/WindowManager( 1744): Layout repeat skipped after too many iterations
W/WindowManager( 1744): Layout repeat skipped after too many iterations
W/WindowManager( 1744): Animation repeat aborted after too many iterations
W/WindowManager( 1744): Layout repeat skipped after too many iterations

which happened mostly when the screen was turned off while a landscape
app was active.

Change-Id: Idce8fc0049758e50aaf9bc3f93aff45758ed30c1
Unfreeze display even if screen is off

Change Idce8fc0049758e50aaf9bc3f93aff45758ed30c1 made it possible
for an animation to start and never complete, thus keeping the
display frozen.
So... disregard screen state when calling unfreeze. If mScreenRotationAnimation
isn't null, let it go all the way.

Change-Id: Ibf4b31508855398e8d20626bf169656e2a3d2aa9
AbsListView: add option to disable scrolling cache (1/2)

scrolling cache (discard?) can cause performance lag due to GC
allow user to enable/disable/force scrolling cache on the fly
inspired by AndroidON, http://forum.xda-developers.com/showthread.php?t=1411317

Change-Id: I89605b42182edeafbc4c07e2b7650a914f4f7c9a