Commit Graph

1022 Commits

Author SHA1 Message Date
Robert Greenwalt
7922764bb5 am 81371b98: (-s ours) am 64e02e64: am 5a1519f8: DO NOT MERGE Un-deprecate getDhcpInfo
* commit '81371b981e192f1848d355338c376a6bcd4ff532':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:11:00 -07:00
Robert Greenwalt
319323d7b0 am 8fbc8797: (-s ours) am 202965ca: am 5b41b261: (-s ours) DO NOT MERGE Un-deprecate getDhcpInfo
* commit '8fbc879773a7163fc2f97d6a6612dfb3167ad7f0':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:10:57 -07:00
Robert Greenwalt
81371b981e am 64e02e64: am 5a1519f8: DO NOT MERGE Un-deprecate getDhcpInfo
* commit '64e02e64341d33edda1d0ec28d5394c8d0d6509e':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:03:59 -07:00
Robert Greenwalt
8fbc879773 am 202965ca: am 5b41b261: (-s ours) DO NOT MERGE Un-deprecate getDhcpInfo
* commit '202965ca2a6cd02840581813f2b60660c71baf60':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:03:56 -07:00
Robert Greenwalt
64e02e6434 am 5a1519f8: DO NOT MERGE Un-deprecate getDhcpInfo
* commit '5a1519f8d1ff7e9623a347ca138ca925e07844cd':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-04 14:17:18 -07:00
Robert Greenwalt
202965ca2a am 5b41b261: (-s ours) DO NOT MERGE Un-deprecate getDhcpInfo
* commit '5b41b261dbef993bab7a68f61088274a977f345e':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-04 14:15:52 -07:00
Robert Greenwalt
5b41b261db DO NOT MERGE Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: I0c91716d9aae61dc1db4d015a78b729157ea99a9
2013-10-04 18:43:29 +00:00
Robert Greenwalt
990c224ffa Merge "Un-deprecate getDhcpInfo" into klp-dev 2013-10-04 18:07:34 +00:00
Robert Greenwalt
939def7d91 Merge "Don't redirect dns to an iface without dns servers" into klp-dev 2013-10-04 18:06:13 +00:00
Robert Greenwalt
50df961cca Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: Ibe981ae90e1c6c2f1b65fa225443ae4cc92c2a3a
2013-10-04 09:53:39 -07:00
Robert Greenwalt
5a1519f8d1 DO NOT MERGE Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: I0c91716d9aae61dc1db4d015a78b729157ea99a9
2013-10-04 08:19:37 -07:00
Wink Saville
a65f473111 Use networkType to display wifi and mobile notification separately.
There are two bugs one is I was clearing the notification in
CaptivePortalTracker when entering the ActivateState. (double check
according to bug 5021626 we should be calling enter)

Second is we could have the need to display both icons but can't
because we only allow one.

The solution I'm proposing here is to allow two notifications and
have then controlled separately.

Bug: 10886908
Change-Id: I30e7130bc542535492d175640a4990c592f32806
2013-10-03 08:34:46 -07:00
Robert Greenwalt
68534c89f7 Don't redirect dns to an iface without dns servers
bug:10115444
Change-Id: Ide42072bb3aae21f8e99c11c2de263e9a765b911
2013-09-25 16:58:45 -07:00
Wink Saville
ab773a7b89 Tighten condition for calling checkMobileProvisioning.
Add the condition that the connected network needs to be TYPE_MOBILE.
This eliminates checking on connecting to secondary networks like
FOTA, MMS, SUPL ...

This reduces unnecessary attempts to bring up multiple connections at
the same time. Especially in the light of the trouble we're having with HFA
on Sprint, where we don't want to connect to any other network until HFA
has completed.

Bug: 10758001
Change-Id: Id294536b70304a51de4752bc1a4ffac734f10f1a
2013-09-14 09:04:53 -07:00
Wink Saville
6bcb8cd74a Merge "checkMobileProvisioning should not block." into klp-dev 2013-09-13 20:59:16 +00:00
Jason Monk
c10eef7e3b Merge "Guarantee that PAC Local Proxy owns Port" into klp-dev 2013-09-13 20:31:54 +00:00
Wink Saville
3985671349 checkMobileProvisioning should not block.
In checkMobileProvisioning the call to mdst.isProvisioningNetwork() is
a blocking call and during monkey testing without SIM this is causing
ANR's. Move the initial test for provisioning into isMobileOk so
checkMobileProvisioning doesn't block.

If mobile is not supported return CMP_RESULT_NO_CONNECTION.

Cleaned up some debug.

Bug: 10674404
Change-Id: I10a0e922cd6ea9790f66e2083f37e68cb0a8861f
2013-09-13 12:40:11 -07:00
Jason Monk
af9ded0007 Guarantee that PAC Local Proxy owns Port
This changes the PAC support to not broadcast the Proxy information until
the Local Proxy has started up and successfully bound to a port so that
the local proxy information can be guaranteed to be owned by the proxy.

