Commit Graph

1303 Commits

Author SHA1 Message Date
Robert Greenwalt
cf81de2b0d Fix the build
Change-Id: I18f78f6055f6f9c14571058d6834c8dec01aa732
2014-05-19 11:00:12 -07:00
Robert Greenwalt
f3017f74a0 Add javadoc and unhide new API
Change-Id: I12e475bbf4000c7acec4ca27b1d3bf8f870cc2cf
2014-05-19 10:34:36 -07:00
Robert Greenwalt
eaa84d5dda Add docs for Linkproperties and unhide it.
Preperation for ConnectivityManager API reveal.

Change-Id: Id2addf424213e796c6077def0b7f30cac9a0f75f
2014-05-19 09:43:36 -07:00
Robert Greenwalt
eeab6a2bdb Merge "Apply Doc fixes to RouteInfo" 2014-05-19 15:53:15 +00:00
Robert Greenwalt
25bcb91c8d Merge "Add docs to Network" 2014-05-19 15:52:05 +00:00
Robert Greenwalt
0eb55c16c4 Add javadoc for NetworkRequest.
Also moved the requestId serial number out of this public class into CS.

Had to leave NetworkRequest hidden for now because the docs refer to things still hidden
in ConnectivityManager.

Change-Id: I14d1fe52d992adf5e4dc197b8f5433e40b0adfe6
2014-05-19 08:17:05 -07:00
Robert Greenwalt
783dc0fef8 Add docs to Network
Still must be hidden until we unhide the new API in ConnectivityManager.

Change-Id: I4749e56777199093cdba9223eb3d721c3174047d
2014-05-19 07:59:16 -07:00
Robert Greenwalt
223a6bd58d Apply Doc fixes to RouteInfo
Change-Id: Ib76df135d5514f7b8baafbbe91fa3d1cdd632f00
2014-05-19 07:27:46 -07:00
Robert Greenwalt
05d3bc2fd5 Update the docs for NetworkCapabilities
Preparing for ConnectivityService API update

Change-Id: I397e375b9254d4271183cf34c4a689deea1e198e
2014-05-18 16:40:16 -07:00
Robert Greenwalt
1aacd72db2 Update RouteInfo docs and make public.
Change-Id: I1a8fe04022ea8291076af166f09112d19114ee16
2014-05-18 12:43:14 -07:00
Robert Greenwalt
7d8949fc2d Update comments for LinkAddress
In preparation for CS api review.

Change-Id: Ib933e905846ebd039d96a523946dd8fdb10f3ff1
2014-05-18 09:39:18 -07:00
Robert Greenwalt
47a9a006b6 Merge "Decouple network_sampling frequency from VDBG" 2014-05-18 14:43:12 +00:00
Robert Greenwalt
2a1bbad562 Decouple network_sampling frequency from VDBG
Add a special debug flag for testing network sampling.

