Avoid divide-by-zero exception when printing process state

Change-Id: Ifa1c64ff6917c3a6f7d72a92862b48eec2540afd
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
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
surfaceflinger: Enable dithering if persist.sys.use_dithering=1

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

Change-Id: I66de607b149ec4e01967febeec234ef2994d20a4
Sensor: Add RotationVectorSensor2

Some ICS apps (namely, Google Maps) expects a rotation vector to be
available. Newer devices, this is provided by either Android's
sensor fusion (requires Gyro) or by hardware sensor fusion (MPL).

Older devices will lack this virtual sensor and compass in Google
Maps will not work. To fix this, we can provide our own rotation
vector sensor by converting the values from the orientation sensor.
(They are basically the same information in different formats.)

Thanks to Unhelpful for the help with related math.

Change-Id: I596f5dc44f8797bc280ae5d1e110bb92387c79d1
AudioManager: Handle KEYCODE_VOLUME_MUTE

Implements muting in KeyguardViewBase and PhoneWindowManager too.

Change-Id: I732ac5c918ed66ebd9376ccad7bcc0cf88cad778
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
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
Merge "Avoid divide-by-zero exception when printing process state" into ics
audioflinger: Optimze ditherAndClamp with ARM NEON

Change-Id: Ifc436e39f15b103cec404e8a81fa8b8a6b5f0e5f
Merge "Fix contact lookup with CLIR prefix" into ics
Merge "AudioManager: Handle KEYCODE_VOLUME_MUTE" into ics
Merge "Increase size of the tablet status bar settings" into ics
Merge "Show dock battery level if available" into ics
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
Merge "tethering: Tolerate socket exception from ifindex look-up" into ics
Merge "Notification light(LED) settings: package mapping" into ics