Commit graph android_packages_modules_Co.../services
Message SHA1
am 558aeb90: Merge "Make NetworkCapabilities publicly immutable." into lmp-preview-dev
* commit '558aeb901144fac460575402e38fc8baa2da83eb':
  Make NetworkCapabilities publicly immutable.

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-06-12 18:49:07 +00:00
bb0ec47862
Make NetworkCapabilities publicly immutable.
Applying API council comments.

bug: 15142362

(cherry picked from commit Ie0bde68b72656a676d90c0343b9756fe9268d8d6)
Change-Id: Ie0bde68b72656a676d90c0343b9756fe9268d8d6

Robert Greenwalt   commited 2014-06-11 23:29:39 +00:00
bfd1f4c206
Fix public API of LinkProperties.
bug:15142362
(cherry picked from commit 51d898fd0223a4b7c728980ab987dd985c02df5f)
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc

Robert Greenwalt   commited 2014-06-10 15:42:19 -07:00
87afb9411c
Minor changes to the LinkAddress API docs.
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
   callers in frameworks/base and add a shim method and a TODO
   for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
   one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
   been </ul>).
4. Remove the documentation that talks about creating
   LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c

Lorenzo Colitti   authored and   Robert Greenwalt   commited 2014-06-10 14:46:39 -07:00
b0116bf5bf
Add a new IpPrefix class and use it in RouteInfo.
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e

Sreeram Ramachandran   authored and   Robert Greenwalt   commited 2014-06-10 14:30:15 -07:00
887d7b1d5a
resolved conflicts for merge of 1f65550f to master
Change-Id: I65585939a57c561064d370be131c0197de0f08c3

Amit Mahajan   commited 2014-06-10 10:47:26 -07:00
93a3aad019
am e5a28d34: am c4418f95: Handle provisioning APN by turning off/on radio.
* commit 'e5a28d34f662c469f85590dda28fc02eca12204b':
  Handle provisioning APN by turning off/on radio.

Amit Mahajan   authored and   Android Git Automerger   commited 2014-06-09 19:50:09 +00:00
d03a49b4aa
Handle provisioning APN by turning off/on radio.
The change is specific to AT&T as they want no signaling from device during provisioning.
I've tested following cases:
- expired AT&T SIM to make sure provisioning flow works as expected.
- airplane mode on/off with both active and expired AT&T SIM.
- wifi <-> mobile transitions work okay.
- LTE with Verizon SIM (basic sanity).

bug: 13190133

Change-Id: I215963174ae6000ae71d1dda693f95413f3d6e81

Amit Mahajan   authored and   John Huang   commited 2014-06-09 17:55:27 +00:00
c4418f95e4
Fix public API of LinkProperties.
bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc

Robert Greenwalt   commited 2014-06-08 12:54:23 -07:00
69aceaf7f2
DO NOT MERGE Report new network scores back to factories.
This is a first order approx of what we want - should probably be good enough in most cases.

bug:15277751

Change-Id: I10e3b25f6ad5c7e022ba966ed514d4e6a999180d
(cherry picked from commit 94a5c61cb82401dd777d0a7ac43183d92d955323)

Robert Greenwalt   commited 2014-06-04 19:15:17 +00:00
63d11e519f
Merge "Report new network scores back to factories."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-06-04 18:48:44 +00:00
879bd9484d
Report new network scores back to factories.
This is a first order approx of what we want - should probably be good enough in most cases.

bug:15277751

Change-Id: I10e3b25f6ad5c7e022ba966ed514d4e6a999180d

Robert Greenwalt   commited 2014-06-04 18:38:01 +00:00
85230629df
Fix legacy APIs.
Two fixes.  First make sure we mark the request as handled by the network handling it.
Second, convert ensureRouteToHostForAddress to use the new legacyNetworkForType.

bug:14993207
Change-Id: I230968938ca0ed91f834b36a2af60caff2eab682

Robert Greenwalt   commited 2014-06-03 17:22:11 -07:00
ae5370cab5
Fix Legacy NetworkInfo API
Make the connectivity changed broadcasts send correct NetworkInfos.
Also update the results of getNetwork.

bug:15290306
bug:15191336
bug:14993207
Change-Id: Ie99ad25f3ebb90d18348e7013761b139e7481866
(cherry picked from commit 16fe1c18289de200d2249e51db8c0986619f487b)

Robert Greenwalt   commited 2014-06-03 14:00:56 +00:00
802c11080e
Fix Legacy NetworkInfo API
Make the connectivity changed broadcasts send correct NetworkInfos.
Also update the results of getNetwork.

bug:15290306
bug:15191336
bug:14993207
Change-Id: Ie99ad25f3ebb90d18348e7013761b139e7481866

Robert Greenwalt   authored and   Lorenzo Colitti   commited 2014-06-03 19:58:54 +09:00
03f23bfe91
Refactor NetworkFactory.
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use.  Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
(cherry picked from commit 9a17b9c5a256cb4bb14821c5ee89b03b99c045e8)

