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>
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
On-The-Spot: Add clear all recents button to user preferences.

PS3: Add proper drawable thanks to / by Dani Rosenkamp @DaNi--
     Fix wrong change id (from abandoned commit)
PS4: More logic drawable

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I632730bee6b409072689e07fb1084ceaca5b1d49

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values-ca/pa_strings.xml
	packages/SystemUI/res/values-es/pa_strings.xml
	packages/SystemUI/res/values/ras_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/simpleaosp_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
Long press recents to switch to last app

-Fixed confirmation helper
Change-Id: I8c52a7b40d4229d523bccc1c9246673b82f5b48b
Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	packages/SystemUI/res/values/simpleaosp_strings.xml
Never load launcher on long press recents

Related: AOSPA-279

Change-Id: I7860d84c4eb36fe0f592dfc4d5b2769040abf182
SystemUI: Fix missing top task in recent panel.

If preloadRecentTasksList was not called or was called too
late and RecentsActivty already started and last top activity has
excludeFromRecents flag setted it might be missing
from recent application list.

Change-Id: Idf7153824805ceea9fcaf04ac645b73a5e93a4d9
[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.
[1/2] SystemUI: Network speed indicator

Change-Id: I88e7cdfe20342c695a33383db36bf80bb4ffe009

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/colors.xml

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/res/values/styles.xml
[1/2] SystemUI: Update network traffic indicator

Android measures the amount of data transferred in bytes,
however, by convention, data rates should be measured in bits
per second.

*Convert the change in total data and time to bits and seconds,
and then divide the amount transferred by the number of
seconds that have elapsed.

*Update the labels and have them use the correct SI prefixes.

*Factor out or add @hide to public methods and constructors

*Remove all Runnables and Messages from Handler queue when
disabled

*Minor formatting changes to stay consistent with Android's
code-style guidelines.
https://source.android.com/source/code-style.html

PS2: Set maximum digits to prevent it from filling the statusbar
PS3: Rebase
PS4: Add ability to display either bits or bytes

Change-Id: I9add610a8d14f5a48f2af0a82ced0c186224e282

Conflicts:

	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
[1/2] Base: Upgrade network traffic meter

*Updated class name to be less ambiguous
*Replaced the multi-check in settings with a proper listview
*Added the ability to view up-stream, down-stream or both
*Added the option to change how often it refreshes
*Added a check before it updates the status bar to prevent it from
refreshing everything needlessly
*Added icons to show data direction
*Remove unused style attributes

Icon artwork is courtesy android design downloads
Some features were inspired by previous work done by 0xD34D

OmniGears: https://gerrit.omnirom.org/#/c/5130/

Change-Id: I9f86292a6adbc5e30967df76fae510be248fc38b

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/res/values/mahdi_dimens.xml
	packages/SystemUI/res/values/styles.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/NetworkSpeedTile.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java
More string edits