recycle TypedArray calls in F_B

PS2: plus a few other minor fixups to typedarray handling
PS3: add a few more recycling calls and remove unnecessary try/finally from keybuttonview
PS4: remove all unused typedarray imports

-Vanir \m/

Change-Id: I004ce627a861a2c5e262709cb1110f5aea536719
Scroll: modified velocitytracker

Velocitytracker and overscroll are called on every touch event to
calculate if there is a scrolling/fling. Move this and the recycling
to static voids so they are pre-optimized at compile time rather than
after evoking the method call during runtime (JIT) to increase responsiveness.

-Vanir

Change-Id: Ic7351da58f29281ca2b6a788386b95b68b552390
Merge "recycle TypedArray calls in F_B" into jb43
factor a few classes out of systemUI and into F_B

move vanirconstants, vanirawesome, and vanirreceiver to com.vanir.util
in frameworks base.  This matches closer to AOKP's code.

PS2: git add -A

Change-Id: I3f05ef1f1c62cf62bfcc501e9e27a8eaeb3cdd39
Fix certain setting writes being incorrectly skipped.

If a value that previously had a very long value (over the 500 char
threshold) is now set to null, isRedundantSetValue would incorrectly
return true even though the value was changed.

Change-Id: Ia5304743024ec01024be98aa51ed260d38caf93c
Avoid IndexOutOfBounds Exception in ActivityManagerService

1. finishActivityLocked() doesn't give guaranty to remove only
   one ActivityRecord from the history stack.
2. Unfortunaly if our topRunningActivity is top of the stack,
   then there is potential IndexOutOfBounds Exception in
   ActivityManagerService.
To avoid it, we can just traverse to the top of the history stack.

Change-Id: Idf06356e643789ccfd493d7097278cea44bdf395
Don't ANR when no windows are touchable.

If the user touches a portion of the screen in which all of the windows
have FLAG_NOT_TOUCHABLE set, handle this as a failed event injection,
so that it doesn't result in ANR.

Change-Id: I6437e3dd1641005b8ac80f6cf7d20b14b97fcc7b
Make ActivityManagerService.systemReady thread safe

During boot of the framework, two threads execute code in
ActivityManagerService and ActivityStack, respectively. At one point
in time, the latter thread checks the internal state of the first
thread, but if for some reason that thread has stalled for an
unexpected amount of time, the state has not been updated (yet).

An example of the above is when one of the services started from
SystemServer (eg AppWidgetService) takes unexpectedly long to start.
This causes the framework to boot without broadcasting
BOOT_COMPLETED, which in turn has ramifications for the entire
system.

Change-Id: I14b5f6fcb320be01596a2e04db3f724a43f4fbe1
Detach engines before destroying WallpaperService

WallpaperService contained a race condition where the service might be
destroyed before all its engines had been detached. For subclass
ImageWallpaper this would leak the engine's BroadcastListener, which in
turn would trigger a system crash (as ImageWallpaper runs as part of
the system).

Change-Id: Ia900173a1d3070cbf6bcf769f68376c8c8cbc62a
Fix button layout in landscape

leftMenuKey is placed in proper position in landscape

Change-Id: Ibf36df1e47959a9376b664d2a063c2f28cc549cc
PS2: add missing ) -Prime
Merge "Scroll: modified velocitytracker" into jb43
Merge "factor a few classes out of systemUI and into F_B" into jb43
Merge "Fix button layout in landscape" into jb43
Merge "Fix certain setting writes being incorrectly skipped." into jb43
Merge "Avoid IndexOutOfBounds Exception in ActivityManagerService" into jb43
Merge "Don't ANR when no windows are touchable." into jb43
Merge "Make ActivityManagerService.systemReady thread safe" into jb43
Merge "Detach engines before destroying WallpaperService" into jb43