server: Treat non-default route as host route

When constructing ip route command in addRouteWithMetric,
we used to check whether the given route is a host route.
In some cases, the isHostRoute() check can return false for
non-default routes. To make this check more foolproof,
check whether a route is non-default in order to treat it
as a host route.

Change-Id: I5e396e67e1c82bbe22600c47f1e52cc7c750cdc6
(cherry picked from commit 6ca9b98b43ab2eb9715227988b5a7744469d4110)
Bluetooth: Fix to avoid framework reboot during monkey.

A case where monkey is running & sometimes framework is
disconnected due to unhandled java Exception during the
unbinding of HID device service on unsuccessful unbinding.
Handling java Illegal Argument exception while unbinding
HID device service solves this issue.

Change-Id: I61a5620e756119d25f2a235e67d6404b216f4cbf
CRs-Fixed: 601533
(cherry picked from commit b8e044624fba1ff88e75be931e1a5d842d8c02d2)
ProcessCpuTracker: Fix ArrayIndexOutofBoundsException in tempSpeeds

If time_in_state file is not available mCpuSpeeds is created with size 0
and subsequent call if the file becomes available there is an
ArrayIndexOutofBoundsException.
This change avoids the crash by breaking out of the loop, also adds error
logging

CRs-Fixed: 553569
Change-Id: Id5e219ca1cd3f058f714aecd5902ec2f6c11ae03
(cherry picked from commit 8427f34c9a5cafbc19d3b7ccd3dde31f78af60d1)
[1/3] frameworks/base: Add NFC polling setting

Change-Id: I29b4a49d846da3b8eebf6c92cc3745f035034603
(cherry picked from commit ac70fff1ee605a8c0ed018492a9b7c356eda588b)
add a varaible
(cherry picked from commit 514ffb683718495ab5fa47f1913012aa2a218cdc)

(cherry picked from commit e8c960f363c3e907fab777c69094700fac119c2c)
(cherry picked from commit 65225b4942cc8e1aab2d5b547e08923cca4231da)
(cherry picked from commit c40bca4dfc66a8247aacae92e0af93efc4247dfe)
(cherry picked from commit 99813682e4b31846d56f3b24882d00e9c5ba65de)
(cherry picked from commit a96cb07f86ddb9902bfe1959a90c2c0418b36f54)
(cherry picked from commit 552ad00594d3ceb7d4e83134e2769155fa5f19ef)
(cherry picked from commit 9326a18876ceda2c6e9af093165a374f62f5add0)
(cherry picked from commit 8cd83006f5e130425ae247efc185d39b95eff71c)
(cherry picked from commit 28dc8834e555c231b0c935ee414d311f84471e20)
(cherry picked from commit bd8453cd99b9aea48567ee80c873f574663d4bc7)
(cherry picked from commit 769f2c6650085969c98bc1d82f21f343e883a43a)
MediaFocusControl: Do not grant audio focus if notification stream is 0

Previously audio focus would be granted regardless of notification volume, meaning
that if notifications are muted the media stream would still be dimished for focus.
By checking if STREAM_NOTIFICATION is 0 and if a notification stream is
requesting focus, this no longer an issue.

PS1: Initial implement
PS2: Better implement in MediaFocusControl
PS3: Whitespace

Change-Id: Ie10a64e58ce77174a3bbdeaa936646d40c24404f
Signed-off-by: Evan Anderson <evan1124@gmail.com>
(cherry picked from commit e303cb2000f3ceb674863459b895c6021795dd66)
(cherry picked from commit 1c89a593d62e1b8a37c71eee43a2c40b0b517f66)
(cherry picked from commit 0dd8976d6b5c400a483c7aef71ab7bbc17318bb7)
(cherry picked from commit f4972861699b7aff119c4905aa7cd26d3347a037)

Conflicts:
	media/java/android/media/MediaFocusControl.java