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: 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
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
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
Merge "Frameworks/SystemUI: Hide expanded dialog when screen is off" into ics
Merge "Bugfix : Expanded volume overlay" into ics
Merge "Sensor: Add RotationVectorSensor2" into ics
Merge "surfaceflinger: Enable dithering if persist.sys.use_dithering=1" into ics
LGEQualcommUiccRIL: Fix PIN/PUK operations

PIN/PUK settings/changing/disabling was broken due to missing parcel
items, fix it;
Each set of strings must be prepended by a count of said strings.

Change-Id: I902eea6ba275b24e105f1b42f7d5d9f23e76d0c5
SamsungRIL: clean up and re-organization

Clean up some messy code in the Samsung RIL.

Change-Id: If8bc9c0e4264de5919be1b6a858896076c879708
Merge "SamsungRIL: clean up and re-organization" into ics
Telephony: Add getLteOnGsmMode() method

Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property

Additionally, support GSM LTE in the SystemUI LTE power widget

Change-Id: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
LGEQualcommUiccRIL: Adapt to new GSM+LTE support

User LTE preferences now stick, instead of resetting to LTE-on after
reboot

Change-Id: If8285af9a9eeaa70594f8a10ce5d8177b5fe030f