Speed up orientation rotation
services: don't clear wallpaper when SystemUI
disconnects.

When we restart SystemUI (or the user), sometimes
the wallpaper would get cleared. This patch just
captures its originating component and
if that is our SystemUI component, ignore the event.

Change-Id: I3e159dc2c013e7d7e552e3c0cef55e3ab970ca87
Signed-off-by: Roman Birg <romanbirg@gmail.com>
StorageManager: fix android.process.media process stop while plug a discontinuous partitioned SD Card

While get volume state, throw an IllegalArgumentException, catch
this exception in StorageManager and return null to MtpService to
avoid process stoping.

Change-Id: Iebb5c38e375d3f54505d9b9d64fcd0f02a2b60c1
Author: Li Gang <gang.g.li@intel.com>
Signed-off-by: Li Gang <gang.g.li@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47459
Correctly set the animation flag of the ActionBar

Showing/hiding the ActionBar is intentionally done without any animation
when done while the Activity is not visible (between onPostResume and
onStop). The issue is the animation flag was not set at all when the
ActionBar was initialized (i.e. getActionBar() called) between these two
lifecycle methods (because mActionBar was null).

A temporary solution is to call getActionBar() to initialize the
ActionBar in onCreate().

This patch simply keeps a flag of the current animation state and
update it whenever the ActionBar and/or the flag has been modified.

Change-Id: Ia28c62410691e95b823d907de0279edaf0592f21
Fix NPE in ConnectivityService

Could occur when requestRouteToHostAddress is called on a network
with no associated tracker.  Code later in the method handles
this case gracefully but code introduced in JB throws an exception.

Change-Id: I6c8a0e313ecbcca120aeb5dd0802a72114749aa1
Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter

Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present.

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

Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246
Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
Fragment animations are not being saved across configuration changes

As per comment #5 in issue #25994:

The problem here is not that the state isn't saved and restored, the problem is how the BackStackRecord is rebuilt.  The ops themselves do save and restore the state, the problem is in BackStackRecord#addOp.

    void addOp(Op op) {
        if (mHead == null) {
            mHead = mTail = op;
        } else {
            op.prev = mTail;
            mTail.next = op;
            mTail = op;
        }
        op.enterAnim = mEnterAnim;
        op.exitAnim = mExitAnim;
        op.popEnterAnim = mPopEnterAnim;
        op.popExitAnim = mPopExitAnim;
        mNumOp++;
    }

The enter, exit, popEnter and popExit animations are overwritten with whatever is currently in the record, which during the restoration process these are 0 so the values which were saved in the ops is lost.

Change-Id: I095cc7ff4ae65581d728f34217fb873ad2f0c574
NotificationManagerService: notifications with icon==0 are FINE WITH US

This warning reminds me of that saying about squeaky wheels... "the squeaky wheel gets PUNCHED IN THE HEAD"

Change-Id: I3e1a1e55ce3ce1f70c7b187a237625257bdbd591
Signed-off-by: pcarenza <pcarenza@gmail.com>