Avoid unnecessary FindClass("java/lang/String").

Use previously retrieved global reference instead.
Check for NULL after creating the global reference.

Change-Id: I21670d2ef0f63ddb5801dd21e7e56359e5519479
Properly rotate full [-pi, +pi] orientation range if available

The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.

This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.

Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
framework:base: iterator error in singletone provider

In case of singletone provider, we don't count it in the guset user.
After we remove it from the array, and resize the array, need to move
iterator back.

Change-Id: I99920a6beccc9de0e67ffeb632b1940efaee10b9