Add global reboot option

Add global reboot option when long press power key and confirmation dialog
when user chooses to reboot device.

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Add clear all recents action to recents panel

Change-Id: I2243ebc83abc483e78b112900a653d7e61edc5ba
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
[1/2] SystemUI: Network speed indicator

Change-Id: I88e7cdfe20342c695a33383db36bf80bb4ffe009
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
[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
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:

	core/java/android/provider/Settings.java

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
[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
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

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

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/res/values/simpleaosp_dimens.xml
	packages/SystemUI/res/values/styles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
[1/2] TrafficMeter: added option for auto-hiding on inactivity

Together with inactivity threshold

Thanks to @C3C0 for the code

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

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

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
TrafficMeter: fix auto hiding when Bytes is set as the unit

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Netowork speed indicator layout fix

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Statusbar clock and date customizations

Some things changed on kitkat + our old code needed in general a bit
rework. All done with this patchset.

This commit add support for:

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Conflicts:
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
SystemUI: add quick settings pull down with one finger

Logic is currently set to use 1/3 of right hand side of the statusbar to
trigger a quick settings quick pull down, quickly.

Change-Id: I3f536496f724f07d2419a5b2db5fa8f8261609e7
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Framework: Configurable 0, 90, 180 and 270 degree rotation (1/2)

thanks cm

Change-Id: Ie950679d3515234ab30e6da04cba2659c463425d
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Framework: safe headset volume option (1 of 2)

thanks DvTonder

Change-Id: I5355820a24d48c1d8f54ea17a7022d891ad07857
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	media/java/android/media/AudioService.java

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Option to use volume keys to control media volume anytime [1/2]

The volume keys control the Media volume rather than the Ringer
hence removing the issue of accidentaly changing the Ringer volume.

Credits: Pawitp

Change-Id: I789e05bdb0bb7c968f71e4e10f4a759b3dbd0b59
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
fb: volume rocker control (wake up)

Change-Id: I60f5f88e32a129afda80f5b0f4f41cb0a322b691
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

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

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
PowerManager: Don't wake up device when charger is plugged/unplugged (1/2)

This will add the option to disable waking up the device when a charger
is plugged or unplugged.

Change-Id: I3367041a05931510f367dafe412b173c80b89df1
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Squashed: Add options for reboot to recovery and reboot to bootloader

Squashed commit of the following:

commit ae11cb454eeeb34451b0e1b1f10fb84dea91405d
Author: MrBaNkS <banksmi09@gmail.com>
Date:   Tue Nov 18 05:28:55 2014 -0600

    powermenu: better drawables and renameing

    commit 37c7d3cc8680ff127f3cb59d6d8be2ae5a3b2f4f
    Author: MrBaNkS <banksmi09@gmail.com>
    Date:   Sun Nov 16 09:06:20 2014 -0600

        I knew I forgot something -_-

    commit 336b52397363326a372046e26db19645b7622c29
    Author: MrBaNkS <banksmi09@gmail.com>
    Date:   Sun Nov 16 05:26:24 2014 -0600

        powermenu: add missing drawable tinting xmls

    commit a76e7625f895b51180bcf3ce72879d1d3cea1c30
    Author: MrBaNkS <banksmi09@gmail.com>
    Date:   Sun Nov 16 04:44:03 2014 -0600

        Add reboot to bootloader option
        credits: @yashade2001

    commit bb56772d79e4b8c04fd522af58704971de02313c
    Author: Yashar Ahmedizadeh <yashade2001@gmail.com>
    Date:   Sat Nov 15 12:27:00 2014 +0200

        I can haz Reboot Recovery Option In PowerMenu

        Coded from scratch by yashade2001.

        Signed-off-by: Yashar Ahmedizadeh <yashade2001@gmail.com>

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Fix - place Clear Recents button above the nav bar

Change-Id: Ie7059cd1f71bae28ff25f367221b7c7ba0131932
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
volume key adjust sound

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Fix up 'clear recents' UX.

Use the 'dismiss all' button drawable and place the button in the upper
right corner. Doing so fixes the broken animation when going into
recents.

Change-Id: I497a8b023f1872c5f9ae5df87af6ed2159e6b7b1
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>