Prevent EventHub from adding input device twice

When Android first starts up, it scans /dev/input for input devices.
In some rare instances, the EventHub gets another notification that
some device nodes are created. It then proceeds to add the same
input device again. This causes the system to get two events per
touch or key stroke.

This adds a check to prevent adding the same device if the operation
is triggerd by inotify.

Change-Id: I68b02594f1c7f14067611735db0b3763378ec7ea
Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com>
IntentService: Fix to run with a lower priority flag.

Added extra contructor to start IntentService with a diferent priority.

Change-Id: I4224ca56ae7eee2c099140bf0242be33b8690ad8
Signed-off-by: Gonçalo Ferreira <monxalo@gmail.com>
Fix one wifi and ethernet concurrency bug

enable wifi and connect to a AP while ethernet cable plugged in.
wifi will be teared down.But driver is not stopped.After unplug
ethernet cable.It will failed to auto reconnect wifi.fix it here.

Change-Id: I1b0156cf89f26747ce67ebad2b4138e8d61f30df
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Prevent MediaScanner infinite loop with invalid path

including double slash  "/storage/sdcard0/xx//xxx/xxxx"

Change-Id: I112a70c88b5ec662482b79c3151310b9b9b52e40
framework-res: Remove gingerbread scrolls

Change-Id: I74dbac134c701c7b0253130191ad4d9e3519b097

Conflicts:

	core/res/res/values/themes.xml
fix Typo on OpenGLRenderer (libhwui) Properties

See: http://code.google.com/p/android/issues/detail?id=60165

In file

https://android.googlesource.com/platform/docs/source.android.com/+/master/src/devices/tuning.jd

Line 109 says property is called "texture_cache_flush_rate" however in the code it is called "texture_cache_flushrate". See that in file

https://android.googlesource.com/platform/frameworks/base/+/master/libs/hwui/Properties.h

Change-Id: I4b6aff888608e9d7c9de66421f68114081250b9b
SystemUI: Ignore lint check ProtectedPermissions

Change-Id: Idf8ccd37cfb02e6da136187eb872e97e22b158e6
SystemUI: Remove obsolete layout params (fix lint warning)

Change-Id: I41f688c9a351189c9929dc1f4947c0124820f5ad
Frameworks: TRDS new 4.3 png's

Change-Id: I1aab6a5d0e1c5e5f015a48060ead36a656c50941
Fix clock AM/PM error.
Some countries time format is [ah:mm] or [a h:mm].

Change-Id: Iab3912f525f4417c9c7e0b154f4f76a807dd847d
Bluetooth: Support  HFP Client role on Bluedroid.

Implementation changes to support HFP Client role
on Bluedroid stack.

Change-Id: Ie37e95d3b0e3f785af818fb495c835e420792f4d
server: add enhanced routing support

Add support for policy and metric based routing APIs to
NetworkManagementService. This functionality is used for WQE, IMS, and
Android QoS features.

Change-Id: I5e50185c9ac1cf72c9366815c2ecf590842edfca
frameworks/base: IPV6 tethering support

This patch adds two new API calls addUpstreamV6Interface and
removeUpstreamV6Interface to the tethering framework to pass the IPv6
upstream and downstream interfaces to netd if IPv6 is available.
Required to enable ICMPv6 forwarding.

Change-Id: I1f4f6284b2f152d8b4f0fbd02ac5a17f57c71dd7
Revert "wifi: Get full scan results"

This reverts commit b301684e954b6a1659bf7395b1732b658f2fc27e
CRs-fixed: 509553

Change-Id: Idafcf1ae25c2b9af42f71ee417cf73601c3199a7
wifi: LTECoex changes for SAP/P2P

Restart sap/P2P GO with safe channel list received from android
telephony layer, whenever sap/P2P GO is operating on an channel
interfering with LTE.

Change-Id: I3f5da86374dcb542ab4f11ac755eca0b2dc067c1
CRs-Fixed: 510273
P2P: Set wifi preferred channels when the supplicant is started.

Set wifi preferred channels when the supplicant is started, if
there are any safe channels from the previous LTE event received
from RIL. This is to ensure that p2p GO is always started on one
safe channels.

Change-Id: Ib0c36dbc4dfdec3721adb2f72d604158eeff9a87
CRs-Fixed: 523207
wifi: Fix for connection between GO and p2p device

When GO sends an invitation request to the p2p device without
persistent profile, GO gets an invitation result=8 which means
unknown group, when GO receives invitation result 8, its tries
to remove persistent profile of the client but it will not be able
find the profile so it does continue with sending the invitation
so the connection fails. To address this, ignore if there are no
persistent profiles found for the client and continue with sending
the Invitation request to the client to make connection succesful
connection. As GO has single profile saved unlike client which
saves multiple profiles of GO.

CRs-Fixed: 511282
Change-Id: I78f54d4bb2f0d603bc2170ec2c3ef55a91050236
Show PIN on Peer device on receiving PIN display request.

P2P provision discovery would request the peer to display a PIN.
The PIN is displayed handling the request, the PIN need to be
entered on keypad of requested peer device to achieve the
connection.

Change-Id: I8b6487681d78eb10c558983a08dec1ac8a8eee65
CRs-fixed: 382608
P2P: Fix for GO inviting a p2p device.

A p2p device on an invitation request from the peer invokes
p2p_peer command to know if the peer is a p2p device / GO.
Due to the cached entries there would be a possibility of
not getting the updated information, ending up in the wrong
negotiation with the invited peer. Thus do not rely on
p2p_peer command, rather assume that the peer is a GO on an
invitation request, provided there is no persistent network
configured.

Change-Id: Ic70c4147d8b34bcddf4bf70811a5aeb4ea0650bc
CRs-Fixed: 486437

Conflicts:

	wifi/java/android/net/wifi/p2p/WifiP2pService.java
P2P: Do not restart SAP/P2P Go if its operating in 5G.

In case of LTE Coex since RIL always passes 2.4G channels,
if the SAP or P2P Go are operating on 5G channels when LTE
is camped, no need to restart SAP or P2P GO.

Change-Id: I5b0b5452a94bcbc0beeb44b25c34daf9e17ee482
CRs-Fixed: 531439