Bug: 10459877
Change-Id: I175cd3388c758c55e341115e4a8241884b90d633
2013-09-13 09:53:26 -04:00
Jeff Sharkey
4a13f35884 Merge changes Ib1274847,I2eb2a1bf into klp-dev
* changes:
  Fix SDK build.
  Request all tethering interfaces, fix corruption.
2013-09-11 20:16:59 +00:00
Yuhao Zheng
8257936014 Fix for the toggle airplane mode hidden API
Fix to https://googleplex-android-review.git.corp.google.com/#/c/356900/
Previous implementation throws SecurityException when the API is called from apps.
bug:10653570

Change-Id: I95ae6f07db74d881f1a8d3d40a6486105a068e90
2013-09-11 09:44:28 -07:00
Jeff Sharkey
86dc7a89da Request all tethering interfaces, fix corruption.
netd now tracks statistics for tethered interfaces across tethering
sessions, so switch to asking for all tethering stats.  (Currently
we're double-counting all tethering data, ever since it started
tracking across sessions.)

Also catch OOME to handle corrupt stats files, which we then dump to
DropBox and then start over.

Bug: 5868832, 9796109
Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9
2013-09-10 21:03:30 -07:00
Yuhao Zheng
1501989df0 Add a hidden API to toggle airplane mode.
Added a hidden API under ConnectivityManager to toggle airplane mode.
This may be a temp solution for b/10653570.
bug:10653570

Change-Id: I0b2b42230073289eb8dc6891317d62b84e26c133
2013-09-10 09:57:12 -07:00
Wink Saville
bfe9ea466c Merge "Tighten test for warm sim and add more debug." into klp-dev 2013-09-09 01:32:45 +00:00
Ying Wang
6028328574 Fix docs build.
Change-Id: I6fd0d711b2cc7726fdaa9119ee467ed6fab82de1
2013-09-06 22:53:16 -07:00
Robert Greenwalt
3dc387bc33 Fix the build.
Change-Id: Ia5d29de9db7ea8fd467b3bde551a8cfb95877b41
2013-09-06 16:49:37 -07:00
Robert Greenwalt
8fc23fe76c Merge "Setting MTU size for specific network." into klp-dev 2013-09-06 22:42:10 +00:00
Sreeram Ramachandran
1cd74acaf9 Merge "Minor fixes: Add a missing "break" and some cosmetic fixes." into klp-dev 2013-09-06 22:37:21 +00:00
sy.yun
300432830c Setting MTU size for specific network.
Able to config network specific MTU size. Normally, the default size of MTU is 1500.
 US - ATT 1410, TMUS 1440, SPRINT 1422
 KR - SKT 1440, KT 1450, LGU+ 1428
 JP - KDDI 1420, SoftBank 1340
 CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358
 AU - TEL 1400

Bug: 10195070
Change-Id: Ie18650b37a3d44af944f2dae4aa97c04fb12cd5e
2013-09-06 15:26:19 -07:00
Wink Saville
a3041492bf Tighten test for warm sim and add more debug.
- Require a non-204 response multiple times before declaring a
redirected error and hence a warm sim.

- If there is no connection or dns don't declare its a warm-sim.

- Add printing of the http headers to try to get more information
if we still get a false positive result.


Bug: 9972012
Change-Id: Ic115685cdbbe39c2b4de88b128eaf8d2ea96b45c
2013-09-06 09:54:24 -07:00
Wink Saville
690edd3a92 am 2a6edf50: am 50f86448: am 59a9884b: Merge "Do not change NetworkInfo.DetailedState." into jb-mr2-dev
* commit '2a6edf506b42cb6593f41078c5bb6816eb625f3a':
  Do not change NetworkInfo.DetailedState.
2013-09-06 09:19:40 -07:00
Wink Saville
2a6edf506b am 50f86448: am 59a9884b: Merge "Do not change NetworkInfo.DetailedState." into jb-mr2-dev
* commit '50f864480d6e9cf9e4d83b4533e3764753b4d408':
  Do not change NetworkInfo.DetailedState.
2013-09-06 09:17:19 -07:00
Lorenzo Colitti
07b72c3dc4 Merge "Add a function to replace all the link addresses." into klp-dev 2013-09-05 23:03:24 +00:00
Wink Saville
860f528540 Do not change NetworkInfo.DetailedState.
I'd changed DetailedState to force ConnectivityService to treat
provisioning apn's specially. In particular so that they wouldn't
be identified they were fully connected until the provisioning
actually started. The problem is that DetailedState is a public enum
that has a CTS test and just changing the CTS to allow for the new
state (CONNECTED_TO_PROVISIONING_NETWORK) was inappropriate.

