Commit Graph

2058 Commits

Author SHA1 Message Date
The Android Automerger
723341008d merge in master-release history after reset to eebaf6c4eceb7c906531dfa46fc093886fb1b3c5 2014-09-01 05:51:25 -07:00
The Android Automerger
8b95722d4b merge in master-release history after reset to eebaf6c4eceb7c906531dfa46fc093886fb1b3c5 2014-08-31 05:51:14 -07:00
The Android Automerger
473531735d merge in master-release history after reset to eebaf6c4eceb7c906531dfa46fc093886fb1b3c5 2014-08-30 05:52:47 -07:00
Lorenzo Colitti
939112e006 Kill the NetworkInfo(int type) constructor. IT'S A TRAP!
This constructor does nothing, including doing nothing with its
only argument. This causes it to return a NetworkInfo for
TYPE_MOBILE no matter what was passed in.

Bug: 16610051
Change-Id: I4ccd5ec050f7824fb06496c00fcd7901defeb7bd
2014-08-29 18:34:49 -07:00
Lorenzo Colitti
d092cb50d3 Use per-Network connection pools for openConnection.
If we don't do this, per-network HTTP requests will go over the
wrong network if any previous HTTP request was made by the same
app on another network.

Bug: 17300006
Change-Id: I1854c16dee6adb9e81fb12b097577439d69a644e
2014-08-29 18:13:19 -07:00
Lorenzo Colitti
860a7aa21a Pass the socket mark for DNS queries to dnsmasq.
This makes tethered clients use the correct DNS servers when
tethering to non-default networks like the DUN APN.

Bug: 16357676
Change-Id: I8933b6de198a92c2aaf0291931ace8966ddba275
2014-08-29 10:21:58 -07:00
Diego Pontoriero
31a5939353 Change TelephonyManager method name to accurately reflect functionality.
Bug: 17163860
Change-Id: I4390d79c49831454146a42b89520a16984c5f260
2014-08-28 13:50:36 -07:00
Robert Greenwalt
ab8e02d0c1 Merge "Clean up Connectivity Logging." into lmp-dev 2014-08-28 16:29:55 +00:00
The Android Automerger
96f87fafc5 merge in master-release history after reset to cd23a9be61a10881833404eb8d032cdad2cc10ae 2014-08-28 05:52:32 -07:00
Robert Greenwalt
419e1b4362 Clean up Connectivity Logging.
bug:17285109
Change-Id: I61b98aa636996f8d4915fd954d49a22c20cfe9ab
2014-08-27 14:49:14 -07:00
The Android Automerger
98700447b7 merge in master-release history after reset to 36bd80025a23f363c1a3b281eebd573073700d5d 2014-08-27 05:52:35 -07:00
Paul Jensen
660ce150ee Merge "Fix to allow removing sign-in notification when network removed." into lmp-dev 2014-08-26 23:58:40 +00:00
Paul Jensen
7844b81ae8 Fix to allow removing sign-in notification when network removed.
When the NetworkMonitor is told a network disconnected and a sign-in
notification has been shown to the user, the NetworkMonitor requests
the notification be removed.  This request goes to the
ConnectivityService who may have already removed the NetworkAgentInfo
from mNetworkForNetId so we cannot look up the NetID in there.
There is no harm in allowing notification hiding for networks that
are disconnected as the notification logic does not effect the
Network state (like the validation message that caused the addition
of the Network liveness check).

bug:17261757
Change-Id: Id0a299e230ae37e641ac2faeebc45550e27c1fa4
2014-08-25 22:45:39 -04:00
Robert Greenwalt
03653b12d4 Merge "Remove listen requests properly." into lmp-dev 2014-08-25 23:12:46 +00:00
Robert Greenwalt
8c5842cfaf Remove listen requests properly.
https://googleplex-android-review.googlesource.com/#/c/527772/
correctly stopped adding listen requests to the mNetworkForRequestId
sparse array, but when we remove requests, if it's not getting
serviced by a network, we don't remove it from the network.  That
means that when we go to send a notification for that network we have
a request affiliated with the network, but don't have data for the
request and hit this NPE.

If it's not a request, don't do the optimization and remove it only
from the network servicing the request, but instead scan all networks
and remove it from each, if found.

