Improve scrolling cache

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

This patch also fixes a related bug where scrolling cache will
not be enabled properly when transitioning from flinging to scrolling.

Patch Set 2: Calculate threshold based on maximum velocity (Sang Tae Park)

Credits: Pawit Pornkitprasan

Change-Id: I3ae59fdf98e9727d10a648934d817438d88c7172
Signed-off-by: Arham Jamal <arhamjamal@gmail.com>
frameworks/base: vectorize Bitmap operations

Enable gcc vectorizing optimizations for Bitmap operations within
libandroid_runtime.so.  Adds -ftree-vectorize -mvectorize-with-neon-quad
-fprefetch-loop-arrays to functions and compiles Bitmap.cpp in ARM mode
(necessary to enable vectorizing optimizations) for appropriate targets.

Change-Id: If52a789b6f592b137e64e85077665c9ce5957f79
Fix FindBugs issue

UsbStoreActivity: Null pointer derefence

Change-Id: I9d631c50c30eb98e32cca5a5085513b6904db676
frameworks/base: Fix to avoid crash when the tab is not set from app

As the current tab is not set from application, getChildTabViewAt
returns Null value. Added a condition which checks whether mSelectTab
is set to first Tab.

(cherry picked from commit 9be6755efb149b22c36aa3eb7cc4ffe7e765e08a)

Change-Id: I11c77ca96333e2663d28db1b5fdb46602bd9e745
CRs-Fixed: 321176
Dark UI: AOSPA goes TRDS [1/3]

All credits to SlimRoms!

Change-Id: I9089ee86587fb33706eb5a4dcc8f38427336b25e
Signed-off-by: Scott <scott@ubuntu>

Conflicts:
	core/java/android/provider/Settings.java
	services/java/com/android/server/UiModeManagerService.java