Commit Graph

189 Commits

Author SHA1 Message Date
Chia-chi Yeh
ab2c05370e Merge "Do not register the callbacks in the constructor." 2011-06-07 18:18:56 -07:00
Jeff Sharkey
921ebf2ee5 Policy and rules work for ConnectivityManager.
Teach ConnectivityManager about UID-specific rules derived from policy,
such as rejecting network traffic on "paid" interfaces.  Calls that
return NetworkInfo now filter based on any REJECT rules in effect for
the calling UID.  (Added uid parameter if callers that still want all
interfaces.)

Changed NetworkPolicyManager to derive rules based on current policy
combined with PowerManager and ActivityManager status, which it passes
to ConnectivityService for eventual enforcement through netd.  When
rules change the usability of a NetworkInfo for a specific UID, it also
dispatches CONNECTIVITY_ACTION broadcasts to that UID.  Combined paid
and background policy together to match current working definition.

Change-Id: I797ea49439fcc487cfe2cbc16703d4b91ceb9af6
2011-06-01 17:00:42 -07:00
Mike Lockwood
0d5916c21e Move stringToFile utility from ConnectivityService to FileUtils
Change-Id: I59a2dc649d59677f6b5e7ade252587c7c151ec06
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-28 13:28:12 -04:00
Chia-chi Yeh
f3204aad8e Do not register the callbacks in the constructor.
Change-Id: Ic7509c35cfb17b022a2af3cc14170942d6510e2d
2011-05-23 15:08:29 -07:00
Robert Greenwalt
1b507045bd am e0f7bc0b: resolved conflicts for merge of dec3dda8 to honeycomb-plus-aosp
* commit 'e0f7bc0b841c0b6a09fb7d5b259a6772b3a53df3':
  Simplfy getActive* calls in ConnectivityService
2011-05-21 21:35:38 -07:00
Robert Greenwalt
e0f7bc0b84 resolved conflicts for merge of dec3dda8 to honeycomb-plus-aosp
Change-Id: If14c7fc51c4549524c2f39797a902093582bae6d
2011-05-20 15:45:55 -07:00
Robert Greenwalt
e1544bb9ea Simplfy getActive* calls in ConnectivityService
One had been simplified on GB, but somehow it didn't make it here.
bug: 4463770

Change-Id: Ica51e836b1a7a489526a223168910b8e06c99c2b
2011-05-20 12:23:41 -07:00
Jean-Baptiste Queru
65727c9c5d Merge f024027b
Change-Id: I70fc4382f832d1a2bded8a5ee7d9b96fac77879b
2011-05-19 07:54:53 -07:00
Kazuhiro Ondo
842c177850 am a9f139c4: am 3a34041f: Linkproperties update via unsol data call state change.
* commit 'a9f139c4f0858bde86febd3d87bdc443c73ac220':
  Linkproperties update via unsol data call state change.
2011-05-18 17:48:37 -07:00
Robert Greenwalt
f024027b55 am 355205c0: Switch to use netd to add/remove routes.
* commit '355205c0cd712fb964cd47ec7f65616808d5ef75':
  Switch to use netd to add/remove routes.
2011-05-18 16:33:16 -07:00
Robert Greenwalt
355205c0cd Switch to use netd to add/remove routes.
Also adds support for v6 routes and for removing single routes.

Change-Id: I1c4f08c7938371090944d8d6f603e1e0d6d70c01
2011-05-18 15:25:43 -07:00
Kazuhiro Ondo
a9f139c4f0 am 3a34041f: Linkproperties update via unsol data call state change.
* commit '3a34041f8027bf15cb2653c1a46146b605dbb702':
  Linkproperties update via unsol data call state change.
2011-05-18 00:02:31 -07:00
Kazuhiro Ondo
3a34041f80 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
2011-05-17 20:53:40 -07:00
Chia-chi Yeh
4df51328bd Extract NetworkManagementService out from Tethering to ConnectivityService.
and also some minor refactoring.

Change-Id: I0e74f30ef1b035d9ed37571c512fedc15d05db77
2011-05-11 17:06:07 -07:00
Robert Greenwalt
b5c62b6230 am f490d721: am e6848fac: Merge "Fix the adding of host routes." into honeycomb-LTE
* commit 'f490d72195d330e1232a9025ebe029158f68f5f6':
  Fix the adding of host routes.
2011-05-11 13:07:38 -07:00
Robert Greenwalt
f490d72195 am e6848fac: Merge "Fix the adding of host routes." into honeycomb-LTE
* commit 'e6848faceff58f84f671dbc73be08ef7890fea09':
  Fix the adding of host routes.