bug:17239054
Change-Id: I49165ed08c224ef20f703469f9ce39df5f21b163
2014-08-25 15:42:10 -07:00
Robert Greenwalt
8830c19455 Merge "Update the http proxy on LinkProperty change." into lmp-dev 2014-08-25 19:05:00 +00:00
Paul Jensen
becb073b12 Merge "Remove captive portal sign-in actions." into lmp-dev 2014-08-25 18:52:32 +00:00
The Android Automerger
d4e8a883fc merge in master-release history after reset to a30517e3806c3c83dab975d9d3922064b297cb29 2014-08-24 05:51:20 -07:00
Robert Greenwalt
1f358c86ef Update the http proxy on LinkProperty change.
bug:16308315
Change-Id: Ie44634a9223f289903c09653f77a998d3a344654
2014-08-23 09:51:35 -07:00
The Android Automerger
b1ba477d92 merge in master-release history after reset to a30517e3806c3c83dab975d9d3922064b297cb29 2014-08-23 05:53:09 -07:00
Jeff Davidson
e1dbb17d41 Merge "Allow NetworkRequest release from the system process." into lmp-dev 2014-08-22 16:52:33 +00:00
Paul Jensen
af9351f884 Remove captive portal sign-in actions.
This reverts commit e0101cd and removes the related NetworkMonitor code.
The thinking is the broadcasts are not robust enough as they rely on apps
working together and are not sufficiently tested.

bug:17115050
Change-Id: I433032867cc4fea7191a1b13842b16825dc74df4
2014-08-22 09:42:56 -04:00
Lorenzo Colitti
e1d81d158a Merge "Rework the per-network URL API." into lmp-dev 2014-08-22 03:07:28 +00:00
Lorenzo Colitti
45aca20cd7 Rework the per-network URL API.
This addresses API council comments.

Bug: 17112978
Change-Id: I698b243b2b685d1f25414cee72450be3ae0c2bf0
2014-08-21 19:09:27 -07:00
Jeff Davidson
e7906a962f Allow NetworkRequest release from the system process.
Otherwise attempts to release that are triggered by the binder death
receipient will be rejected.

Bug: 17187437
Change-Id: If3924d82dba69c572708e04c11d17ed25ae6870d
2014-08-21 16:21:29 -07:00
Robert Greenwalt
e2a28e319d Merge "Change the NetworkInfo for disconnected types." into lmp-dev 2014-08-21 21:02:19 +00:00
Robert Greenwalt
88acf6fe01 Change the NetworkInfo for disconnected types.
Don't send out NetworkInfos with UNKNOWN state for disconnected
networks - use DISCONNECTED.

bug:17095670
Change-Id: I863bebadc1f9a666572958b49d5e62809f485e5d
2014-08-21 09:19:46 -07:00
Lorenzo Colitti
209058ec6e Merge "Fix findConnectionTypeForIface." into lmp-dev 2014-08-21 16:08:11 +00:00
The Android Automerger
d3a849a996 merge in master-release history after reset to fbb02b7fa415e38066486503aec09affbd340e92 2014-08-21 05:52:11 -07:00
Lorenzo Colitti
bcc9260028 Fix findConnectionTypeForIface.
This is used by the VPN to notice when its underlying connection
has gone away. I'm fixing this using network types and not
NetworkCapabilities because

1. I don't know of a way to use the new API to get callbacks for
   a specific network. You can get them based on capabilities,
   but it's not clear how to construct a NetworkCapabilities
   object that will only match a specific network, or only match
   the default network.
2. It's a smaller change.

Bug: 15070628
Change-Id: Id6a6a183da83636c0859db4c954093bd684c01ea
2014-08-20 09:11:14 -07:00
The Android Automerger
2669f54007 merge in master-release history after reset to d2d70b5617c9679fd57f117ab7e638a55a36ac32 2014-08-20 05:53:44 -07:00
Selim Cinek
cbec2b12ca Added notification color to all system notifications
Bug: 17128331
Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
2014-08-20 14:25:18 +02:00
Lorenzo Colitti
ef734f8a3b Stop using LinkProperties for static configuration.
LinkProperties can represent way more complicated configurations
than what we can actually apply to interfaces. This makes it
error-prone to use it to represent static configuration, both
when trying to apply configuration coming from LinkProperties
and when trying to save configuration from current
LinkProperties.

Instead, move static configuration (IPv4 only, since we don't
support static IPv6 configuration) into a separate
StaticIpConfiguration class.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
2014-08-19 11:59:43 -07:00
The Android Automerger
27fa996186 merge in master-release history after reset to af06540a9bb81722d04f0bf75b933584be64323a 2014-08-18 05:51:20 -07:00
Robert Greenwalt
debf0e0075 Add tcp buffer size conduit to NetworkAgent.
bug: 16549611
Change-Id: I7d97dedea2c7c1aed2eccb185645889424508591
2014-08-17 15:14:29 -07:00
The Android Automerger
2e94795aac merge in master-release history after reset to c6c643606eba8a85afcfc3c237be426b44d9b8ec 2014-08-16 05:53:56 -07:00
Robert Greenwalt
c2e050b138 Merge "Avoid reusing a currently active NetID." into lmp-dev 2014-08-16 04:32:18 +00:00
Robert Greenwalt
d00f0350c0 Merge "Fix listening NetworkRequests to listen for all networks." into lmp-dev 2014-08-20 20:15:45 +00:00
Robert Greenwalt
06e2be06c2 Merge "Fix CS/NetworkMonitor race." into lmp-dev 2014-08-20 20:15:45 +00:00
Jeff Davidson
d89d8ecff8 Merge "Less intrusive VPN dialog and other UX tweaks." into lmp-dev 2014-08-20 21:47:20 +00:00
Jeff Davidson
6047c1dc68 Less intrusive VPN dialog and other UX tweaks.
-The ability to launch VPNs is now sticky; once approved by the user,
further approvals are not needed UNLESS the connection is revoked in
Quick Settings.

