Commit Graph

1427 Commits

Author SHA1 Message Date
Robert Greenwalt
b8401730a8 Add logging to track down weird ConnectivityManager issue.
bug:15771399
Change-Id: I0a7150286f94262414005298e6f038f278347a7c
2014-06-23 15:33:40 -07:00
Lorenzo Colitti
3718680598 Assert that RT_SCOPE_* and IFA_F_* are not zero.
If these constants are zero (or, rather, if they're not all
different), the test will fail with more cryptic error messages
whose cause is not obvious. Clearly check for that here.

Bug: 15602893
Change-Id: I7ca4a9c5e3d592fd93fbfa1b50666a1861a0031d
2014-06-13 17:20:20 +09:00
Robert Greenwalt
f72c856009 Merge "Fix build" 2014-06-12 05:34:42 +00:00
Robert Greenwalt
c4920a555d Fix build
Re-finalizing some classes.  The api/current.txt was updated separately but the change
that made them final got skipped.  Also had same issue for some @hide's that were removed.

Change-Id: I423bb7b3029ee03425a3c446bda51ab8191887c1
2014-06-12 16:24:38 -07:00
Robert Greenwalt
6f033963ff am 2d0ab42b: Merge "Apply API Council comments to ConnectivityManager" into lmp-preview-dev
* commit '2d0ab42b1420db884d26fd2ef22710b5a887e9a6':
  Apply API Council comments to ConnectivityManager
2014-06-12 22:31:07 +00:00
Robert Greenwalt
f57c03c3b9 Apply API Council comments to ConnectivityManager
rename isNetworkActive -> isDefaultNetworkActive
rename registerNetworkActiveListener -> registerDefaultNetworkActiveListener
make listenForNetwork/requestNetwork take a NetworkRequest
rename NetworkCallbackListener -> NetworkCallback
rename listenForNetwork -> registerNetworkCallback
rename releaseNetworkRequest -> unregisterNetworkCallback
remove NetworkRequest param from NetworkCallback functions
rename onNetworkCapabilitiesChagned to onCapabilitiesChanged
remove onReleased
change time units in onLosing from Sec -> ms

bug: 15142362
Change-Id: Ibc96e3f461706efe1eafa0d85605249cfd6e9fdd
2014-06-11 23:17:46 -07:00
Robert Greenwalt
b1f76f229c Fix Build
Change-Id: Iebbce8eaf21b3d2ba01ec720812d38018b13529e
2014-06-11 18:36:36 -07:00
Robert Greenwalt
20091e092e Fix build breakage.
Change-Id: Ideb32704ce5dc37ef36b05609f88da2aa55b3a00
2014-06-11 18:06:55 -07:00
Robert Greenwalt
d17ae25aea Merge "Make IpPrefix final." 2014-06-11 21:23:31 +00:00
Robert Greenwalt
2f6c9155a4 am f7c964fa: Merge "Fix Build" into lmp-preview-dev
* commit 'f7c964fa06257d6db1b894bfbe905ca125c755c8':
  Fix Build
2014-06-12 19:57:23 +00:00
Robert Greenwalt
4998e952f8 Make IpPrefix final.
Couldn't resolve a merge conflict, so skipped and make the change this way.

Change-Id: Ib043f660fca2090f0d12a5a707e5e1ad28f76adb
2014-06-12 12:57:19 -07:00
Robert Greenwalt
795563325d am 9c6d406e: Fix build breakage.
* commit '9c6d406eb7ab0fce40fb7cd1257714a29d06774c':
  Fix build breakage.
2014-06-12 19:57:11 +00:00
Robert Greenwalt
5e9af44a9a am c7d65d75: Merge "Fix wifi connectivity issues." into lmp-preview-dev
* commit 'c7d65d759be6cd48a7bbaa4f061b4c4f85424b11':
  Fix wifi connectivity issues.
2014-06-12 19:56:55 +00:00
Robert Greenwalt
98876d2928 am e1f5b5e0: Merge "Minor changes to the LinkAddress API docs." into lmp-preview-dev
* commit 'e1f5b5e0cd5206e01e1c0e2bd282d421d9951960':
  Minor changes to the LinkAddress API docs.
2014-06-12 19:56:45 +00:00
Robert Greenwalt
e1023fe0ce am 4ad1f0d3: (-s ours) Merge "Add a new IpPrefix class and use it in RouteInfo." into lmp-preview-dev
* commit '4ad1f0d31e4c998aa65344ccb8abb51cf96dd909':
  Add a new IpPrefix class and use it in RouteInfo.
