SystemUI: Modify AOSP EL translation

It's too long to fit in the QS tile

Change-Id: Ib9c64c8b15909de629a70ede10777d06a416b715
Network: Check parameter for NULL in isMmsRequest method

It's the NullPointerException which causes the third part
application can't work normally. It happens when the third
part application calls execute in AndroidHttpClient.java.
The parameter may null when calling checkMmsSendPermission.

Add extra judgement to avoid NullPointerException for fixing
this issue.

CRs-Fixed: 584775

Change-Id: I1db5160952f1effeff7c35b10ae26656dfe476d8
ActivityManager: support new free memory estimate

Add support for a new free memory estimate which
instead of using the PSS of cached apps uses the
private dirty and private clean memory of cached
apps to estimate their size.

This new free memory estimate is more accurate
because it doesn't count the shared memory used by
cached apps which doesn't tend to be returned to
the system when cached apps are killed.

The new free memory estimate can be seen by using
the -f option with the dumpsys meminfo command.

Change-Id: I11d326f7937af79b7e909cbfa5eed568f26f7b34
[ActivityManager] Finish the failed-to-pause activity

Symptom:
In some scenario, the mPausingActivity may be replaced by other activity.
When previous activity paused, the completePausedLocked() won't be invoked
because it is no longer the mPausingActivity. If the activity is also
pending to finish, it would never be done because the activity kept in
PAUSING state. Since the activity's window also remain visible and is
above on Wallpaper, user would see it when back to home.

Solution:
Finish the failed-to-pause activity if the activity is pending to finish

A Real Case:
(1) Screen turn off
(2) The top activity T1 crashed
(3) When finish activity T1, the next top activity T2 will be scheduled
    to resume and pause (due to screen off).
(4) The activity T2 is also set to finishing due to T1 crashed.
(5) Before T2 paused and before paused timeout occurs, there has a new
    process started which brings up the next top activity T3 to resume
    and pause. So the pausing activity is now replaced.
(6) When activity T2 paused, it cannot completed the pause operation.
    T2 will remain in PAUSING and finishing state with its window visible.
    The process won't be killed because the oomadj stays at 1 (Visible).

Change-Id: Ib10fded891b21c774b26a93071c717fa50516e22
ActivityManagerService: Penalise large apps going to background

Large applications (PSS more than a given threshold) when closed are
penalised with higher ADJ. Now, they will be more prone to be killed by
lowmemorykiller during memory pressure levels. This ensures better app
concurrency and improved subsequent latencies as it leaves some more room
for other smaller bg apps to be alive

Change-Id: I448fa12f55370949b22075595cd75b9c29e5d4b5
lowmemorykiller: Overwrite LMK parameters for low-tier devices

LMK parameters calculated by default algorithm were not optimal for
low-tier devices. Values mentioned here were well tested and
evaluated w.r.t memory and performance for such setups.

Change-Id: I40ed92d204aae6e758028ea1e9bd4ec7226dbe2b
SystemUI: Update user name timely when delete the user contact

The user name isn't updated timely when delete the user
contact in contacts.

Update the user name timely when receive the user info
changed event.

CRs-Fixed: 673195

Change-Id: I30d694b0f4486cb00f26542ef3bc54b5825373c7
Recents: allow apps to be excluded from removing all apps

Long pressing a recents entry allows to exclude an app from
being killed when pressing the remove all button.

Manually swiping away will still be possible.

Change-Id: Ic6105dc0208a21f587186e3a173cdd78b3c6ef34
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Merge remote-tracking branch 'upstream/android-4.4' into android-4.4