AudioService: Don't adjust volume when vol-downing to vibrate or silent

Pressing vol-down to vibrate or silent would (previously) still adjust the
stream volume, setting the last audible volume to 0, which is not allowed
for voice-capable devices.  Thus, the last audible volume would reset to
default on reboot if on vibrate/silent or the lowest volume setting.

By not adjusting volume when vol-downing to vibrate or silent on
voice-capable devices, the last audible volume is always preserved across
reboot.
keyguard: enable magnetic target if no custom targets defined

When no custom target is defined (the "reset" button is pressed
in settings), the unlock target will always be at the right
regardless of the direction the user dragged to.

Change-Id: I0a2b1cd5dc7a2840c23d83a26593513cbc880c08
Remove unnecessary updateSurfaceScreenOn call.

This change stops updateSurfaceScreenOn() from being called one time
right after another. It's called at the end of stayAwake(boolean awake),
which is called right before updateSurfaceScreenOn() in release().
Multi pane preference settings
Quick launch shortcuts: update search panel on userSwitch to recreate targets.
Adapt navigation bar's long press behaviour for pie controls

This commit brings the navigation bar long press behaviour to
pie controls.

Two things will be considered for long press:
* Long press on HOME will open Google Now.
* Long press on BACK will kill an application if enabled within
  the debug options.

Patch Set #2:
* Jacob's colours

Patch Set #3:
* More blueish colours
* Using a longer time out for long press
  (getLongPressTimeout() * 2)
* Moved killForegroundAppication() around

Patch Set #5:
* Shortened long press time out a bit
* Adjust time for info shade dynamically

Change-Id: I8cfa87a5be0678f0452011d85d427439d7cf31e9
Correct executable bit for source files

Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
PowerMenu : Improve keyguard filtered actions

Replaces the check for visibility of lockscreen with the state
of the keyguard instead. This avoids the situation where actions
returning false from showDuringKeyguard, are still shown if user enters
emergency call screen.

Change-Id: Idb5df14813d9479bd4178dbb9eb3b91cbecda5de
framework: Battery bar (1/2)

* Patch inspired by MIUI and originally ported by David Morgan / @Spitemare
* as a extra feature for custom @CyanogenMod 7 ROMs.  Patch has been adapted
* to work better on @SaberMod.  Much of the work was done by Daniel Nilsson / @syaoran12
* Patch is nearly identical in nature to how Dan has writen it, with a few
* minor changes in removing the option to have centered bar, which doesn't
* seem to work very well on some devices like the Nexus 7 (grouper).  Also
* does not check for devices with no navigation bar as @SaberMod only supports
* nexus devices that all have navigation bars.

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	packages/SystemUI/res/layout/status_bar.xml
SystemUI: fix memory leaks

ContentObservers are being registered without being unregistered,
causing old objects not to be garbage collected. This causes memory
leak if the classes are destroyed and recreated throughout the
device's uptime.

SearchPanelView is recreated every time the screen is turned on.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
[1/2] Power connect/disconnect notification support

part 1/2: frameworks/base PowerUI and Settings

part 2/2: packages/apps/Settings Sound settings

patchset 3:
    shrink a couple of long lines
    remove power_notifications_use_default option (folded into ringtone option)
    load default settings in global instead of system

patchset 5:
    support vibrate toggle
    ignore first power state change (on boot) if it's a DISCONNECT

patchset 6:
    fix ignore first power state change

patchset 7:
    change vibrate to default to off
    simplify first power state change ignore logic

Change-Id: I36a6b9f924d2cd52191a8e83a744745b37c5b068
Revert "Swap volume buttons when the screen is rotated (1/2)"

Too many regressions when using volume button hacks

This reverts commit 9a001703646158bbf56a1ef7ea5449f7df86aa7a.

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
Revert "Configurable 0, 90, 180 and 270 degree rotation"

This reverts commit df912692278aed5d2f30e2ba850d8ad24e6bf175.
Revert "basic rotation config"

This reverts commit e79a0f22d5a61637c069bc155cf3edd381adbf42.
un-theme QS tile icons
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Mms auto-retrieval (1/3): framework

Change-Id: I9b2f76d8cf9d67eddddfdf7737a948eea680329f

It's only porting this http://review.cyanogenmod.org/#/c/26166/
Part 1 of 3
Don't start keyguard in an attempt to exit it.

exitKeyguardSecurely() will open the keyguard if it's currently disabled
by an app. As this is unwanted here (the user has either already
bypassed the keyguard or the keyguard isn't secure; otherwise he
couldn't click on a notification entry) and as the lockscreen already is
dismissed a few lines above, don't call exitKeyguardSecurely here.

Change-Id: I5582da350d8826e42f9edcd56845a59965865c8b
JIRA:CYAN-99
KeyEvent: update comment

Change-Id: I1ea491e7e23670bf0ea83392710010b557803178