Framework: Option to not lock automatically when a call ends (1/2)

When a call ends while the screen is off the phone is automatically locked. This commit adds an option to disable this behavior.

Navigate to Phone->Settings and uncheck the option Lock when call ends under the advanced settings section.

Commit includes option in english and translation to portuguese.

Change-Id: Ib37d1be2e2238d822c1db2cfc6d23353588a6127
Change the thread priority

Change-Id: Ieece4851132ff85e36d10874991793cc4c0714ca
Postpone sending scroll message to webcore thread

Post a message to the UI thread instead, to send the
scroll message later.

Change-Id: Iff94af37e9070e63e0797195c7588343ab077bb3
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 "Framework: Option to not lock automatically when a call ends (1/2)" into jellybean
Add CmCircleBattery to StatusBar options (1/2)

Cyanogenmod Circle Battery implementation
- Done 100% in pure code, wont blow up the framework with countless png resources
- View can be shown with or without percentage as text inside
- Indicator turns holo-red below 15%.
- All sizes are calculated on the fly and should work on all current and
  future screen resolutions. (needs testing)
- All colors are read from the holo-theme, so changes by themers will be obeyed.
- The lower part of the pictures tries to illustrate the charge animation.

Screenshot: http://dl.dropbox.com/u/16186798/cm10/cm-circle-bat-mockup.png

Patchset 2:
- Level >= 95% is treated as 100% (see inline comment)
- paint.setDither(true) should reduce artifacts on 16bit color depth devices
- modified tablet-specific xml. alignment should fit now (not tested yet)
- cleaned up some xml formating derps
- fixed possible crash bug

PS3: 97% seems better than 95% for full circle

Patchset 4+5: lost track of patchsets.

Patchset 6:
The battery fill-up above 97% was a quick shot. In the end,
we show the right percentage in text, but circle fills up, once 97% is
reached. This also solves the issue, that circle with very tiny gap
looks slightly unbalanced.

Also gave in about code formating. Its for the greater good. (I still am
convinced, the whole world is wrong about this :)

Patchset 7:
- Fix derp

Change-Id: I3dfe0b4e69c545cb9bbad2d1461d154618c60e00
Merge branch 'jellybean' of git://github.com/CyanogenMod/android_frameworks_base into jellybean