2011-05-10 11:53:57 -07:00
Robert Greenwalt
bd49221570 Fix the adding of host routes.
We used to just add

Change-Id: I991e4cc976cc2932887dd3242fd50e013d521b0a
2011-05-10 11:27:46 -07:00
Robert Greenwalt
e7dcc1362f am df6da5c9: am aae781f3: Merge "Add auto-restore timeout for secondary networks." into honeycomb-LTE
* commit 'df6da5c96bc18cff1785fc30d639b2fe73110fe8':
  Add auto-restore timeout for secondary networks.
2011-05-04 12:47:30 -07:00
Robert Greenwalt
df6da5c96b am aae781f3: Merge "Add auto-restore timeout for secondary networks." into honeycomb-LTE
* commit 'aae781f32bc769f6275d3cfc200cbbadf3f820f6':
  Add auto-restore timeout for secondary networks.
2011-05-04 10:02:16 -07:00
Robert Greenwalt
aae781f32b Merge "Add auto-restore timeout for secondary networks." into honeycomb-LTE 2011-05-04 09:59:30 -07:00
Robert Greenwalt
20f819c64b 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
2011-05-03 19:10:26 -07:00
Robert Greenwalt
b0d1452d58 resolved conflicts for merge of 90faa5de to master
Change-Id: I8df9d5d07588fbd70e417dae567be26f645b74b6
2011-05-02 14:41:57 -07:00
Robert Greenwalt
90faa5de18 am 5afb4666: Merge "Add RouteInfo objects for tracking routes." into honeycomb-LTE
* commit '5afb46660c3f6e622302bbd77c25f9e1275f2c2f':
  Add RouteInfo objects for tracking routes.
2011-05-02 13:29:22 -07:00
Robert Greenwalt
5a901298ed 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
2011-05-02 11:17:30 -07:00
Benoit Goby
d27954e05a am c40de32e: resolved conflicts for merge of 6cec7f35 to honeycomb-LTE
* commit 'c40de32ef747fc206d3ec2980b8f7a7aff0f1967':
  Add support for USB Ethernet adapters
2011-04-11 18:53:57 -07:00
Benoit Goby
c40de32ef7 resolved conflicts for merge of 6cec7f35 to honeycomb-LTE
Change-Id: I79f8ac1dc8ff9f5d0559d37043b850cd26246b92
2011-04-11 18:41:23 -07:00
Benoit Goby
6cec7f3535 Add support for USB Ethernet adapters
Change-Id: I6ae34a32d0e1b6f21c484b8639c3e7ce086e568d
2011-04-11 16:33:43 -07:00
Wink Saville
75d9e1cd13 am 75b5e996: am 9e7a5a1e: Merge "ConnectivityService needs to use the new names for the NetConfig vars." into honeycomb-LTE
* commit '75b5e9967f4c61642316c8a8a861c51d2aa3faeb':
  ConnectivityService needs to use the new names for the NetConfig vars.
2011-04-07 14:31:20 -07:00
Wink Saville
75b5e9967f am 9e7a5a1e: Merge "ConnectivityService needs to use the new names for the NetConfig vars." into honeycomb-LTE
* commit '9e7a5a1e567a0e696d9a7b68fffd00b7408e6ac1':
  ConnectivityService needs to use the new names for the NetConfig vars.
2011-04-07 14:29:17 -07:00
Wink Saville
f2a6283da9 ConnectivityService needs to use the new names for the NetConfig vars.
Change-Id: I809a624057462871cd1849051286c2bffd5099e9
2011-04-07 14:23:45 -07:00
Robert Greenwalt
f7ca6f7ddf am 1a087f0f: resolved conflicts for merge of 2879f735 to honeycomb-plus-aosp
* commit '1a087f0f01e4ea6900e5d922df68cbe908d6d1c9':
  Add external dependency API.
2011-04-07 14:22:03 -07:00
Robert Greenwalt
1a087f0f01 resolved conflicts for merge of 2879f735 to honeycomb-plus-aosp
Change-Id: I0962138f6ecb1ed54fda25524d8850b086f13c4f
2011-04-07 14:13:52 -07:00
Robert Greenwalt
34848c0192 Add external dependency API.
An APN will not be connected to if some external dependency is not met.

bug:3486704
Change-Id: I7d94df343b260013efd11faa978deb13f07f1389
2011-04-07 12:28:37 -07:00
Robert Greenwalt
198b24d59a am 18510113: resolved conflicts for merge of e00e35a5 to honeycomb-plus-aosp
* commit '18510113794df002ee288d8d5fdf8b64b4c957b5':
  Only leave one default network up at a time.
