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
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
[ActivityManager] Fix race condition in pss collection

Symptom:
There has a race condition that two threads are accessing
the mPendingPssProcesses simultaneously. One of the thread
is collecting the process pss by looping the mPendingPssProcesses.
The other thread is requesting to collect pss of all processes,
which clears mPendingPssProcesses and adding processes back.

Solution:
Avoid race condition by adding synchornized protection.

Change-Id: Ifb090eda9c4a1b8e3fd980fe0171e9dd77773b46
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