fb: fix recents animation on new immersive mode

thanks here as well for identify the problem to Kiril.
But I changed the implementation. Beside that we give the user
the ability to setup different navbar heights IMO there is absolutly
no need to use an observer to get the status. We can fetch this
from WindowManagerService to get all needed information.

So at least this patch fetches needed values from WindowManager
and calculates in the missing heights

Change-Id: I3ae57ba0a575624f8aea75ce8d48041f5a1c1c42

Conflicts:
	core/java/android/view/WindowManagerPolicy.java
Fix to NullPointerException when activity is relaunched

When ChooseTypeAndAccountActivity is relaunched and resumed
by ActivityManager a call is made to onActivityResult without
first triggering onResume. This leads to mAccounts object
still being null.

Fixed by properly setting mAccounts object if it is null prior
to use after function onCreate has been called.

Change-Id: Ife7e1e052c473970d923fa43ee6189eb62a1113b
Keyguard: Set WIDGET_CATEGORY_KEYGUARD when AppWidgetHostView is created

Allows the default lockscreen widget to inherit the keyguard widget
host category.  Without this, only widgets added through
KeyguardActivityLauncher are assigned the correct
OPTION_APPWIDGET_HOST_CATEGORY.

Change-Id: Ic97818d85ca5f00da0ce43bb36006d66a6935363
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
Remove possible leak when exception occurred.

nameUtf8 is not released after exception.
In addtion, Fix code going down after ThrowException.

Change-Id: Id46e8ed55acd98e982ae532f7da2c0c48847f010
Wifi: Fix for connection failure between third client and GC.

When third device sends a connection request to the group client, the
existing connection is terminating and also the ongoing connection not
successful.Currently as there is  no use case where third device is
connecting to GC,and the existing onnection getting terminated.This
is addressed by ignoring the new connection request from third client
to GC and the existing connection is intact.
CRs-Fixed: 467049

Change-Id: I784c38b9a4ca0c60b188b9697e3b4af4d09053cc
SystemUI: Add missing recycle calls

Change-Id: I6e5346d9f423350e643d696299136799b78cdd28
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
Update the layer's alpha value upon composition of the layer

Fixes: This patch makes sure that the layer's alpha value is
up-to-date and does not reflect the previous view's alpha value.
it fixes the square block on marquee fading edge when text view
is applied transparency.

Change-Id: I110649db72a75fecc02ba56c201a05773f80328c
Memory leak in IInputMethodSessionWrapper executeMessage

In some cases the executeMessage is called with
mInputMethodSession == null. For the messages

DO_UPDATE_SELECTION, DO_APP_PRIVATE_COMMAND

memory is leaked. This commit recycles the args freeing
the allocated memory.
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
Fix a JNI local reference leak in JNIMediaPlayerListener::notify.

Bug: https://code.google.com/p/android/issues/detail?id=62137
Change-Id: I776cd83a66de37fdbbe8af367bf1b26e5e0c7247
SystemUI: update internal state right after hiding transient bars.

Change-Id: Ibcdc45bbf1ce8561fae50f1e026552dbcbcc80ae
Keyguard: smooth background change.

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d
Fix a programmatic smooth scroll bug

Bug: smoothScrollToPosition() stops at child view of which height is
higher than list view itself.

Change-Id: I695ca9db4c706aa7f365967dd3916f9a01917346
Signed-off-by: Yongyi Li <yongyi.li.cn@gmail.com>
Clear recents screen