Commit graph android_packages_modules_Co.../services/java/com/android/server/ConnectivityService.java
Message SHA1
Switch to use netd to add/remove routes.
Also adds support for v6 routes and for removing single routes.

Change-Id: I1c4f08c7938371090944d8d6f603e1e0d6d70c01

Robert Greenwalt   commited 2011-05-18 15:25:43 -07:00
355205c0cd
Linkproperties update via unsol data call state change.
Handles the scenario of radio technology handover with IP continuity.
Once RIL/Modem finished a handover operation, an unsol data call state
change will be send up to FW notifying all link propertes changes.
FW will then re-configure the device with new link properties
including iptable used by Tethering.

Change-Id: I05e29f66ac3db8ba4274d3662642607742ba1d12

Kazuhiro Ondo   authored and   Wink Saville   commited 2011-05-17 20:53:40 -07:00
3a34041f80
Fix the adding of host routes.
We used to just add

Change-Id: I991e4cc976cc2932887dd3242fd50e013d521b0a

Robert Greenwalt   commited 2011-05-10 11:27:46 -07:00
bd49221570
Merge "Add auto-restore timeout for secondary networks." into honeycomb-LTE
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2011-05-04 09:59:30 -07:00
aae781f32b
Add auto-restore timeout for secondary networks.
Settable per network so you can have not timeout for some and some for others.
If you set the old NETWORK_RESTORE_DELAY_PROP_NAME system property
(android.telephony.apn-restore) it will override this value.

Change-Id: Icca706fdc74245dce679209116660e5dc4b05d23

Robert Greenwalt   commited 2011-05-03 19:10:26 -07:00
20f819c64b
Add RouteInfo objects for tracking routes.
Used to have list of gateways for default routes, but general static routes
should be supported.

Change-Id: I01730142c6139f2b833b9d48f5381d2d320b69f6

Robert Greenwalt   commited 2011-05-02 11:17:30 -07:00
5a901298ed
resolved conflicts for merge of 6cec7f35 to honeycomb-LTE
Change-Id: I79f8ac1dc8ff9f5d0559d37043b850cd26246b92

Benoit Goby   commited 2011-04-11 18:41:23 -07:00
c40de32ef7
Add support for USB Ethernet adapters
Change-Id: I6ae34a32d0e1b6f21c484b8639c3e7ce086e568d

Benoit Goby   commited 2011-04-11 16:33:43 -07:00
6cec7f3535
ConnectivityService needs to use the new names for the NetConfig vars.
Change-Id: I809a624057462871cd1849051286c2bffd5099e9

Wink Saville   commited 2011-04-07 14:23:45 -07:00
f2a6283da9
Add external dependency API.
An APN will not be connected to if some external dependency is not met.

bug:3486704
Change-Id: I7d94df343b260013efd11faa978deb13f07f1389

Robert Greenwalt   commited 2011-04-07 12:28:37 -07:00
34848c0192
am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit 'ac70fb8be6ea3a6b49d0a8a26e99c25f92013516':
  Fix adding of default route.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-03-22 21:37:48 -07:00
23a9f02497
Fix adding of default route.
If you deleted the host routes (started a secondary network like mms, supl
of hipri and then ended it) you would lose the host route to the default
gateway.  Then if you needed to re-add the default gateway route (lost
the connection and removed the default route and then re-established)
you couldn't - can't add a gateway that isn't routable apparently.

This happens if you are in a video chat and lose your connection without
losing the interface (PPP keeps it up for a bit).

Fixed it by having addDefaultRoute first add a hsot route for the gateway
before adding the default route.  This allows the default add to succeed.

bug:3490353
Change-Id: I415e7319832e6456f8757b14c4f79f098a08839b

Robert Greenwalt   commited 2011-03-22 18:47:42 -07:00
03d53da1f5
Do not merge: Revert the revert of "LTE Changes for Telephony including Multiple PDN support and IPV6 support"
This reverts commit bbba216fe3
and is the first of the LTE commits in master being back ported
to the LTE branch.

