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