Option to use volume keys to control media volume anytime (1/2)
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
Remove unnecessary updateSurfaceScreenOn call.

This change stops updateSurfaceScreenOn() from being called one time
right after another. It's called at the end of stayAwake(boolean awake),
which is called right before updateSurfaceScreenOn() in release().

Change-Id: I3e5db322f0abce0cd37320a103015ba72dffa64f
When DPM is updated while lock screen is inhibited, don't
unconditionally enable lock screen.

Change-Id: Iab2af06eb8e41fbcfc6adfbeb5b42a9bbf446fe9
Pick default interface for upstream.

With multiple upstream interfaces active and connected,
we should choose the default interface for upstream.
CRs-fixed: 461266

Change-Id: Ia3bc32300a1f77f46237994d0e38e9c9886f4bea
DO NOT MERGE - Fix improper declaration/use of pointer.

https://code.google.com/p/android/issues/detail?id=61547

This variable is shadowing the outer "ptr" declaration, resulting in a
potential NULL pointer being passed to the message API.

Change-Id: If96bfae8d5e874e12597182678a180ba137b78da
MediaDrm#mNativeContext is a long, not int.

Therefore, we must use SetLongField and not SetIntField.

Change-Id: I2a805dd6b7c8e4905e742d8632d941f381a05930
Don't pseudolocalize untranslatable strings.

bug: https://code.google.com/p/android/issues/detail?id=63004
Change-Id: I8e47a53d887144dc867111e42313d0e113b83ea1
Clean up native AlarmManagerService tabs/spaces and unused parameter warnings

Change-Id: I64da1437dd0ed30957b43450c72b9d3797112a2e
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Fix to NullPointerException on move back in ActivityStack.

In ActivityTask.moveTaskToBackLocked NullPointerException may occur
when moving back with only current Activity in stack. This due to a
condition that may trigger despite a TaskRecord being null and then
attempt accessing the TaskRecord.mOnTopOfHome variable.

TaskRecord task may be set to null when no resumed activity remain.

Resolved by assuring that flag mOnTopOfHome is instead set to false
for current TaskRecord in case where there are no remaining activities
above home.

The above bug has already been corrected in the following commit,
ada62fca51d314cefe2c5da4e007df5b9abf320d, but it does not set the
cottect value to mTopOfHome for the current taks, see below.

Variable mOnTopOfHome will not be set to false in situations where
stack is of size 1 or less and task is null, perhaps from already
having finished current activity.

To avoid current TaskRecord maintaining value mOnTopOfHome to true
after launching Home this variable is set to false.

Impact should not be major due to correction earlier that makes sure
that there is always a TaskRecord.mOnTopOfHome set to true above Home
activity but if not correctly set for current task still gives a
possibility of bad behavior.

Change-Id: Ie86ad99c188aaa05b0de9d58eaa16c42b6fc4341
Fix one and hide the other warnings from core/jni

Most of the warnings are unused parameter from skia functions.

Change-Id: I9df57718d117c26b96163f751ccb056ca86ac072
Don't try to set service.bootanim.exit

init has never allowed the bootanimation code to
set service.bootanim.exit, and has always generated the
dmesg error message

  <3>[   17.644615] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

Since setting this property has no effect and never worked, delete
the code which tries to do it.

Change-Id: Idacc5467d85479a8cf974702af8895011be585ea