2011-04-04 16:44:25 -07:00
Robert Greenwalt
1851011379 resolved conflicts for merge of e00e35a5 to honeycomb-plus-aosp
Change-Id: I99a29f920336b00b26b9aadafd2bd835049f48cf
2011-04-04 16:26:42 -07:00
Robert Greenwalt
e00e35a54c am 9991017b: Only leave one default network up at a time.
* commit '9991017bbd026080695fc33198609be7bfd4f9be':
  Only leave one default network up at a time.
2011-04-04 12:18:58 -07:00
Robert Greenwalt
1e2f286a27 Fix a bad merge.
Re-add change 103769 (Change-Id: I9e7c94718a5b1f08840b219b304ba3904259a65f) from gingerbread
after the bad merge was reverted by master change 104487
(Change-Id: I8fad7ee11f4b26630f3cc4b31cc9cafbe66b3bf4).

bug:4157610
Change-Id: I96a75d71220cc7886a5b186b415d8dacf6951ca6
2011-04-01 10:51:22 -07:00
Robert Greenwalt
f7dae30b20 Fix the build.
Fix a bad merge.

Change-Id: I45d418a8868c9cab1b142ef997ad1d3550d11eee
2011-03-31 10:44:47 -07:00
Michael Jurka
837e36441b Fix the build
Revert "am 047f9d12: Merge "resolved conflicts for merge of b2f5deca to honeycomb-plus-aosp" into honeycomb-plus-aosp"

This reverts commit fbba87d35f, reversing
changes made to ce8a55db6feae11c1db45a868a7d8a0e7d105471.
2011-03-30 19:57:12 -07:00
Robert Greenwalt
fbba87d35f am 047f9d12: Merge "resolved conflicts for merge of b2f5deca to honeycomb-plus-aosp" into honeycomb-plus-aosp
* commit '047f9d12976d90d0931a64a256bb4843d77f5e20':
  Fix some alt-network issues.
2011-03-30 16:40:23 -07:00
Robert Greenwalt
3a378b9f2d resolved conflicts for merge of b2f5deca to honeycomb-plus-aosp
Change-Id: I4c3c382cc5cd89f8a4437cf17836fb42f9417ee1
2011-03-30 15:03:13 -07:00
Robert Greenwalt
b2f5deca7d am 568845a7: Merge "Fix some alt-network issues." into gingerbread
* commit '568845a766cddc4e4c222b4d9de064f8a48da990':
  Fix some alt-network issues.
2011-03-30 09:30:15 -07:00
Robert Greenwalt
9991017bbd Only leave one default network up at a time.
If original refuses to tear down, tear down new one.  It's better
to have none (which will try to launch them all again) than two.

Really people shouldn't refuse the teardown request.

bug:4183397
Change-Id: I54ea1bf0d2cd2ef16fcf2eafc69895ad2fe33ffd
2011-03-29 11:36:28 -07:00
Robert Greenwalt
a71471ba9a Fix some alt-network issues.
Two issues.
1) remove default routes for non-default networks.
2) don't report mobile is the active default network just because
   it is active.

bug:4157610
Change-Id: I9e7c94718a5b1f08840b219b304ba3904259a65f
2011-03-25 08:59:08 -07:00
Robert Greenwalt
b471d761d2 am 5635dc93: am 23a9f024: am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit '5635dc9313dc6ca3ea739e4ca36c42a2c58537e9':
  Fix adding of default route.
2011-03-22 21:40:54 -07:00
Robert Greenwalt
23a9f02497 am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit 'ac70fb8be6ea3a6b49d0a8a26e99c25f92013516':
  Fix adding of default route.
2011-03-22 21:37:48 -07:00
Robert Greenwalt
03d53da1f5 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
2011-03-22 18:47:42 -07:00
Wink Saville
b7c92c720f 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
2011-03-14 12:25:04 -07:00
Robert Greenwalt
102b5464b7 am b5c51d5f: Merge "DO NOT MERGE Backport of I1f55df8a from master." into gingerbread
* commit 'b5c51d5fa88c56ebbfb56af89beb077aa4f1f2f8':
  DO NOT MERGE Backport of I1f55df8a from master.
2011-03-11 11:52:31 -08:00
Robert Greenwalt
9e081592aa DO NOT MERGE Backport of I1f55df8a from master.
Fixes false reporting of NO_CONNECTION.
bug:4057115

Change-Id: Ie11e81180276ac3aa486607ec3a8eb1088b2ece6
2011-03-10 17:04:21 -08:00