Change-Id: I17d4a1b779ed74bc7dfb409d2c1a30f60fdb27c7

Wink Saville   commited 2011-03-14 12:25:04 -07:00
b7c92c720f
DO NOT MERGE: Revert "LTE Changes for Telephony including Multiple PDN support and IPV6 support"
This reverts commit f6b7669493.

Change-Id: Ifc4e9aaccb54e065a36380710694cd6e4d347636

Wink Saville   commited 2011-03-03 09:53:52 -08:00
bbba216fe3
Merge "Start using NetworkUtils.numericToInetAddress."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2011-03-02 12:10:51 -08:00
95c300a353
Start using NetworkUtils.numericToInetAddress.
Generates InetAddresses without risking an accidental dns lookup.  For use with supposedly
numeric-only ip address strings.

Change-Id: I694f3976ce1c6382854706f6557ea88a289add3a

Robert Greenwalt   commited 2011-03-02 11:37:32 -08:00
35e34d1276
Merge "Fixing the write of BackgroundData setting."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2011-02-25 15:20:30 -08:00
af83ea6e1f
Fixing the write of BackgroundData setting.
I outsmarted myself trying to minimize writes and caused no writes to occur.

bug:3485934
Change-Id: I292e6837d29903a21abb6e001d25d96a4cdc18ec

Robert Greenwalt   commited 2011-02-25 13:44:09 -08:00
0ffdef120a
LTE Changes for Telephony including Multiple PDN support and IPV6 support
Added init for CDMAPhone.java

Change-Id: I2392b5ad3382ee1993537b8477ef00dd036c6fe9

Wink Saville   commited 2011-02-24 18:23:36 -08:00
f6b7669493
Update LinkProperties treatment of gateways
A link can have multiple gateways (think ipv4/ipv6 for a trivial example).
.

bug:3438810
Change-Id: I28c90a6947cd50b82e5ca9a0113148f98b3f4dd8

Robert Greenwalt   commited 2011-02-11 11:06:23 -08:00
5c733977a4
am 93fbb0ad: am 13a8f2a5: Merge "Comment out the isAvailable optimization." into honeycomb
* commit '93fbb0ad960a658633dfa2bc7be9584e4361ab85':
  Comment out the isAvailable optimization.

Wink Saville   authored and   Android Git Automerger   commited 2011-01-26 19:09:22 -08:00
2ec53df18d
Comment out the isAvailable optimization.
As the comment says this causes problems if the connection
is handling errors. This removes the optimization for now.

Bug: 3386481
Change-Id: I6cb00abe8b1949e9b79b4906a6bdab5872b5054d

Wink Saville   commited 2011-01-26 15:43:49 -08:00
72a95b97e9
am 9e0357b9: am 71196f0c: Merge "Make VpnService synchronous API." into honeycomb
* commit '9e0357b96bd5c84e39c3084625d58b21f9bad74c':
  Make VpnService synchronous API.

Hung-ying Tyan   authored and   Android Git Automerger   commited 2011-01-19 22:46:32 -08:00
4116cd5901
Make VpnService synchronous API.
This eases VpnSettings on dealing with multiple-activity-instance problem
(i.e., SettingsActivity and VpnSettingsActivity).

+ Most of the code is moved from the VpnServices package to vpn/java/.
+ VpnManager and VpnServiceBinder are revised to provide synchronous API.
+ Add a new method isIdle() to IVpnService.aidl.

Related bug: 3293236 (need to deal with multiple-activity-instance problem)

Change-Id: I03afa3b3af85d7b4ef800683cd075c356a9266c4

Hung-ying Tyan   commited 2011-01-20 12:51:43 +08:00
4e723420e0
am 4b43f944: am 495056ab: Merge "Turn off DUN connection after tethering." into honeycomb
* commit '4b43f94499b6d0c4a34961d48b97d5e48a039f65':
  Turn off DUN connection after tethering.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-01-13 10:25:25 -08:00
b3708c3de8
Turn off DUN connection after tethering.
Use matching feature type when turning tethering off or the request is ignored.

