Revert "Make the volume overlay more functional 1/2"

This reverts commit 6e4393ae32afe2dbf0c68c98296a4aed8ddb41b3.
Make the volume overlay more functional 1/2

This Patch is to add new Volume Overlay Styles

 * Make the Icon on left touchable to go to Sound Menu
 * Always show the Phone Ring volume in expanded (for devices that have phone)
 * Always show the Alarm volume in expanded mode
 * Put an Option in Sound menu to choose a Style (see 2/2 patch)
    - Single : as default
    - Expandable : Enable the more link to expand all choosen volumes
    - Expanded : Show all volumes
    - Off : show no overlay
 * Fix a BUG that when you linked the volumes you got 2 phone icons
 * Fix a BUG when linked all volumes did not move when using hard buttons
 * Fix a BUG when you drag when linked, other expanded did not move
 * Added a default mode so non-telephone devices get Expandable by default

Note : When you are using BT in phone call
or the phone normally there is an extra expanded volume

Change-Id: Ie716e55ba6d4e89a1a67c59b9934d4e088833c5b
Add option for switching between UMS and MTP/PTP mode. (1/2)

This adds support for switching between UMS and MTP/PTP.
Framework part (this part) will only enable UMS if the config setting is set.
Standard is to enable UMS if the primary volume supports UMS.

p2: Fix compile error
p3: Some code styling
p4: Fix mysterious bug where USB notification is not fired when switching from UMS.
p5: Revert last commit.

Change-Id: I753b7dd3823958da1b043ca44b50118d67637cc1
Show dock battery level if available

patchset 1: Initial commit without icons
patchset 2: Add icons
patchset 3: Remove nested layout

Change-Id: Ie853087999d929579ececf3f6b3b01ced32dff85
Increase size of the tablet status bar settings

At 280px the status bar settings needs to be scrolled
quite a bit in order to see the available toggles.
~380px should be the limit for a 1024x600 7" tablet

1280x800 10.1" tablets could overlay this with 480px
and it will still fit.

Change-Id: I9d4b9a882c28bebfe636d9f29e42eafd21ce189a
Bugfix : Expanded volume overlay

If you switch to the Expanded volume overlay
(Settings > Sound > Volume panel)
from any of the other settings that are not expanded
then the Expanded overlay appears collapsed.

The only way to make it appear expanded is to restart the framework
or
In the Expandable view - expand the volumes - then immediately change.

This patch fixes this and also has a slight improvement in the
case where a user selects the same choice they have already.

Change-Id: I9264ce62e239f497e0a2924c6769f066f196ebeb
Disable UMS splash when phone in locked state

Currently devices which use UMS will display the UMS toggle screen
over the lockscreen. This would allow unauthorised users to access
the contents of the SD card, when plugged into USB, without first
unlocking the device.

Disable the UMS splash if the phone is in a locked state.

Change-Id: Ic18462758344c327e70e6a70d674f08d8ad51cb0
Notification light(LED) settings: package mapping

Credit for this code goes to Marko Mihovilic

This commit allows for framework side override of the application
package name set for Notification light led overrides.  This is used
in cases where the user selectable application sends its notifications
via another package.

Specifically:  GTalk (com.google.android.talk) sends notifications via the
Google services framework (com.google.android.gsf).

Patch set 2  - fix derp and whitespace cleanup
Patch set 4  - fixed another derp
Patch set 5  - fixes typo in comment
Patch set 6  - remove Log.d line
Patch set 7  - allow specifying default values in application notification
               overrides

Change-Id: I0c13ae3acefa0bcb4ffb46ea7eae301081d9f8f6
Avoid divide-by-zero exception when printing process state

Change-Id: Ifa1c64ff6917c3a6f7d72a92862b48eec2540afd
audioflinger: Optimze ditherAndClamp with ARM NEON

Change-Id: Ifc436e39f15b103cec404e8a81fa8b8a6b5f0e5f
Fix contact lookup with CLIR prefix

Allow phone numbers which are saved in the phonebook including a
CLIR prefix to be correctly resolved on an incoming call.

For a proper fix, all special cases detailed in calledPartyBCDToString()
should be taken into account; unfortunately that function cannot be
directly used as it currently is.

Change-Id: Ie070e1efc0921bfb0ae0802f500afced5071a652
AudioManager: Handle KEYCODE_VOLUME_MUTE

Implements muting in KeyguardViewBase and PhoneWindowManager too.

Change-Id: I732ac5c918ed66ebd9376ccad7bcc0cf88cad778
tethering: Tolerate socket exception from ifindex look-up

The code already handles the case of internalNetworkInterface being null,
but this would never happen since it throws an exception if
NetworkInterface.getByName(internalInterface) fails. Catch the exception
and continue processing.

This is needed with some older usb gadget code which don't populate
/sys/class/net/usb0/.

Change-Id: I15adead7835ff3a4f77f87175ac85c5d9f45f9c0
SystemUI: Fix alignment of the Settings icon on tablets

At some point the Settings icon in the notification panel header got
left aligned (next to battery) rather than right-aligned as it was
originally.  This commit fixes moves the icon back to the right where
it belongs.

Change-Id: I4058bc55dd7b9df7f27f4cffb33c11691b4f5d14
Frameworks/SystemUI: Hide expanded dialog when screen is off

Hide the expanded dialog while screen is off. Otherwise it
causes continuous buffer updates to SurfaceTexture
even when SCREEN is turned off and while In-Call causing a
spike in power consumtion. This fix ensures that the
power consumption is kept to a minimum in such a scenario.

CRs-Fixed: 339815

Change-Id: Ib9154528d4f88ba12ca234be7f929a61ed098be7
Surfaceflinger: Compose UI in S3D format

The new member of LayerBase takes care of identifying layer for 3d
composition. When 3D composition is required the Layer takes care
of drawing in 3D format

Change-Id: I55c99a3cb612c6dd7a22d346a5b9a88c056c835d
surfaceflinger: Enable dithering if persist.sys.use_dithering=1

* fixes color banding
* needs reboots after changed (caches variable for performance)

Change-Id: I66de607b149ec4e01967febeec234ef2994d20a4