ActionBar: Compute required items prior to optional items

When computing if a item should be shown in the action bar, required items need to be compute prior
to optional ones. Otherwise, in some cases (when the optional menu goes to the left of required
items then the algorithm could determine that optional has space to be shown and force the show of
required items, causing the required items to not be shown).
A concrete case is in the Email app. In the message_view_fragment_option.xml are defined 5 menus,
that when are all shown (xe: in Exchange mailbox account type) the bar is complete filled. But if
the overflow button is forced to be shown (the device has no permanent menu key) the overflow button
overlaps the older button, because space of 'ifRoom' items are wrong computed.

Discussion Change: http://review.cyanogenmod.com/#/c/22396/

+ aosp change https://android-review.googlesource.com/#/c/34700/
Prevent empty overflow popup when there are no overflow items. (jakewharton@gmail.com)

Change-Id: I6fc8e3e202d76f9704d7ec2383c7ee6f7b05ba76
Support GSM AT commands for SMS over bluetooth (1/2)

Modifications required to support the older GSM "AT+" commands for SMS over
the bluetooth transport for use with car radios, etc. This must piggy back
on the existing handsfree code as the spec uses that channel for the commands.
(2 parts: frameworks/base and packages/apps/Phone)

frameworks/base:
Additions to JNI and supporting framework code to allow sending of individual
characters and to receive the PDU stream - neither of which are CR terminated.

IccSmsInterfaceManager.java requires a reversion in sendText() to use
enforceCallingOrSelfPermission() instead of enforceCallingPermission().  This
is apparently the only way Phone.apk can actually send an SMS.  (ICS used the
OrSelf variation while JB changed to use the stricter version.)

Change-Id: Icff0d2c55170e9c47302b21ce3f15ce863c8c756
Signed-off-by: Gary Dezern <garyd9@gmail.com>
Move voip/java/com/android/server/sip to framework2.jar

The method cap that neccessitated framework2.jar is getting quite close
to being full again. These classes can be moved safely and relieves some of
the pressure. Found by ninno_mx.
Fixed: Removed undesired changes, sorry.
Change-Id: I91c65d8efbd7fa68b77714f3892c9be184b4f3bf
Frameworks_base: Simplified Chinese translations

Added new strings as well as revise existing strings for better
accuracy and to reflect changes made to the English strings.

Patch Set 2: Further revision and corrections.

Change-Id: I8e3a95335e8eb7111eaac91089bcd22c1eadc014
telephony: let us write just the aid on getIMSIForApp

This implements a new RIL compatibility feature, "writeaidonly", that
lets us write just the aid, without the preceding 1. This is needed to
be able to read the IMSI correctly on some Motorola RILs

Change-Id: I48e9d76db6730571c01d59313fc7a5e79845f922
DockAudio: Always route audio back to normal on undock.

Only ignore dock event when docking, not undocking.

Previously for Samsung devices that utilize the extra setting to enable
the dock audio, if the device setting is disabled while on the dock, audio
is prevented from routing back to the device speaker after undocking.

Change-Id: Ib182751a29bf7ba8feb9ff153cd3708df80f7ee6
LockscreenShortcuts : Fix minor bugs

Fixes :

      - Inability to have contacts/direct dials..etc on lockscreen (http://goo.gl/BKEJs)
      - Multiple activities of same type on stack.

Change-Id: I6c2c3e1c87239267601d78eb38778d0388f4a41c
Accurately display connectivity info in tablet status bar

Currently, if the connected network is something other than a Wi-Fi
network or a mobile network, the status bar popup would display
"No Internet Connection" which is misleading.

Patched wifiLabel (which is only used here anyway) to also allow
other connectivity (bluetooth, ethernet) to display correctly.

Before: http://imgur.com/YMB2C
After: http://imgur.com/kFt3Q

Change-Id: I2ac8d453e001c5ac14c0f2ebd97e1ef73551c37e
NotificationPowerWidget : Snap widgets

Snap widgets in place, rather than allowing partial widgets

Patchset 2 : Register only if necessary
Patchset 3 : New implementation (CustomView)
             Allow free scrolling, snap when stationary

Change-Id: Ie1db349a449a2770e4cfd491a7e7c356130e75a0
Merge remote-tracking branch 'cyanogenmod/jellybean' into jellybean