Instead I've added a new mIsConnectedToProvisioningNetwork variable
and used the DetailedState.SUSPENDED as the intermediate state.

Bug: 10620248
Change-Id: Id4a842398cad67455541ce629959351c27d83639
2013-09-05 12:02:25 -07:00
Vinit Deshapnde
64a967ba73 Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev 2013-09-05 17:50:19 +00:00
Lorenzo Colitti
5f468e2fec Add a function to replace all the link addresses.
Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1
2013-09-05 13:02:54 +09:00
Vinit Deshapnde
69386b3e18 Rename LinkInfo to LinkQualityInfo
This change renames the LinkInfo objects to LinkQuailtyInfo. The API is
still hidden; but it can be accessed via reflection.

Bug: 10342372

Change-Id: Ieccea87c467ceae5d7f76298b137573f67396cd6
2013-09-04 14:11:24 -07:00
Wink Saville
3ade48710d Merge commit 'bc6ecbf7' into manualmerge
* commit 'bc6ecbf7':
  Add support for handling mobile provisioning networks.

Conflicts:
	core/java/android/net/CaptivePortalTracker.java
	core/java/android/net/ConnectivityManager.java
	core/java/android/net/IConnectivityManager.aidl
	core/java/android/net/MobileDataStateTracker.java
	core/res/AndroidManifest.xml
	services/java/com/android/server/ConnectivityService.java

Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 14:57:08 -07:00
Wink Saville
bc6ecbf7c2 am 8cb2f42e: am 89c87b90: Add support for handling mobile provisioning networks.
* commit '8cb2f42eea2ef3b249528aa7913fc7a6dfc6b741':
  Add support for handling mobile provisioning networks.
2013-08-29 10:26:06 -07:00
Wink Saville
89c87b90a5 Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 08:55:16 -07:00
Jason Monk
090e8f5ae2 Merge "Don't clear Global Proxy on boot." into klp-dev 2013-08-28 14:41:15 +00:00
Sreeram Ramachandran
2103b57f80 Minor fixes: Add a missing "break" and some cosmetic fixes.
Change-Id: Ie614a7b47185fd511fdc3f064620e46ab7d6d8f8
2013-08-27 11:41:19 -07:00
Jason Monk
6307cd734d Don't clear Global Proxy on boot.
Doesn't clear the global proxy when a deprecated one is not found because
there still may be a non-deprecated global proxy present.

Bug: 10457179
Change-Id: I68e6d5aee7b4940f9315484060c7d82cb8ccfa70
2013-08-27 10:51:24 -04:00
Lorenzo Colitti
a507ce1098 Merge "Add a simple test for NetworkManagementService." into klp-dev 2013-08-27 04:08:54 +00:00
Wink Saville
cfcabebdd7 am c27bc9f3: (-s ours) am 33283a97: am bc58840a: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit 'c27bc9f3fa38bfdebc96c754f5d8bf92558be32c':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:53:14 -07:00
Wink Saville
c27bc9f3fa am 33283a97: am bc58840a: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit '33283a9726a29b5a79d7885fe194d52c0ebe7450':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:50:10 -07:00
Wink Saville
be3744290d am 94c7865c: am b42beeaf: am fb03c6e5: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit '94c7865c29fe3aa69f2b9871616548e4ac1ea9b2':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:46:29 -07:00
Wink Saville
94c7865c29 am b42beeaf: am fb03c6e5: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit 'b42beeafcf8117fb4ac41dd91fc9e6113c0d6aae':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:43:25 -07:00
Lorenzo Colitti
2e73837a72 Add a simple test for NetworkManagementService.
For now, this only tests network observers. It works by starting
NetworkManagementService with a fake netd socket, feeding it
inputs, and seeing if the appropriate observer methods are
called.

Bug: 10232006
Change-Id: I827681575642a4ee13ae48b81272521544b676bd
2013-08-23 18:30:19 +09:00
Vinit Deshapnde
48f4246a7c Merge "Introduce network link quality statistics" into klp-dev 2013-08-22 16:16:45 +00:00
Vinit Deshapnde
db7abcb6e9 Introduce network link quality statistics
This change starts tracking traffic quality data for WiFi and mobile
networks. The quality is tracked based on incidental traffic, and not
on specific measurements. Theoretical bandwidths are hard-coded, as
well as sampling interval; although sampling interval can be changed
by setting a system policy.

Bugs filed to remove shortcomings of this change -

10342372 Change LinkInfo name to something better
10342318 Move hardcoded values of MobileLinkInfo to resources
         so they can be updated without changing code

Bug: 10006249

Change-Id: I83d8c7594da20fe53abbd5e1f909b1f606b035bb
2013-08-21 13:09:01 -07:00