-The old persistent notification has been removed in favor of the new
Quick Settings UI.

-The name of the VPN app is now pulled from the label of the VPN
service rather than the app itself, if one is set.

Bug: 12878887
Bug: 16578022
Change-Id: I102a14c05db26ee3aef030cda971e5165f078a91
2014-08-20 16:55:28 -07:00
Diego Pontoriero
b0b5d7eb83 Merge "Change CARRIER_SETUP hook in ConnectivityService to use Aeroshell API for determining carrier app instead of MCC/MNC." into lmp-dev 2014-08-20 21:47:20 +00:00
Paul Jensen
46e129be74 Avoid reusing a currently active NetID.
There are only a limited number (65526) of NetIDs so the chance for reusing
one exists.  Reusing a currently active NetID will cause problems like netd
failures and overwriting entries in mNetworkForNetId.

bug:16815182

Change-Id: Ib75302beae3179c3f3b90c345cf4d2cf5f4ad2be
2014-08-20 19:23:59 +00:00
Robert Greenwalt
a6fd83dc4b Fix CS/NetworkMonitor race.
If we have a message in flight about a NetworkAgentInfo when it gets disconnected
we are left with a zombie network.  Fixes this by verifing the network is still
live before we process the msg.

bug:17142206
Change-Id: I2c94a39b3ea97c1562066571b277280c1f69f71c
2014-08-20 09:30:15 -07:00
Paul Jensen
bbfdfb007c Fix listening NetworkRequests to listen for all networks.
This is a small change but should fix a number of functional problems:
1. When registering a listening NetworkRequest and when a Network is
   validated, we should always add the listening NetworkRequest to the
   Network's list of NetworkRequests if the Network satisfies the
   NetworkRequest.  Previously in both cases this was only done for
   the highest scoring network.  This enables the listening
   NetworkRequest to listen for all networks, not just the highest
   scoring network.
2. No longer add listening NetworkRequests to mNetworkForRequestId as
   it doesn't make sense as it's a 1:1 mapping but listening
   NetworkRequests to Networks is a many:many mapping.
3. Don't "keep" a Network that's finished validating when only a
   listening NetworkRequest requests it.
4. Don't send updated scores to NetworkFactories from listening
   NetworkRequests.  NetworkFactories and NetworkAgents shouldn't
   concern themselves with listening NetworkRequests.

bug:16680764
Change-Id: Iaba14263227771e4bd84ee4bce488beaef20a8a3
2014-08-20 14:46:11 +00:00
Robert Greenwalt
22d0c6ce52 Fix a logic error so mtu works.
bug:17046179
Change-Id: I744a2fd425627da16d9779df3a96541506e0b6b3
2014-08-15 17:53:05 -07:00
Robert Greenwalt
36a05df3f3 Merge "Configure MTU based on network MTU parameter" into lmp-dev 2014-08-15 19:10:34 +00:00
w19976
e714f1daa6 Configure MTU based on network MTU parameter
Add logic to obtain the mtu from the network PCO parameter and set it to kernel
when the mobile data connection is established. When there is no PCO mtu configured
from the network, the mtu size defined in the corresponding APN will be used. In case
no mtu size is defined for an APN used for data connection, the MCC/MNC based MTU
defined  in the framework overaly will be applied.

bug:17046179
Change-Id: I6465d4b8f2076aaa380ae3617fb3f24adbe136d4
2014-08-14 20:34:13 -07:00
Jeff Sharkey
f2ceed8a54 Some networks may have null ifaces, I guess?
Seems like a bug further upstream, but guard ourselves against it
for now.

Bug: 17033841
Change-Id: Id0e5895c3389b63d4e34b1fb064efef8b72cd609
2014-08-14 22:42:27 +00:00
The Android Automerger
c865be34be merge in master-release history after reset to 5cf541805d4187ba3d84378a02dbec2dc3ba6907 2014-08-14 06:04:12 -07:00