Add the calling package name to requestRouteToHost

The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules...

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405
Only allow System apps to make VPN exempt routes

requestRouteToHost will only allow system applications to make routes
exempt from the VPN's routing rules.

If a VPN is currently running and a non-system app requests a route it
will only succeed if that host is currently covered by a VPN exempt
routing rule. Otherwise it will fail.

For example, if a VPN is running and the MMS network is brought online
those routes will be added as VPN exempt. If an application then tries
to request a route to a MMS endpoint it will succeed because the routes
already exist. If an application tries to request a route to a host
covered by the VPN the call will fail.

Bug: 12937545
Change-Id: If7bcec91bbb96c62c8fb69748c975847e6c00b6f
Update LinkProperties with MTU value

Use the MTU provided by network as part of Data Call Response.
If it is not present, use the static value from config file

Change-Id: I9d03cc9b355d09a93883fbf4ddc93fae0077641c
CRs-Fixed: 634747
Connectivity: Set TCP delayed ACK and User Configuration Flag

Provide a Mechanism to set tcp delayed ack settings from
Connectivity Service. The tcp_use_userconfig flag is set to
override the default tcp delayed ack configuration in tcp stack.
tcp_use_userconfig flag is reset when the TCP stack is required
to use default delayed ack settings. Currently the delayed ack
settings are overridden for Wifi and LTE networks only. Other
network types continue to use default delayed ack settings

Change-Id: I282ef0f6b6278b6efcef3870242974f7ee93e508
CRs-Fixed: 628139
services: change default sampling interval to -1

Change default sampling interval to -1 to avoid sampling to resolve
power consumption issue. Original implement will keep UE wake up every
12 minutes, which will cause issue when doing power standby test.

Change-Id: I018e22a44259e94bce87ceaf04ff523f035183f8
[1/2] base: Add Haptic Feedback to quicktiles

Change-Id: Ia3bbb6ef90a9f7b3cf45c341d3b95eb131a96694
Revert "[3/3] AudioEffect: Add a stereo widener effect"

This reverts commit 5a1414c53f81118a35e8fb22231dcdd8ae335515.
Revert "[3/3] AudioFX: Add center frequency param to bassboost"

This reverts commit e6b968b3bdf549ac65d70c21e937104a052dd38f.
Tunning max allowed background services

The serialize running of background services feature
delay some services startup when system bootup, and
lead some abnormal behaivor at the early of system startup.
Tunning will be disabled after system complete bootup.

Change-Id: I834607d9156253bee13848586a8136e24760fdf4
SpellChecker: bound check for string end

Check whether spell check result is out of end of string
Use strict one to avoid IndexOutOfBoundsException.

Change-Id: I6acac77e1e9750258ed364817a8615a6f56bebe4
[ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front.

Symptom: ANR occurs on previous activity.
Root Cause:
In KK, when a background activity starts another existed background activity (bring to front),
if current focused stack is not the same as the stack of target starting activity,
it will still resume the top of target stack, even the top activity on the target stack may not the same as target activity.
And it will result incorrect focus, press back key will send to previous stack's top then popup ANR on previous activity:
"Reason: Waiting because no window has focus but there is a focused application".

By original code comment, it looks 'bring to front' should not happen in this issue case.
// If the target task is not in the front, then we need
// to bring it to the front...  except...  well, with
// SINGLE_TASK_LAUNCH it's not entirely clear.  We'd like
// to have the same behavior as if a new instance was
// being started, which means not bringing it to the front
// if the caller is not itself in the front.

If the caller and target are in the same stask, it will just deliver new intent without changing task order (the same behavior as JellyBean).
So the patch concept is just to avoid to use target stack to resume top when caller and target are in different stack.

Solution: Do not allow to resume another stack top if non-top activity try to bring existed activity to front.
It may not be a good solution, just a reminder for the issue case.

Reproduce steps:
Assume A, B, C are different app tasks.
When the application stack is like:
  Top C
      B
      A

 #Case 1: Home is foreground
  A starts B with NEW_TASK, C will resume, focus still stays at Home, and window order does not update.
  Then press back key or volumn key will result ANR on Home.

 #Case 2: App is foreground (Resumed activity is C)
  A starts Home, Home will resume, focus still stays at C, and window order does did not update.
  Then press back key or volumn key will result ANR on C.

Change-Id: If05070123b248e2335791e43a4d4ddee6db11d84
UserTile: Fix displaying user information for multi-user devices

In commit 89ab0eb097322ac8eec40159b888dfb03b9413e9, we improved
the handling of single user devices but appear to have also
entirely deleted the name / avatar for multi-user devices.

This commit restores the deleted code for multi-user devices.

This fixes CYAN-4023.

Change-Id: I69fe1504da2b32cd5bf0fdc87f8f78c960e9c77f
MediaFile: support more media types

Change-Id: Ib3109c5ebc762b97e45bd0bb5fa82ad77b0e6822
CM11 Themes: Ensure customTheme is not null.

The configuration retrieved via getConfiguration() sometimes contains
a null customTheme which results in the theme returning to holo when
applying a component such as icons.  Icons will change but styles
and fonts would return to the default.

Change-Id: Iac0cb8eed5de8fdc9fe8efd697d968f26e801c08