2014-06-12 19:56:39 +00:00
Robert Greenwalt
bb0ec47862 am 558aeb90: Merge "Make NetworkCapabilities publicly immutable." into lmp-preview-dev
* commit '558aeb901144fac460575402e38fc8baa2da83eb':
  Make NetworkCapabilities publicly immutable.
2014-06-12 18:49:07 +00:00
Robert Greenwalt
b891bcca1f am fe5ca964: (-s ours) Merge "Fix public API of LinkProperties." into lmp-preview-dev
* commit 'fe5ca9646f86e041ed7729ecd0a006428806acf2':
  Fix public API of LinkProperties.
2014-06-12 16:53:43 +00:00
Robert Greenwalt
bfd1f4c206 Make NetworkCapabilities publicly immutable.
Applying API council comments.

bug: 15142362

(cherry picked from commit Ie0bde68b72656a676d90c0343b9756fe9268d8d6)
Change-Id: Ie0bde68b72656a676d90c0343b9756fe9268d8d6
2014-06-11 23:29:39 +00:00
Robert Greenwalt
a7918cc239 Merge "Add a new IpPrefix class and use it in RouteInfo." into lmp-preview-dev 2014-06-11 23:10:23 +00:00
Sreeram Ramachandran
aaaf7bab7f 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
(cherry picked from commit 7d3b4b9a3d4de9673119632da0ebd583e50126f7)
2014-06-11 16:32:21 -07:00
Sreeram Ramachandran
96151d642e Fix wifi connectivity issues.
http://ag/480881 changed RouteInfo.getDestination() to return an IpPrefix
instead of a LinkAddress. This makes the equals() comparison always fail.

So, when ConnectivityService.updateRoutes() is given identical routes, instead
of realizing that there's no diff, it would consider them different, and thus
add and remove the same route. The add would fail, since the route already
existed in netd, but the remove would succeed, leaving the system with no routes
and thus no connectivity.

Bug: 15564210
Change-Id: I2003b0fcb809cc20837dc489c58af37891ca4556
2014-06-11 15:56:51 -07:00
Robert Greenwalt
08bbe1fd33 Merge "Fix wifi connectivity issues." into lmp-preview-dev 2014-06-11 21:23:31 +00:00
Sreeram Ramachandran
0a6e648504 Fix wifi connectivity issues.
http://ag/480881 changed RouteInfo.getDestination() to return an IpPrefix
instead of a LinkAddress. This makes the equals() comparison always fail.

So, when ConnectivityService.updateRoutes() is given identical routes, instead
of realizing that there's no diff, it would consider them different, and thus
add and remove the same route. The add would fail, since the route already
existed in netd, but the remove would succeed, leaving the system with no routes
and thus no connectivity.

Bug: 15564210
Change-Id: I2003b0fcb809cc20837dc489c58af37891ca4556
2014-06-11 23:02:59 +00:00
Robert Greenwalt
15610080b1 am bcf103d0: Merge "Apply API review to android.net.Network:" into lmp-preview-dev
* commit 'bcf103d0ef929669268a76aa72bd90ed9af4d63d':
  Apply API review to android.net.Network:
2014-06-11 17:03:04 +00:00
Paul Jensen
c4c6498fcc Apply API review to android.net.Network:
- socketFactory() renamed to getSocketFactory()
- Make sure bindProcess() documentation points developers to getSocketFactory() as the preferred approach
- Move bindProcess() and unbindProcess() to ConnectivityManager.setProcessBoundNetwork() -- passing null clears it.
- Move getProcessBoundNetwork() to ConnectivityManager.getProcessBoundNetwork().

Bug:15142362
Bug:13885501

Change-Id: Ia55c59d52e1ec8bf10dd0d9d037bd04c0998bc71
(cherry picked from commit 5ca1e6675bf4182b6e9ca76a7696bf2e38e96c4f)
2014-06-10 22:26:11 +00:00
Robert Greenwalt
d579b350e2 Merge "Fix public API of LinkProperties." into lmp-preview-dev 2014-06-10 22:18:15 +00:00
Robert Greenwalt
87afb9411c Fix public API of LinkProperties.
bug:15142362
(cherry picked from commit 51d898fd0223a4b7c728980ab987dd985c02df5f)
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-10 15:42:19 -07:00
Robert Greenwalt
c5dd50b4c4 Merge "Minor changes to the LinkAddress API docs." into lmp-preview-dev 2014-06-10 22:12:51 +00:00
Lorenzo Colitti
8e43314ae0 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
(cherry picked from commit 9ab53650cfcd91a2a151b44b3fd1381841f76269)
2014-06-11 18:52:19 +00:00
Lorenzo Colitti
b0116bf5bf 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
2014-06-10 14:46:39 -07:00
Sreeram Ramachandran
887d7b1d5a 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
2014-06-10 14:30:15 -07:00
Amit Mahajan
93a3aad019 resolved conflicts for merge of 1f65550f to master
Change-Id: I65585939a57c561064d370be131c0197de0f08c3
2014-06-10 10:47:26 -07:00
vandwalle
b112882ab4 Merge "remember and report network score" 2014-06-09 22:30:26 +00:00
vandwalle
fc2e61014a remember and report network score
Change-Id: Iccb2ec603bc9c0d3cf1976d0cc3f343cb1096494
2014-06-09 14:50:47 -07:00
Amit Mahajan
1f65550f8a am d03a49b4: am e5a28d34: am c4418f95: Handle provisioning APN by turning off/on radio.
* commit 'd03a49b4aa1f51408fbfafd34ac5c7b5010c7270':
  Handle provisioning APN by turning off/on radio.
