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
GlobalActions: Fix possible race condition when showing dialog.

Depending on the presence of a previous dialog, the newly generated one
gets either immediately displayed (no old dialog) or shortly delayed
(after dismissal of the existing one).
If a new show event happens (by rapid fire of the power key, for instance,
using a keyboard with fast-repeating events) during that delay, a new
dialog will be immediately displayed, and when the delayed show triggers
it'll conflict with it (and bring everything down).

This moves the creation of the new Dialog object to _before_ showing
it (delayed or not), instead of the show method itself, to ensure the
object isn't clobbered by competing/sequential calls to handleShow()

Change-Id: Ie4d9a8507ebaf59da31869c38b98c3c98a74468e
NavigationBar : Customization

Includes:

- Allows user to customize navigation bar.
  Features :
   - Choose from 1-6 # of buttons
   - Re-arrange / assign buttons
  Id: Idc9f5f401f15d207504e49de47666bb5510a06ca

- Navbar : Rework logic for determining orientation
  This patch introduces better checks for hybrid ui's.
  This should fix issues of small buttons due to incorrect ui determination
  Thanks Rolf Arne Schulze for testing :)
  Id: If5b61dc4764a98deedb5b801d11451fed2488cba

- Fix layout on N10
- Remove uncessary padding and logic
- Phone fixes
- Phone padding fixes

Change-Id: I8903b85b6ee8581f8564d9dc7b0d40f645d7647a
bugfix: allow recent apps dialog to work with menu long-press

With the original patch, using the recent app dialog from a
menu button long-press would cause the dialog to be preloaded
and then dismissed on key-up. Check long-press behavior settings
as well as short-press to prevent the dismissal.

Change-Id: Idf1d27aa725547e0ddc44905e27da6c1b4540fab
Merge "ActionBar: Compute required items prior to optional items" into cm-10.1
Merge "NavigationBar : Customization" into cm-10.1
SystemUI: Dutch translations

As these translations are ported from ics,
this will be merged immediately.

If you think the translations in this patch could be improved,
please post a comment.

Change-Id: Ic98dcc7e5dcd09c9fd82fe7f1f7b5b59dd046287
es_ES: Added spanish translations

As these translations are ported from ics,
this will be merged immediately too ;)

If you think the translations in this patch could be improved,
please post a comment.

Change-Id: Ief12f0926be641030218b4feeb293cc10b90bd36
SystemUI: Danish strings

Also added translation for new 'NavigationBar : Customization' feature. (Change I8903b85b)

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

Change-Id: Iee714a900684443442fdadbf96e20da645312c1a
Update Russian Translation-NavBar Customization-SystemUI [2/2]-CM10.1
Merge "Update Russian Translation-NavBar Customization-SystemUI [2/2]-CM10.1" into cm-10.1
LockScreen: Add option to start widgets maximized

Sources from AOKP with some modifications

This will allow the user to choose wether the lockscreen
challenge (circle, pattern, pin) is minimized when the screen
is turned on.

Patch Set 3: Remove visual jump and adhere to setting on initial inflate
Patch Set 4: Remove accidental dependency
Patch Set 5: Fix potential multi-user problem.

Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Change-Id: Ib5bd0a84e5542a49d34ed8c8541e10a7878a616c
Merge "LockScreen: Add option to start widgets maximized" into cm-10.1
Launch music player on headset connect

Launches the default music player when a headset is connected

Change-Id: Ib97077191c52b14e552265456312162b6ad3fdcd
GpsQuickTile : Set label correctly

Apply label onPostCreate

Change-Id: Id7fd61fa9ab37257b81167e53c7976310543ea94
GLSurfaceView: add property to default to RGB565

Some legacy devices (like the Xoom) are not capable of handling
RGB888 surfaces, which is now the default. This results in some
OpenGL apps crashing with "No config chosen" errors.

Set ro.opengles.surface.rgb565=true to go back to the old default
of RGB565 surfaces.

Credit to dreamcwli for the original patch.

Change-Id: I5ad9aa8e98eb6fd554b01022439141fe4a55bd70
QuickSettings : Cleanup

Change-Id: I044f8c0914c725af5894ffb70e8ac54b6e19dc43
Added hungarian translation for NavigationBar settings

Change-Id: I50b78570b0dc7c0afe1956260b313c4c45779303
Merge "Added hungarian translation for NavigationBar settings" into cm-10.1