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>
Do not show Home behind full screen activity

When ensureActivitiesVisibleLocked goes through foreground activity
stack and reaches non-fullscreen activity, it sets showHomeBehindStack
variable to true.

If there is a fullscreen activity behind, showHomeBehindStack remains
unchanged, which causes Home application to be displayed anyway.
In this case user will see a fullscreen activity and Home activity
simultaneously.

To fix the issue we set showHomeBehindStack to false when we reach
fullscreen activity in the activity stack.

This was made visible by the following commit:
446ef1de8d373c1b017df8d19ebf9a47811fb402

Change-Id: I535c1283a4e26f5cf606375b837d4b7195324af0
Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON

This is a small fix to the showWallpaper method, in which a power
consumption problem has been introduced. This showWallpaper method
toggles the window flag FLAG_SHOW_WALLPAPER, when album art is being
shown in Lockscreen. It is important to set pixel format to
PixelFormat.OPAQUE if flag FLAG_SHOW_WALLPAPER is not being set.

If not, an application that uses window flag FLAG_KEEP_SCREEN_ON
will prevent the keyguard from going to sleep and drain battery.

Change-Id: I1808be28047977ae5ac4dd1168ea25cac8a55a78
remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for gps modules in quick off/on because
they need cost time in off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Solve three memory leaks related to PatchCache

A Patch can be fairly large, holding bitmap data, but
is also frequently leaked which adds to the severity.
The feature is used in many important processes such
as Home, SystemUI and Chrome.

The following leaks are solved:

1. The Patch itself was not always freed.
PatchCache::removeDeferred() can mark patches to be
cared for by PatchCache::clearGarbage(). But
mCache.remove() would only destroy the container
and the pointer, not the Patch object itself.

2. The vertices stored in the Patch at Patch::createMesh()
would always leak. The empty/default destructor in Patch
would not properly destroy "vertices" since it's just a
pointer.

3. A BufferBlock that's added to the mFreeBlocks
in PatchCache could leak. The leak happened when a
patch later needed the entire free block, because the
object was removed from the list but never deleted
in PatchCache::setupMesh().

Change-Id: I41e60824479230b67426fc546d3dbff294c8891f
Merge "Hang off call by power button while screen is on" into cm-11.0
Merge "Do not show Home behind full screen activity" into cm-11.0
Merge "Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON" into cm-11.0
Merge "remove unnecessary switchUser call" into cm-11.0
Merge "Solve three memory leaks related to PatchCache" into cm-11.0
Add en_RU language
Fix Wifi
[1/3] Base: Flip to Mute/Reject Call

Saving flip action value to settings container

Telephony: https://gerrit.omnirom.org/#/c/4670/
InCallUI: https://gerrit.omnirom.org/#/c/4669/

Change-Id: Ie72dda49d78b23b9bc7d8a886f6916f678c918d1

Conflicts:
	core/java/android/provider/Settings.java
[1/3] Base: Incoming Call in Background

Patch ported from 4.2 which was done by our lovely HCP. A
very popular one so we bring it back and adapt it to 4.4

Allows user to set that Incoming Call UI will remain in background
if screen is on. Instead, a notification is added to StatusBar, which
can be used to bring up the Incoming Call UI. Ringtone and vibration
still occur as per system settings.

This has the same effect as apps marked as "immersive". It prevents
the incoming call from backgrounding the current activity.

Change-Id: I1eb0ae6b10ba02c3f1df95265d26a6c61db74aab

Conflicts:
	core/java/android/provider/Settings.java
[1/2] Frameworks: Statusbar clock and date customizations

This commit add support for:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- color
- Date format
- Date style

Change-Id: I73d854ed5cfb57fa19e4b5554bb10cb2e1ce9b65
Framework:  Fix Statusbar Center Clock
[1/2] SystemUI: Network speed indicator

Change-Id: I88e7cdfe20342c695a33383db36bf80bb4ffe009

Conflicts:
	core/java/android/provider/Settings.java

[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

[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/custom_dimens.xml
	packages/SystemUI/res/values/custom_styles.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java
Base: Disable Call Log 500 limit
Base: Follow on seekbars new UI guideline for 4.4

google forgot some things.....seekbar is one example

Change-Id: I996062a978322c93694e360dff1e4f42dc589062

fb: correct seeker fb style for 4.4

based on this commit https://github.com/SlimRoms/frameworks_base/commit/a845169c128c19825a69a0ebdf2e4d366fdd67ad

the idea was good but bad done. A middle in the night action lol.
Problem is that holo light themed app cannot handle the white seekbar of course
So add the complete seekbar into the Holo.Light switch to support both cases

Holo: white seekbar
Holo.Light: drak gray seekbar

Change-Id: I82252d0cb30cd4af47d624a37ccc904cb7e9c1e6

fb: global menu follow new 4.4 UI

the sound indicator is still ICS blue...change it to white
In general we should consider to change all tab_selected
files into a Holo.Light switch due it is already defined in styles.xml

but thats work for our themer :p

Change-Id: I02b5331e223319517c5536522cd6bc419745ce3f

fb: update missing google UI changes for 4.4

thanks to kroz other things are now as well consistent to the new
google UI style

Change-Id: I604d29293b04bbcf279efd4d5bf2970ff8ee0c75

fb: changed all open forgoten UI from google into new UI

thanks kroz

Change-Id: Ibc32ad8e73617dd74c8cd313dc2e071962eec966

fb: change alert dialog to new 4.4 UI guidelines and add

Holo / Holo.Light switch to reflect it proper on the
different app styles

Change-Id: I0fb7cd06d19a8eef66551e9f0281d60f33b2efe6
Core: Title divider 4.4 UI guidelines