2014-06-09 21:12:43 +00:00
Amit Mahajan
d03a49b4aa am e5a28d34: am c4418f95: Handle provisioning APN by turning off/on radio.
* commit 'e5a28d34f662c469f85590dda28fc02eca12204b':
  Handle provisioning APN by turning off/on radio.
2014-06-09 19:50:09 +00:00
Amit Mahajan
c4418f95e4 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
2014-06-09 17:55:27 +00:00
Robert Greenwalt
dc69ebdf94 Merge "Apply API review to android.net.Network:" 2014-06-08 23:41:27 +00:00
Robert Greenwalt
69aceaf7f2 Fix public API of LinkProperties.
bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-08 12:54:23 -07:00
Paul Jensen
8cdda64b9c Apply API review to android.net.Network:
- socketFactory() renamed to getSocketFactory()
- Make sure bindProcess() documentation points developers to getSocketFactory() as the preferred approach
- Move bindProcess() and unbindProcess() to ConnectivityManager.setProcessBoundNetwork() -- passing null clears it.
- Move getProcessBoundNetwork() to ConnectivityManager.getProcessBoundNetwork().

Bug:15142362
Bug:13885501

Change-Id: Ia55c59d52e1ec8bf10dd0d9d037bd04c0998bc71
2014-06-08 12:09:18 -07:00
Robert Greenwalt
4a52c697d2 Fix the marking of restricted network requests
Need to realized that the NOT_RESTRICTED bit is set by
default, so if looking at what bits are set to decide if
we want NOT_RESTRICTED cleared, we need to ignore the
bit itself.

bug:15456019

Change-Id: Iecae598f47ec7306d475e2262bb1c452ddf0fc75
2014-06-05 23:59:48 +00:00
Robert Greenwalt
84e2f28f33 am d060ac14: (-s ours) Merge "DO NOT MERGE Report new network scores back to factories." into lmp-preview-dev
* commit 'd060ac1433cec943e915b026cb5c76bd6615538e':
  DO NOT MERGE Report new network scores back to factories.
2014-06-04 21:32:34 +00:00
Robert Greenwalt
b344398404 am 02006632: Merge "Call a network restricted only if all capabilities are restricted" into lmp-preview-dev
* commit '02006632ef34d70e196a47a3b11ff344005acbb1':
  Call a network restricted only if all capabilities are restricted
2014-06-04 20:52:50 +00:00
Robert Greenwalt
63d11e519f 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)
2014-06-04 19:15:17 +00:00
Robert Greenwalt
879bd9484d Merge "Report new network scores back to factories." 2014-06-04 18:48:44 +00:00
Lorenzo Colitti
33920d2516 am 7a3077a9: Merge "Make requests for restricted networks not require unrestricted access." into lmp-preview-dev
* commit '7a3077a9a7405048b9cd28452efbc28a857acb25':
  Make requests for restricted networks not require unrestricted access.
2014-06-04 18:46:31 +00:00
Robert Greenwalt
b5a1be98de am cffe6d73: Merge "Fix legacy APIs." into lmp-preview-dev
* commit 'cffe6d7315bc364d913e6a7daf1b62b7d173bfb7':
  Fix legacy APIs.
2014-06-04 18:44:59 +00:00
Robert Greenwalt
85230629df 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
2014-06-04 18:38:01 +00:00
Robert Greenwalt
6f82b6b568 am e8f910c6: Fix Legacy NetworkInfo API
* commit 'e8f910c635710e4b2d7f299ba33f6205cc4371e3':
  Fix Legacy NetworkInfo API
2014-06-04 17:03:25 +00:00
Robert Greenwalt
903141778b am ead9aa35: Merge "Refactor NetworkFactory." into lmp-preview-dev
* commit 'ead9aa35d4f5b94d9d602247826ba97afe2b6791':
  Refactor NetworkFactory.
2014-06-04 17:01:56 +00:00