Robert Greenwalt   commited 2014-06-03 01:26:48 +00:00
06c734e52e
Rewrite startUsingNetworkFeature for new API
bug:14993207
Change-Id: I041a80faa07bf3094af13a6c606f3b15aa03f789
(cherry picked from commit 09fe5e618b09965183cf53fba87c39025a19e8d1)

Robert Greenwalt   commited 2014-06-02 23:29:20 +00:00
3dc73e576b
Refactor NetworkFactory.
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use.  Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291

Robert Greenwalt   commited 2014-06-02 16:19:08 -07:00
70cf11649e
Merge "Rewrite startUsingNetworkFeature for new API"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-06-02 23:12:29 +00:00
857436debf
Support legacy routes added by apps via ensureRouteToHost().
Change-Id: I0ee1ca89fdc859d75a89021ca8c1902811b1e4a9
(cherry picked from commit fb17b32550de624b7f476b70b7a2fc77f31dde7d)

Sreeram Ramachandran   commited 2014-05-30 18:21:34 +00:00
9052fa125a
Support legacy routes added by apps via ensureRouteToHost().
Change-Id: I0ee1ca89fdc859d75a89021ca8c1902811b1e4a9

Sreeram Ramachandran   commited 2014-05-29 19:00:37 -07:00
1e459f2365
Don't break things if a network goes back to CONNECTED.
Currently, if a network goes from CONNECTED to some other "live"
state (e.g., CONNECTING, because it's VERIFYING_POOR_LINK) and
back, ConnectivityService treats it as if a new network had
connected.  This causes it to attempt to create the network
(which fails, since a network with that netid already exists), to
trigger verification, and if the verification succeeds, to tear
down the network because the request it's satisfying is already
satisfied by the network itself.

Instead, if creating the network fails, assume it's because the
network had already been created, and bail out.

Also, when validation completes, ignore NetworkRequests that were
being served by the same NetworkAgent as before.

Bug: 15244052

(cherry picked from commit cfff026ec47afc7e31f60f80e3deea7f4e2f9be5)

Change-Id: I52c2220e8f1d98fca765880be3040593e92722ed

Lorenzo Colitti   commited 2014-05-29 21:36:07 +09:00
47f597dfbf
Don't break things if a network goes back to CONNECTED.
Currently, if a network goes from CONNECTED to some other "live"
state (e.g., CONNECTING, because it's VERIFYING_POOR_LINK) and
back, ConnectivityService treats it as if a new network had
connected.  This causes it to attempt to create the network
(which fails, since a network with that netid already exists), to
trigger verification, and if the verification succeeds, to tear
down the network because the request it's satisfying is already
satisfied by the network itself.

Instead, if creating the network fails, assume it's because the
network had already been created, and bail out.

Also, when validation completes, ignore NetworkRequests that were
being served by the same NetworkAgent as before.

Bug: 15244052
Change-Id: Ifd73558e5be452d9ef88c64cca429d5f302bf354

Lorenzo Colitti   commited 2014-05-29 19:19:54 +09:00
f28fd3d850
Move dis/enable of mobile data to Telephony
ConnectivityService doesn't do this anymore.

bug:15077247
Change-Id: I3208c91b2c0369b594987f39ca29da7478435513
(cherry picked from commit 53013c87496980b534e447e717a32698fbd4bca0)

Robert Greenwalt   authored and   Dave Langemak   commited 2014-05-27 20:28:50 +00:00
0c150c0082
Rewrite startUsingNetworkFeature for new API
bug:14993207
Change-Id: I041a80faa07bf3094af13a6c606f3b15aa03f789

Robert Greenwalt   commited 2014-05-27 13:24:14 -07:00
25ef738d75
(DO NOT MERGE) Battery monitoring fixes:
- Improve monitoring of level changes to not be confused
  when it goes up while draining or down while charging.
- Put back in connectivity service code to tell battery
  stats about the interfaces.
- Turn back on reporting of mobile radio active state
  from the RIL.
- Fix bug in marshalling/unmarshalling that would cause
  the UI to show bad data.

Change-Id: I733ef52702894cca81a0813eccdfc1023e546fce

Dianne Hackborn   commited 2014-05-22 16:43:17 -07:00
3508963dcf
Merge "Battery monitoring fixes:"
Dianne Hackborn   authored and   Android (Google) Code Review   commited 2014-05-22 17:22:15 +00:00
a2fabf4d1d
Battery monitoring fixes:
- Improve monitoring of level changes to not be confused
  when it goes up while draining or down while charging.
- Put back in connectivity service code to tell battery
  stats about the interfaces.
- Turn back on reporting of mobile radio active state
  from the RIL.
- Fix bug in marshalling/unmarshalling that would cause
  the UI to show bad data.

Change-Id: I733ef52702894cca81a0813eccdfc1023e546fce

Dianne Hackborn   commited 2014-05-22 09:43:18 -07:00
8cc6a4994b
Move dis/enable of mobile data to Telephony
ConnectivityService doesn't do this anymore.

bug:15077247
Change-Id: I3208c91b2c0369b594987f39ca29da7478435513

Robert Greenwalt   commited 2014-05-21 21:34:05 -07:00
f5b09c82ca
Delete the EthernetDataTracker.
Code search says these are the only two files that use it. The
tracker will be resurrected in a slightly different form in
frameworks/opt/net/ethernet.

Bug: 14993642
Bug: 14981801
Change-Id: I2477668ca78dfe46661dda1d97c7f786fd7eba35

Lorenzo Colitti   commited 2014-05-21 16:40:46 -07:00
347122d298
Add NetworkFactory names and unregistration.
Some Factories come and go (Telephony) and so they need to be able to unregister.
Also, debugging is tough when the factories are anonymous, so add names for logging.

Lastly, only send single set of NetworkRequests to a newly registered NetworkFactory
and only send the requests.

Change-Id: I717d63363f25c446f8ecf38d933b1a35d744af6e

Robert Greenwalt   commited 2014-05-20 09:03:57 -07:00
46dcbab0a2
Fix the build
Change-Id: I18f78f6055f6f9c14571058d6834c8dec01aa732

Robert Greenwalt   commited 2014-05-19 11:00:12 -07:00
cf81de2b0d
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

Robert Greenwalt   commited 2014-05-19 08:17:05 -07:00
0eb55c16c4
Merge "Decouple network_sampling frequency from VDBG"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-05-18 14:43:12 +00:00
47a9a006b6
Decouple network_sampling frequency from VDBG
Add a special debug flag for testing network sampling.

Change-Id: Ibe572c3b5648ca25f1e5be2c61e5c5ad2979b2cb

Robert Greenwalt   commited 2014-05-16 17:19:24 -07:00
2a1bbad562
Merge "Stop clatd when starting the Nat464Xlat service."
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2014-05-16 23:52:52 +00:00
0e4a21806a
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

Lorenzo Colitti   commited 2014-05-16 14:02:13 -07:00
c050e7b935
Merge "Clean up when we switch networks."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-05-16 17:16:19 +00:00
be2d0e890d
Clean up when we switch networks.
Need to unhitch mNetworkForRequestId when a network is no longer
satisfying a request.

Change-Id: I3b3cde7dd92ec87a76ae7a0825ad22e892fa8fd5

Robert Greenwalt   commited 2014-05-16 08:54:07 -07:00
09f5803344
Add net.dns system properties
Some apps rely on them.

bug: 14992618
Change-Id: I5766f26b77004e9cfcc90fac657817eab67f9ac7

Robert Greenwalt   commited 2014-05-15 16:29:40 -07:00
fbd7364a0d
Merge "Add networks and requests to CS.dump"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-05-14 13:44:26 +00:00
235ffacbd1
Add networks and requests to CS.dump
Adds debugging.

Change-Id: I352dfe970c990fd210f3d1598519e321bbdd6ed5
(cherry picked from commit 9bdf6bd99db56c652ba9a62d91f258d11d19ca9f)

Robert Greenwalt   commited 2014-05-14 13:12:23 +00:00
a6d85c8ea1
Add Multinetwork API
Change-Id: I3a9cef0d416db96d05098dd989ee3fef3b1e9274
(cherry picked from commit cc5e6afa1ba0bef099bcb21a64a36bc2bf7951db)

Robert Greenwalt   commited 2014-05-14 13:06:56 +00:00
f99b8393d6
Handle legacy synchronous inspectors
getNetworkInfo, getActiveNetworkInfo, etc

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

Change-Id: I4611d6481b1a76fe4a4ce22232a2a329de2a6e0c

Robert Greenwalt   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:35 -07:00
be46b75c3b
Get clatd/Nat464Xlat working with new NetworkAgents.
Change-Id: I65dfb59ce519a42bdb872940d229039b5403fd92

Paul Jensen   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:35 -07:00
3927e336e7
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

Lorenzo Colitti   commited 2014-05-14 03:56:34 -07:00
52f1e4631e
Disable calls to MobileDataStateTracker.isProvisioning() as there is no more
MobileDataStateTracker so these just crash.

Change-Id: Ib45a85db505c0a99fb65d9a6d0c39b860f9d019d

Paul Jensen   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:34 -07:00
c206e65756
Add NetworkMonitor.
At present the network evaluation / captive portal detection
is disabled pending addition of API to bind socket to network.

Change-Id: I5d1f5dc86d4dd9481d52dd45d6da0732054c8315

Paul Jensen   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:34 -07:00
4bc35b4aa5
Separate network and interface addition/removal netd APIs.
This should facilitate stacked interfaces (i.e. clatd).

Change-Id: Ib3e7a4d3847ef6ec4449451f6da42e75959baa4f

Paul Jensen   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:34 -07:00
bff73490ac
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

Robert Greenwalt   authored and   Lorenzo Colitti   commited 2014-05-14 03:56:34 -07:00
e20f7a2429