Also, turn on DUN apn right away so that we don't fail aggressive test cases.

Also don't report connections for enabled apn's that we're no longer connected to.

bug:3332880
bug:3338033
Change-Id: I7db2dfd4879f03465bc9f6d39488c078570dcaf3

Robert Greenwalt   commited 2011-01-12 15:52:10 -08:00
9f3be4c403
am 1ea7e5df: am a78e9f05: Merge "Fix any_connection reporting." into honeycomb
* commit '1ea7e5df91f023d03fa7c87c534e6024795abaaa':
  Fix any_connection reporting.

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-01-12 07:21:32 -08:00
e3e5f46511
Fix any_connection reporting.
A recent change caused us to think there was no other connection available
when transitioning from 3g to wifi.

bug:3335074
Change-Id: I1f55df8a0eb5b27131572b111fbaac8f1ebbc0d3

Robert Greenwalt   commited 2011-01-11 18:32:17 -08:00
4b7c55e4ee
am 89c8f755: Merge "Fix handling of multiple possible default networks" into honeycomb
* commit '89c8f7554bbec5d62ebeddddc2ef2460265a80c5':
  Fix handling of multiple possible default networks

Robert Greenwalt   authored and   Android Git Automerger   commited 2011-01-07 00:28:55 -08:00
4c6d10445f
Fix handling of multiple possible default networks
Old code assumed only 2 choices but now we have more.

bug:3328196
Change-Id: I92a02b31fae6c53f73b3684581230fad5cb1b82a

