Revert (squash)

Revert "status bar: native battery percentage"

This reverts commit 363f776cb15312b961fa808619028249a0b5913f.

Revert "Try another method for volume wakeup"

This reverts commit 655fba2ca1dc7ed7679b19bb138248697d27f6c4.

Revert "fb: volume rocker control (wake up)"

This reverts commit c33c9f2745b8b2dfcdf86e203abd229260f4a0dc.

Revert "volume key adjust sound"

This reverts commit 8a6dfe480b02e3cda7be265a19e10bfd1e766bdf.

Revert "kill app long press back"

This reverts commit 2281d22cbc6c3c8aaa335493e6bd8377819f18a3.

Revert "Option to use volume keys to control media volume anytime [1/2]"

This reverts commit d7ec2b5025f1a8e49fa9170514fbdf26109178c4.

Revert "fb: less notifications sound (1/2)"

This reverts commit e1ce9f2ffe0d0050460740fb4ec9a5612c1baf81.

Revert "Squashed: Add options for reboot to recovery and reboot to bootloader"

This reverts commit b14beef1c0bf641cad388635aacf34a20ff23713.
SystemUI: Status bar clock - fixes

This commit fixes:

- no overlapping more from status bar icons on center clock.
  The width depending on what the user has setuped (date and clock) is exactly meassured now
- do not start animations if they are not needed
- reduce settings provider calls
- a bit cleanup

Change-Id: I7a37a6ae8f9bad0f265119af05dc20cf21cd6890
SystemUI: Ensure that the Clock is actually enabled in IconMerger

to device if we need to calculate

Change-Id: If12b0e26b32f044f1a82cf8b539283194d1d0b4c
Keyguard: Enable quick unlock (1/2)

old way does not work anymore exactly like before. So adapt the idea to new LP code

Thankd DVTonder for the basic idea prior LP

PS:
- do PIN view correctly
- Hide OK button if quick unlock is enabled on PIN view

Change-Id: I86660afafb8648d36d6c135343c88afcfc5173fc

Conflicts:
	core/java/android/provider/Settings.java
Forward Port: Smoother Upload and Download Animation

Change-Id: I6e6409cc85ad951019dbac10156d4aed92f4c5bc
Keyguard: don't refresh ui when screen off

KeyguardStatusView is doing refresh all the time,
which cause high power when screen off.

PatchSet:
- We turn of the refresh when screen is off which is a good
  idea. But we should force latest next refresh when screen turns
  on. Du that a timechanged refresh maybe comes a bit later.

Change-Id: Icbb9a92bae3cf099417ab820617dd3f17e49f75a
Forward Port: Volume button seek on screen off [1/2]

PS : Fix the short press event type

Change-Id: Id55a1240a133b5144502fced862bae040b390662

Conflicts:

	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Frameworks: only send volume key events to the session manager if it is not a wake key

This fixes the problem of volume adjustment when volume wake up is activated and volume rocker
music search disabled.

Change-Id: I04873fd82885134c3674290dae530def269bfb50
status bar: battery level text

1. Add TextView to display battery level percentage next to the battery icon.
2. Remove support for displaying battery percentage on the actual battery icon itself.
3. Also respect view on lockscreen and opened notification drawer.
SystemUI: make long pressing recent switch to last app

With this patch, long pressing the recents key on the navigation bar
will attempt to switch to your last application in the activity stack
before the active one.

The user's current home launcher package is ignored as well as SystemUI (so that
RecentsActivity does not influence the behavior).

Change-Id: I38771e0fce16b55bb5186af47115b4e812cb60b0
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
SystemUI: Set zen mode to no interruptions if silent mode is set

When setting ringer mode to silent and current zen mode is off, zen
mode will become priority interruptions mode. As a result, ringer mode
is set to normal mode in updateZenMode.

Set zen mode to no interruptions when ringer mode is set to silent.

CRs-Fixed: 744813

Conflicts:

	core/res/res/values/config.xml
[1/2] Base: Hide power menu on lockscreen

Adds an option to enable/disable power menu on lockscreen.

Conflicts:

	core/java/android/provider/Settings.java
policy: only disable power menu on secure lock screen
Add option to hide AlarmClock Icon in StatusBar [1/2]
Android Policy: handle volume key event as wake key when preference is set

Change-Id: If9a61cd65553bf00f0efda1a75b1ab75b9129090

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Volume Wake: little fix
[1/2] base: allow disabling volume adjust sound

Change-Id: I95893180865209d2aeaf4b3fa129a74df7523bbe
PhoneWindowmanager: disable panic mechanism when PolicyControl activated.

Change-Id: I5cf5f681237bbd17ec0fe2d041dd782cfb4b72f0
Framework: Forward port Long press back to kill app (2/2)

Change-Id: Ia88d8a2753e203afb8d6117a643c33127f991c4a

Conflicts:

	core/res/res/values/strings.xml
DownloadManager: add to pause/resume download by user

We add pause and resume APIs here to make application can
pause and resume downloads by DownloadManager.

Code change contains:
  - add pause and resume download APIs.
  - add another paused status for this case.

Change-Id: I5bf4f15b2464009595f7926522ca6d5f1b0e2b8d
Download: use "control" column to mark paused/resumed status

Before, column "status" is directly updated when user pauses/resumes
download, this causes status shown to user is not same as real status
because pausing/resuming needs a little time not instantly, and then
causes some status error.

The column "control" is updated instead of "status". When user pauses
download, will update "control" as CONTROL_PAUSED and set "status" as
STATUS_PAUSED_BY_APP until pausing operation is finished; and when
user resumes download, will update "control" as CONTROL_RUN and change
the status as STATUS_RUNNING until DownloadThread is started to run.
Then the status shown to user will be same with real download status.

Change-Id: I2204b972d24b809f7914b0981cad11e9175f4ae6
CRs-Fixed: 737182