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.

Change-Id: I6fc8e3e202d76f9704d7ec2383c7ee6f7b05ba76
Fixed aapt warnings

Change-Id: I35389697266b3ec59a38b4142a8983d0a8cc31ac
PT-BR: Added missing translations

Change-Id: I0616fbbd61742553bd03c1d64a2c792ad55fb2e9
Japanese: update translation.

  - Add missing translation entries.

Change-Id: I076e396c065b642d9bf342452eacea4588a5525f
Update korean translation

Change-Id: Ic6c85c8253d81079316e38a58e7e852e44be5a73
Disable touch while using the stylus (Galaxy Note)

Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Change-Id: I9f458d85d8bf83d6cf03b467d46ce066fd55b7e0

Conflicts:
	services/input/InputReader.cpp
	services/input/InputReader.h
frameworks/base: Dutch translations

Change-Id: I7adf723e44389fa05a1920d785cc6434c3473336
Quick Settings: Actually update resources, when asked

Failure to do so causes the quick settings tiles not to be updated to
reflect system locale changes. The tiles remains at the previous locale.

Patch set 2: Remove unnecessary casts.

Patch set 3: Remove one last cast, only possible now that
             http://review.cyanogenmod.org/29350 has been merged.

Change-Id: I42bf8208a2f82dd0f2441685df6a7af2a81b611b
Merge "Quick Settings: Actually update resources, when asked" into cm-10.1
Merge "frameworks/base: Dutch translations" into cm-10.1
Screenshot : Pass current user

Needed to complete the snapshot procedure

Change-Id: I40f63e261e213136cd739c06da6f005173427ae0
Merge "PT-BR: Added missing translations" into cm-10.1
PowerWidget: fix airplane mode toggle

Settings.System -> Settings.Global

Change-Id: Ic1a874ec694e76153d0838fdb81650fe384bae59
Framework/SystemUI: Update Greek translations

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I2a9978b20ce0d70621e88913841758553721e6a8
Merge "Fixed aapt warnings" into cm-10.1
Merge "Screenshot : Pass current user" into cm-10.1
Merge "Disable touch while using the stylus (Galaxy Note)" into cm-10.1
input: Add option to toggle pointer icon when using stylus

* The visible pointer icon when hovering or drawing with the stylus is
  quite annoying when trying to actually draw with it. Turn it off by
  default and add an option to turn it on.

Change-Id: Ib7f23e8b69589e3f875d150caf05065b64676e44

Conflicts:
	services/input/InputReader.cpp
	services/input/InputReader.h
	services/jni/com_android_server_input_InputManagerService.cpp
GlobalActions: Fix dialog dismissal

The themeability of the global actions dialog introduced by
change I644e2e8d7d4abf07bae639b606197d691f16adac broke the
hook that prevented multiple instances of that dialog, and
multiple instances of it will cause framework crashes due to
mismatches variable references (besides looking weird).

Fix it by restoring the original dismissal condition and forcing
a recreation of the theme context if necessary.

Change-Id: Ic6e06bef18fa9e09c84c774fa273f1b7e3bf9630
QuickSettings: Fix Swedish translations

The translation of "Bluetooth Off" to "Inaktivera Bluetooth"
(which means "Disable Bluetooth") causes confusion as the string
is meant to show the status, not what would happen if you tapped it.

The translation for "WiFi Off" is valid but it doesn't fit. Changed
to "WiFi Av" to match the change above. This one can be discussed.

The translation of "WiFi Display" translates the word "display"
as a verb which made no sense in this context. There is currently
no proper Swedish name for the WiFi Display standard so the English
name is used instead. It's what people actually use anyway. "WiFi visas"
means "WiFi is displayed" which is clearly wrong in this context.

Change-Id: I6013421242ee1dea6bbc2bc6adbf83581b4c6de2