Do not always call setIsConnectedToProvisioningNetwork(false)

Previously I was calling setIsConnectedToProvisioningNetwork(false) always,
but all MDST's receive every broadcast. Thus we could over write an MDST's
mNetworkInfo.mIsConnectedToProvisioningNetwork to false, unless the MDST
that was set to true was last, i.e the code was order dependent.

If the provisioning networks value was false instead of true
when handleMobileProvisioningAction was called we wouldn't invoke
mdst.enableMobileProvisioning because network info would be null.

Thus the provisioning network would never transition to CONNECTED and
a default route wouldn't get setup and the browser couldn't access the
website.

Now setIsConnectedToProvisioningNetwork is only set to false when the
apnType matches and we won't indiscriminately change it and are not
order dependent.

Bug: 10853805
Change-Id: I68a4f9bdf5dc18d90f4cdef7a60811f57be67261
frameworks: Animation control

Allows setting of some system animations based on AOKP's custom
system animations by stevie spear and listview animations plus some
extra stuff.

-Vanir

Change-Id: Id360abe158d36ab85c1c0d0103428d4a8867e70c
Reduce EntropyMixer seed size from 4096 to 512 bytes.

The suggested seed size from Linux drivers/char/random.c is 512 bytes
rather than the 4096 bytes currently used.

Change-Id: I3dd55105f0a95ce9cda34b4cf08987b8a28c4ac9
Merge "frameworks: Animation control" into jb43
Privatize PhoneWindowManager

on my gen2 N7 this lowered system memory usage by 50-100 mb

PS2: move hardware key stuff to it's own observer

Change-Id: I9872c32c695abad56cd07f50893fa7eda645c5b2
Allow building with unmodified CM device repos' overlays

Change-Id: Ic8f4b8ffa5374931c5d7f13e3f893869df1db187
Disable touch while using the stylus (Galaxy Note)

Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Change-Id: I9f458d85d8bf83d6cf03b467d46ce066fd55b7e0
input: Add option to toggle pointer icon when using stylus

* The visible pointer icon when hovering or drawing with the stylus is
  quite annoying when trying to actually draw with it. Turn it off by
  default and add an option to turn it on.

hange-Id: Ib7f23e8b69589e3f875d150caf05065b64676e44

Conflicts:
	services/input/InputReader.cpp
	services/input/InputReader.h
	services/jni/com_android_server_input_InputManagerService.cpp

Change-Id: I8792cd35fa9768c726dfef151184f09fe6d1047e
Signed-off-by: DHOMD <DHO@dho.im>
Merge changes I9872c32c,I3dd55105 into jb43

* changes:
  Privatize PhoneWindowManager
  Reduce EntropyMixer seed size from 4096 to 512 bytes.
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
p2p: Fix for discovery failure until AP is connected in WFD client.

When station is connecting to AP i.e wifi state is either
connecting or obtaing ip address, Wi-Fi state machine will
send BLOCK_DISCOVERY event to P2P service manager and discovery
is postponed until DHCP success/failure. During this if we
receive DISCOVER_PEERS command then p2p service manager will
return discovery failure because "mDiscoveryPostponed"
variable is not getting updated properly due to improper
condition checking.

To mitigate this issue modified the conditions to update
the variable "mDiscoveryPostponed".

CRs-Fixed: 532138
Change-Id: Ie92a42b17d264cfca5ec2af2dfb4db542deddaac