Robert Greenwalt   commited 2011-01-06 17:12:23 -08:00
9256485b0b
connectivity-change events can happen before boot completes (similar to:
https://android-git.corp.google.com/g/#change,87425 )


Change-Id: Ibc0f12defaa5d90894657ce63fb352578eca7060

Stan Chesnutt   commited 2011-01-06 11:00:19 -08:00
1f2a2ace5d
Allow bumpDns() to execute correctly before boot has completed
Change-Id: I5c2cf023e555f49d7e29592f9d1439b3ac367e3d

Stan Chesnutt   commited 2011-01-05 17:14:03 -08:00
f444f50b79
Always file DUN requests for tethering.
A bit of a hack so that first trySetupData call uses the proper APN in
strange edge cases.  Made a new startUsingNetworkFeature string
that ConnectivityService knows means always pass the request to telephony
even if telephony connections are not currently available.

bug:3133178
Change-Id: I2559b9cbaed4b4ec02bdf7ea78e6003ee2be64f2

Robert Greenwalt   commited 2011-01-04 11:15:19 -08:00
2cc8744a3d
Cache the current value of background-data.
The writing of the persistent setting is async, but we should
still remember it so if somebody asks before the write completes
we give the right answer.  Makes the read faster too.

bug:3312848
Change-Id: I864cb5f8d496d5bf9cbf0af9a71ca84da078f7c6

Robert Greenwalt   commited 2010-12-29 16:15:02 -08:00
d62c7000a1
Make sure the ProxyProperties is always present.
Lets people know that it's non-null, though the InetAddr inside may be.

bug:3305689
Change-Id: I0fe16a9ef1feba987680c419fa2dc0e00e400d91

Robert Greenwalt   commited 2010-12-28 11:15:06 -08:00
611291c8ef
Reduce the spinning while tethering.
Doing too much stuff - don't retry when we know we shouldn't.

bug:3293460
Change-Id: Ic7b0b6486b39377d74df7a35572059ac60d03fa0

Robert Greenwalt   commited 2010-12-23 17:13:57 -08:00
8ca8876c68
Add TYPE_BLUETOOTH network interface for reverse tethering.
Change-Id: I2aa61ce15f57aea9e8fd3a4cb56799c8bc51e998

Jaikumar Ganesh   commited 2010-12-22 15:24:18 -08:00
0db51a0631
am 08df90cf: am 5d0fafe8: Merge "Be sure and report NO_CONNECTIVITY when needed." into gingerbread
* commit '08df90cf80':
  Be sure and report NO_CONNECTIVITY when needed.

Robert Greenwalt   authored and   Android Git Automerger   commited 2010-12-22 11:35:06 -08:00
707bdb6f21
am 5d0fafe8: Merge "Be sure and report NO_CONNECTIVITY when needed." into gingerbread
* commit '5d0fafe80752ad4e40fe0ec2bc06c43e669a0612':
  Be sure and report NO_CONNECTIVITY when needed.

Robert Greenwalt   authored and   Android Git Automerger   commited 2010-12-21 16:06:19 -08:00
08df90cf80
Be sure and report NO_CONNECTIVITY when needed.
Reports that we sometimes didn't report NO_CONNECTIVITY led to this suggested change.
Could not repro the problem, but the change looks ok anyway.  Better safe than sorry.

bug:3276408
Change-Id: I0cdb48a05a5c9dfcf3a0b468a6eae43d461023b1

Robert Greenwalt   commited 2010-12-21 11:43:28 -08:00
ea8bca0251
Correct an error code to pass CTS.
We used to report an unmatch stopUsingNetworkFeature call with an "ok, stopped" response,
but we need to report it as an error.

bug:3281837
Change-Id: I35728159e62a021cb10de4396b3f60a92df0570f

Robert Greenwalt   commited 2010-12-15 15:22:50 -08:00
5364d754c9
Have MobileDataStateTracker & DataConnectionTracker communicate directly.
Added CMD_SET_DATA_ENABLE which is sent when data is enabled/disabled
via the ConnectivityService. It is anticipated that the communication
channel will be used for additional commands and to receive unsoliciated
commands from DataConnectionTracker back to MobileDataStateTracker.

Change-Id: I3863e7385155d503f069b1dcb7e4f766ec78b5f8

Wink Saville   commited 2010-12-07 10:31:02 -08:00
b9024c6009
Add a Dummy data connection for testing purposes.
Enable with:
    <string-array translatable="false" name="networkAttributes">
        <item>"wifi,1,1,1"</item>
        <item>"dummy,7,7,0"</item>
    </string-array>

in your config.xml

Change-Id: I3965edaeb4873e95131f4083b8d23d682ce17841

Robert Greenwalt   commited 2010-12-07 07:48:33 -08:00
eb123acefc
Make Proxy change broadcast sticky
Makes it easier for apps who care.  Includes the current values.

Change-Id: I5f1d3589a036ebc9910281f97d4780ecda2829f2

Robert Greenwalt   commited 2010-12-06 11:29:17 -08:00
d93dc8f82d
Don't clobber the net hostname if it's already set.
Be a good citizen.

Change-Id: Ic58aeab013e2ff34201be71e01e399390edbbb5f

Robert Greenwalt   commited 2010-12-06 09:47:31 -08:00
82cde1324d
Cleanup logging.
Change-Id: Ie73c6d97ec19b0d27e58c085b60e885d90066056

Wink Saville   commited 2010-12-03 12:01:38 -08:00
e70c6f53c6
Load persisted global proxy settings.
Was persisted before, but not loaded at boot.

Change-Id: I6d6b69ede3d212a8266847d73d07a037ae917788

Robert Greenwalt   commited 2010-12-02 12:19:17 -08:00
6f7c609039
Notify all VMs when proxy changes.
bug:2700664
Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87

Robert Greenwalt   commited 2010-11-19 10:24:30 -08:00
c3c5f865a3
Tell each VM to flush their DNS cache.
bug:3095357
Change-Id: I93de24e3e5a7d8b94d55f4facfffc863a2b8c202

Robert Greenwalt   commited 2010-11-04 11:52:35 -07:00
051642b87b
am 7f8f1e13: am 96619f9f: Merge "Add some error-case logging." into gingerbread
Merge commit '7f8f1e13d3'

* commit '7f8f1e13d3':
  Add some error-case logging.

Wink Saville   authored and   Android Git Automerger   commited 2010-10-11 10:49:47 -07:00
3425ad6ca6