Change-Id: Ibe572c3b5648ca25f1e5be2c61e5c5ad2979b2cb
2014-05-16 17:19:24 -07:00
Lorenzo Colitti
0e4a21806a Merge "Stop clatd when starting the Nat464Xlat service." 2014-05-16 23:52:52 +00:00
Lorenzo Colitti
c050e7b935 Stop clatd when starting the Nat464Xlat service.
If a runtime restart happens while clatd was running, we try to
start clatd, which causes a fatal exception because netd returns
a 400 error (clatd already started.

Bug: 13450716
Bug: 15012035
Change-Id: I102a06d6193fb5f4a1ebe5ad52e5647ff72ca0da
2014-05-16 14:02:13 -07:00
Robert Greenwalt
be2d0e890d Merge "Clean up when we switch networks." 2014-05-16 17:16:19 +00:00
Robert Greenwalt
09f5803344 Clean up when we switch networks.
Need to unhitch mNetworkForRequestId when a network is no longer
satisfying a request.

Change-Id: I3b3cde7dd92ec87a76ae7a0825ad22e892fa8fd5
2014-05-16 08:54:07 -07:00
Robert Greenwalt
18f219f721 Merge "Add net.dns system properties" 2014-05-16 00:06:41 +00:00
Robert Greenwalt
fbd7364a0d Add net.dns system properties
Some apps rely on them.

bug: 14992618
Change-Id: I5766f26b77004e9cfcc90fac657817eab67f9ac7
2014-05-15 16:29:40 -07:00
Robert Greenwalt
ef72c1b9dd Remove unneed clear in constructor.
Keeps all constructors on equal footing.

Change-Id: I316d2b058cc2230ff6aa25a6c8785b42b460438d
2014-05-15 08:53:37 -07:00
Sreeram Ramachandran
44a242a81d Fix reboot loop due to NPE.
All that's old is new again: http://ag/63748.

Change-Id: I83df48447dbcb7f6edf02bd07abf721b009afa49
2014-05-14 14:45:00 -07:00
Robert Greenwalt
00a2f34c9a Undeprecate funcs until we're ready for api-review
Fixing javadoc deprecated tags to fix a checkbuild error breaks the current/api.txt.
We're not ready for the api change yet, so back out the comments.

Change-Id: Ia95e394da7329c1b9e3876e589c3c2137ba18048
2014-05-14 08:55:13 -07:00
Robert Greenwalt
563d632040 Fix Javadoc
It's Deprecated for an annotation, but deprecated for
a javadoc and case is important.

Fix build

Change-Id: I355dc1660196c09530b58386f401a85a74d16476
2014-05-14 07:50:11 -07:00
Robert Greenwalt
235ffacbd1 Merge "Add networks and requests to CS.dump" 2014-05-14 13:44:26 +00:00
Robert Greenwalt
a6d85c8ea1 Add networks and requests to CS.dump
Adds debugging.

Change-Id: I352dfe970c990fd210f3d1598519e321bbdd6ed5
(cherry picked from commit 9bdf6bd99db56c652ba9a62d91f258d11d19ca9f)
2014-05-14 13:12:23 +00:00
Robert Greenwalt
f99b8393d6 Add Multinetwork API
Change-Id: I3a9cef0d416db96d05098dd989ee3fef3b1e9274
(cherry picked from commit cc5e6afa1ba0bef099bcb21a64a36bc2bf7951db)
2014-05-14 13:06:56 +00:00
Robert Greenwalt
be46b75c3b Handle legacy synchronous inspectors
getNetworkInfo, getActiveNetworkInfo, etc

Conflicts:
	services/core/java/com/android/server/ConnectivityService.java

Change-Id: I4611d6481b1a76fe4a4ce22232a2a329de2a6e0c
2014-05-14 03:56:35 -07:00
Paul Jensen
3927e336e7 Get clatd/Nat464Xlat working with new NetworkAgents.
Change-Id: I65dfb59ce519a42bdb872940d229039b5403fd92
2014-05-14 03:56:35 -07:00
Lorenzo Colitti
52f1e4631e Fix compile errors after merge.
These are due to changes to ConnectivityService that were made
after master-multinetwork-dev branched off. They mostly didn't
cause merge conflicts because they were in different parts of
the file from the multinetwork changes, but they cause compile
errors now. These particular changes should be fine - they are
all in dead code anyway, and their functionality had already
been re-implemented in the new code.

Change-Id: I0ac9e39c3c975c8e8dc04ad11b6b85366693865c
2014-05-14 03:56:34 -07:00
Paul Jensen
c206e65756 Disable calls to MobileDataStateTracker.isProvisioning() as there is no more
MobileDataStateTracker so these just crash.

Change-Id: Ib45a85db505c0a99fb65d9a6d0c39b860f9d019d
2014-05-14 03:56:34 -07:00
Paul Jensen
4bc35b4aa5 Add NetworkMonitor.
At present the network evaluation / captive portal detection
is disabled pending addition of API to bind socket to network.

Change-Id: I5d1f5dc86d4dd9481d52dd45d6da0732054c8315
2014-05-14 03:56:34 -07:00
Paul Jensen
bff73490ac Separate network and interface addition/removal netd APIs.
This should facilitate stacked interfaces (i.e. clatd).

Change-Id: Ib3e7a4d3847ef6ec4449451f6da42e75959baa4f
2014-05-14 03:56:34 -07:00
Robert Greenwalt
e20f7a2429 Enabling internal msg apis
NetworkFactory and NetworkAgent.  First trying with wifi and
getting rid of WifiStateTracker.

Conflicts:
	api/current.txt
	services/core/java/com/android/server/ConnectivityService.java

Change-Id: I7f0ec13d7d8988b32f3c6dc71f72012f3349fe02
2014-05-14 03:56:34 -07:00
Sreeram Ramachandran
2a9d35f655 Fix build.
Change-Id: I5dab09d2d8a9cff56fa17bb4e8c14b365449399b
2014-05-14 03:56:33 -07:00
Sreeram Ramachandran
9676566151 Specify netId when adding/removing routes.
Change-Id: I07fd950aee726e9721153f75c3e4c10d8e19d8e9
2014-05-14 03:56:33 -07:00
Sreeram Ramachandran
b62e139e69 Set and clear the default network.
Change-Id: I305951e0c4735d708804baa597cc2d9b10f501c0
2014-05-14 03:56:33 -07:00
Paul Jensen
9d74d59302 Get ConnectivityServiceTest building again after 8f80cc8.
Change-Id: I4520011ba2076d8fac1ca234cb9a79c774992671
2014-05-14 03:56:33 -07:00
Paul Jensen
50daca4481 Use NetId instead of interface name when communicating DNS changes to netd.
Change-Id: Ic82b73de6f50d39d56c5e1a32f5b1f3ebb80bb7d
2014-05-14 03:56:33 -07:00
Robert Greenwalt
faca3b780d Stop adding host routes for dns
bug:13550136
Change-Id: I748e13b96dab111f8f6a4b11d9beaf2a72d0742b
2014-05-14 03:56:32 -07:00
Robert Greenwalt
b951069473 Merge "Add Network-specific host name resolution API." 2014-05-14 05:39:10 +00:00
Robert Greenwalt
7e45d1159f Add NetworkFactory support.
This is a protocol allowing transports to dynamically register with CS for
Handler to Handler communications.

bug:13885501
Change-Id: Ic7275e3724a15efc7e5f80981560c4cb3106007b
2014-05-13 21:21:49 -07:00
Paul Jensen
da1c1d4e6a Add Network-specific host name resolution API.
Change-Id: I932f73158a8f6e3ccc36c319d138180dff2aa070
2014-05-13 19:05:13 -04:00
Jason Monk
ab245682f8 Merge "Switch PacUrl storage from String to Uri" 2014-05-13 15:14:50 +00:00
Robert Greenwalt
c0669e3db0 Comment out some new netd calls to fix networking.
bug:14869053
Change-Id: Ifc44f3cbadd0402c7b06e01962695e6b65dc48b3
2014-05-13 06:34:23 -07:00
Robert Greenwalt
44a58441ac Merge "Add has* utility functions to NetworkCapabilities" 2014-05-13 01:35:02 +00:00
Robert Greenwalt
c41962f220 Add has* utility functions to NetworkCapabilities
Change-Id: Icf735b778a3956812be522db39c29cf54c757a25
2014-05-12 18:32:22 -07:00
Lorenzo Colitti
6b4985d8fd Fix reboot loop.
The multinetwork branch is rebooting on startup with:

E/AndroidRuntime( 1024): *** FATAL EXCEPTION IN SYSTEM PROCESS: NetworkStats
[...]
E/AndroidRuntime( 1024): Caused by: java.lang.NullPointerException: Attempt to read from field 'long android.net.NetworkCapabilities.mNetworkCapabilities' on a null object reference
E/AndroidRuntime( 1024): 	at android.net.NetworkCapabilities.<init>(NetworkCapabilities.java:235)
E/AndroidRuntime( 1024): 	at android.net.BaseNetworkStateTracker.getNetworkCapabilities(BaseNetworkStateTracker.java:103)
E/AndroidRuntime( 1024): 	at com.android.server.ConnectivityService.getAllNetworkState(ConnectivityService.java:1134)
E/AndroidRuntime( 1024): 	at com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:877)
E/AndroidRuntime( 1024): 	at com.android.server.net.NetworkStatsService.updateIfaces(NetworkStatsService.java:849)
E/AndroidRuntime( 1024): 	at com.android.server.net.NetworkStatsService.access$600(NetworkStatsService.java:139)
E/AndroidRuntime( 1024): 	at com.android.server.net.NetworkStatsService$2.onReceive(NetworkStatsService.java:717)
E/AndroidRuntime( 1024): 	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:766)
E/AndroidRuntime( 1024): 	... 4 more

This seems to be due to NetworkCapabilities' copy constructor
not null-checking its argument.  Unbreak things by ignoring null.

Change-Id: Iff3c38e6d72390fa86e51bfce534ebd42a262e19
2014-05-12 18:06:47 -07:00
Robert Greenwalt
d6ee688546 Add NetworkRequest to the multinetwork API
bug:13885501
Change-Id: I7b9a01aadf26b6ff104d088b6e283c838ec4dfac
2014-05-12 17:52:48 -07:00
Robert Greenwalt
3e0c794056 Replace LinkCapabilities with NetworkCapabilities
Also remove unused LinkSocket and LinkSocketNotifier.
bug:13885501

Change-Id: Id426e31b201fa4f29109b5fea485d8efb34519d3
2014-05-12 16:52:56 -07:00
Jason Monk
19c6561c50 Switch PacUrl storage from String to Uri
Since the interface for creating/accessing PAC URLs through a
ProxyInfo is Uri based, so should the internal storage and
references.

Change-Id: Ibf15c350f4cc526f81aba3ec463070f26af8f535
2014-05-12 15:44:32 -04:00