framework:  Safe headset vol & audio dock support (from CM9) WIP!

Change-Id: I7371a5bbee0fd4334ebffefdf8dd3d27ef710e80
Make "SD Card removed" notification dismissible if the removed SD Card is not the primary storage

The Galaxy S uses the "external SD Card" as the extended storage
and it the notification should be dismissible as it's okay not
to have it.

Additionally, this patch also not hide the USB storage mount dialog
if the removed storage is not the primary storage

Change-Id: I524b294c57ba80f19cf1af808af65ce1308f5a0b
Adjust kernel data stack TCP parameters to optimize performance

Enhance Android MobileDataStateTracker class to identify technology
EVDO rev B separate from earlier releases.  This permits use of
separate TCP buffer size for higher bandwidth technology.

Change-Id: Ib8dfa315c4485c36c66b2c66950c42ccb81fe9e5
CRs-Fixed: 260740
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: Id3bad65659174a08cfe945e9af6e48ca012a5135

(cherry-picked from ics)
frameworks/base: Fix screen stretch issue for NuPlayer

- Fixes screen not moving to full screen after suspend resume during RTSP
  streaming in landscape mode.
- If there is an incorrect height and width, it saves the video height and
  width and then does the correction to have proper width and height.

Change-Id: Icb4b9b71f21d138b85f200dc82a1fbe58342866f
dirty hack to stop phone from crashing

Change-Id: I69e1af77ad359fc375aa00d13c2175537212e8aa
Display Unicode name for China Operators.

The operator name is displayed in the phone using latin
characters by default (the SPN field). The SIM can be
configured to display a unicode name instead using the
PLMN field. However, many Chinese operators requires
this to be a customizable setting as well.

A property, ro.operator.use-plmn, can be set to override
default behaviour and display operator name as unicode
is introduced.

Change-Id: I0b2183cc40fd76bee88ffbe98b99a1d6fa9e2f5b
Keep track of tetherable USB interfaces in both up and down link states.

USB network interfaces that are present-since-boot are never issued "added"
(or "removed", for that matter) notifications from netd, and thus, are only
discovered by Tethering when their link state changes.  Prior to this
commit, such interfaces were only tracked on change to "up" link state,
even though the interfaces were _not_ removed on changes to "down" state.

On some devices (e.g., epicmtd) a change to "up" state only occurs after
(i) IFF_UP is set on the interface, (ii) the rndis USB gadget function is
enabled, and (iii) a USB cable is connected to another machine.  Since
rndis is enabled immediately before the start of USB tethering, the "up"
state is achieved asynchronously, and often _after_ Tethering looks for a
tetherable interface.  However, "down" state is synchronously reported when
IFF_UP is set, and thus, serves as an effective mechanism to notify
Tethering about the existence of the interface.