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: I1fdbaad92263c9f983a32900e74eba1f0367902b
Signed-off-by: Arham Jamal <arhamjamal@gmail.com>
Fix the issue that the top of fullscreen dialog is clipped away

The visibility of status bar comes from the top fullscreen window,
not from the focused window.
That has to be taken into account during the calculation of the
decor rect. You can use mTopIsFullscreen for this purpose.

Change-Id: I6159eb2ee389885cf5ab507157f9451841364d2f
Hang off call by power button while screen is on

Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
Immersive: Fix black bar in some games

Some games (FIFA14, Virtual Tennis, Rebuild etc.) show a black bar where the navigation bar used to be even in full immersive mode.
This fixes that.

Change-Id: Id7f8959da0496d95beaa21a567ef0f756b00a82d
increase touch sensitivity

Change-Id: I77e6aeca3667808e630dc142a2e561d3ddddef80
base: Fix screen on stats after a boot

Prior to this change, the following sequence:

  * Turn the display off
  * Issue a reboot via adb
  * Unlock the device (after rebooting) before the screen turns off

results in the screen being on but the battery stats not reflecting
this fact.

In general, the mismatch occurs when either there is no serialized
battery stats state or when it is serialized in a state where the
screen is off.

Change-Id: I17374553fae6a08a1be8fdf445967509474177a9
ActivityInfo: Restore default behavior for screen size changes or layout changes

This was a change introduced with PIE intended to fix an aosp bug,
test to see if we still face one or more of current immersive issue(s).

Edit: revert for now along with the other PIE work.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Reimplement Navigation bar height

This reverts commit 15e8908148bdde3505d830dc17fbd1d705e0face.
Let's make Navbar height play nicely with Pie
[1/2] base: add switch to last app as navigation ring target

Was actually based on https://github.com/omnirom/android_frameworks_base/commit/2a7f6e1f19b06cdfe647e87eee8eb11860b09a2e

PS2
much easier :)

PS3
whitespaces

Change-Id: I31f11fcd0efb90f007017fa16567e6711002ecc8

Conflicts:
	core/res/res/values/pa_symbols.xml
	packages/SystemUI/src/com/android/systemui/rascarlo/ActionTarget.java

Conflicts:
	core/res/res/values/simpleaosp_symbols.xml
	packages/SystemUI/src/com/android/systemui/cm/ActionTarget.java
toogle last app recent key fix
Make the "hidden battery" still appear in QS

While the hidden battery indicator mode implemented in the Settings
application should only hide the indicator in the status bar, it also
happens to hide it inside the QS tile for the battery which in turn
leaves an ugly UI. This commit provides a workaround by specifying
in which cases the indicator is being used for QS and providing a
special case for that.

Change-Id: Iede5dedfc90343d5b9f768aefc4a53b2aa56a1da
Revert "Reduce memory leaks by removing all views."

This reverts commit 275a1f7bc1aa15fe6e60a2b0c77faa790d939979.
Merge branch 'kk' of https://github.com/SimpleAOSP/android_frameworks_base into kk