Commit Graph

2185 Commits

Author SHA1 Message Date
Erik Kline
0f9cb6b6f5 am 56066f60: am f35e9344: am ec69003d: am 2308195d: Pass signal strength thresholds inside a Bundle
* commit '56066f6036afca62cf48b5971131503dba6ae7c1':
  Pass signal strength thresholds inside a Bundle
2015-07-18 18:21:25 +00:00
Lorenzo Colitti
115d5e5ae8 am a1694609: am 1c6b02af: am da355c80: am 87f93fe6: Support NetworkCallbacks based on signal strength.
* commit 'a1694609508b87c9c844ce07fb7a409b59c6b693':
  Support NetworkCallbacks based on signal strength.
2015-07-18 18:21:18 +00:00
Lorenzo Colitti
adffd32afe am 15cda089: am 6163290e: am e647d93d: am d1039d17: ConnectivityManager API for for packet keepalives.
* commit '15cda089b6209ba8d68beea81271b44612bbfb95':
  ConnectivityManager API for for packet keepalives.
2015-07-18 18:05:13 +00:00
Lorenzo Colitti
b0ebb04d8e am 2d2a5992: am 47a47d3b: am 00365fc6: am 6d71af1f: Make immutable NetworkCapabilities more explicit.
* commit '2d2a59924d758660c40358477c54a85b03b70b75':
  Make immutable NetworkCapabilities more explicit.
2015-07-18 18:05:07 +00:00
Erik Kline
2308195d12 Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f
2015-07-18 17:28:52 +00:00
Lorenzo Colitti
87f93fe6f4 Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
2015-07-18 17:28:26 +00:00
Lorenzo Colitti
d1039d1731 ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc
2015-07-18 17:00:13 +00:00
Lorenzo Colitti
6d71af1f53 Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1
2015-07-18 16:59:47 +00:00
Erik Kline
af953d0d56 am e3454420: am 678702d3: am 32cfbc9d: am 68bc390c: am c2ce3ff6: Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev
* commit 'e345442007b453c5f715ab204d48bb2082840c53':
  Log NetworkRequestInfo to get more detailed history
2015-07-14 18:45:03 +00:00
Etan Cohen
74dc5c6558 am 6c2bba69: am afe38c01: am a249976c: am 686be938: am c09544bb: Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev
* commit '6c2bba69d561ec28143d81cdb67314aa74563ce0':
  Fix filter on CONNECTIVITY_ACTION updates
2015-07-14 16:51:38 +00:00
Erik Kline
c2ce3ff6dd Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev 2015-07-14 04:09:29 +00:00
Erik Kline
47401fa30e Log NetworkRequestInfo to get more detailed history
Bug: 21641983
Bug: 22235775
Bug: 22299819
Bug: 22358164
Change-Id: I48a2d162dd499a3590f06d805267a63822856969
2015-07-14 11:46:51 +09:00
Robert Greenwalt
dd1e223ce9 Fix filter on CONNECTIVITY_ACTION updates
Only send for network types which the network supports.

bug:22411968
Change-Id: I97765544eb653caf0ea4fc5d3feec5742d5d88dc
2015-07-10 16:26:40 -07:00
Robin Lee
d1ac9b6cb3 am f8b96edf: am 81093dd0: am 51cfb3a4: am 2164cf4f: am 90a45506: Merge "Legacy VPN calls to require a userID" into mnc-dev
* commit 'f8b96edf47b4d54ccc91842c16cc505901459cae':
  Legacy VPN calls to require a userID
2015-07-10 20:17:52 +00:00
Robert Greenwalt
4edbed5c6f am cc5cd900: am e84c6b37: am 2cef47ff: am 66f59dc1: am 99959f18: Merge "Enable EMERGENCY mobile connections." into mnc-dev
* commit 'cc5cd90029a1968ec3126f73735fef3234a31678':
  Enable EMERGENCY mobile connections.
2015-07-10 19:32:12 +00:00
Robin Lee
90a455062e Merge "Legacy VPN calls to require a userID" into mnc-dev 2015-07-10 19:05:38 +00:00
Robert Greenwalt
99959f18e4 Merge "Enable EMERGENCY mobile connections." into mnc-dev 2015-07-10 18:23:24 +00:00
Paul Jensen
dce0b6f88c am 7aafe379: am 59cabcec: am 42280a7a: am 0bac7fa7: am 823ea71e: Fix build break.
* commit '7aafe37981427f83f8eb263a610e60cd292dbfdb':
  Fix build break.
2015-07-10 17:54:12 +00:00
Paul Jensen
0c9ea1c57a am c4417cf9: am f50ac2e7: am cfedbc43: am 7f9e3274: am 9eb4dd2d: Merge "Fallback to Cellular if WiFi fails to validate" into mnc-dev
* commit 'c4417cf98a98211072b36cb246d0e30aa650e2f2':
  Fallback to Cellular if WiFi fails to validate
2015-07-10 16:58:13 +00:00
Paul Jensen
8330b1e491 am f1576d8d: am 54b98c71: am 99ef3aef: am b54ec1bd: am 36d8b23b: Merge "Prepare some ConnectivityService logic for fallback to Cellular change" into mnc-dev
* commit 'f1576d8d07e844331685c35d976125f51a6d1a4d':
  Prepare some ConnectivityService logic for fallback to Cellular change
2015-07-10 16:58:06 +00:00
Paul Jensen
823ea71ef3 Fix build break.
Automatic merge commit caused breakage due to someone else's
intervening change adding a call site of a function whose last
parameter I removed.  Function in question is
ConnectivityService.rematchAllNetworksAndRequests.
Changes that merged badly are ece7dfa and 41c19a0.

Change-Id: I8fd32e1a187236a65c1b7c0ecdf17b817d108fd0
2015-07-10 12:29:23 -04:00
Paul Jensen
1de03c6e5a am 851bcaf2: am ca36baaf: am 2cb16d2e: am 75a43340: am 86599d6a: Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev
* commit '851bcaf2edc88d3d193304d64415a50613f46141':
  Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
2015-07-10 15:57:45 +00:00
Paul Jensen
9eb4dd2df9 Merge "Fallback to Cellular if WiFi fails to validate" into mnc-dev 2015-07-10 15:51:38 +00:00
Paul Jensen
36d8b23b1e Merge "Prepare some ConnectivityService logic for fallback to Cellular change" into mnc-dev 2015-07-10 15:51:23 +00:00
Paul Jensen
86599d6a2a Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev 2015-07-10 14:57:13 +00:00
Robert Greenwalt
9db5f3c1cc Enable EMERGENCY mobile connections.
Hooks the ConnectivityManager.TYPE_MOBILE_EMERGENCY,
PhoneConstants.APN_TYPE_EMERGENCY, and NetworkCapabilities.NET_CAPABILITY_EIMS
together so carrier apps can request connections to this APN.

bug:21785357
Change-Id: Id92a5e28d19407cc7a8f8b5478b23457f2f7f89d
2015-07-09 14:49:35 -07:00
Robert Greenwalt
80e1af8fa7 am c3ed104c: am 49a8822d: am 8d6620bd: am 30d822e2: am b091695b: Merge "Revive NetworkInfo\'s SUSPENDED state." into mnc-dev
* commit 'c3ed104c25621dce3bbb50fe28e0bf9923307721':
  Revive NetworkInfo's SUSPENDED state.
2015-07-09 19:12:20 +00:00
Paul Jensen
4173cceaea Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
This new class replaces the awkward string token and ConnectivityManager APIs
used by apps handling captive portals.

Bug:21343774
Change-Id: I1a2c69edb17322715bf8422bb4216b0ea60bfd59
2015-07-09 10:47:34 -04:00
Paul Jensen
25eb5fd97e Fallback to Cellular if WiFi fails to validate
Previously, once a network validated, for the purposes of comparing networks
to select the default network, we always considered it validated.
With this change if a network later fails to validate, we'll take this latest
validation result into account.  This means if WiFi and cellular are up
(e.g. if we recently switched from cellular->WiFi, and cellular is now
lingering) and both are validated, but for some reason WiFi fails a validation,
cellular will become the default network connection.

Bug:20896761
Change-Id: I858aa10c1aaec5cd9032067f960963409107bdb1
2015-07-09 10:26:17 -04:00
Paul Jensen
ece7dfac67 Prepare some ConnectivityService logic for fallback to Cellular change
Reduce the duplication of some logic so when falling back to Cellular
when WiFi fails to validate is enabled, there's less chance for bugs
and failures:
1. De-duplicate several Network vs NetworkRequest matching functions
2. Remove the very tricky nascent logic by adding a simple "lingering" bit.

Bug:20896761
Change-Id: I21da9e827eec9cfd6835fcaa650192b9186ed053
2015-07-09 10:26:08 -04:00
Robert Greenwalt
41c19a021d Revive NetworkInfo's SUSPENDED state.
This got lost in the multinetwork work for L.  It means
that if telephony stops having the ability to pass packets for a while
the rest of the platform doesn't know.

Telephony enters the suspended state if it enters a telephony call
while using certain radio access technologies, or if it switches to
one of those RATs while in a call.  It also can enter this state if
it temporarily loses contact with the network - the modem will
not report the loss of the data call for an indeterminant time in
the hope that regaining the network will restore the connection
without harm to any ongoing ip layer interactions.  For example
passing through a tunnel or taking an elevator trip may use this
mechanism.

bug: 19637156
Change-Id: If9fde68175e8561c19323c81fbfcb02a6e5a00fb
2015-07-08 20:42:55 -07:00
Robin Lee
466997fec7 Legacy VPN calls to require a userID
This way, system applications with INTERACT_ACROSS_USERS permission will
be able to fetch the information they need.

Pre-requisite for bug 21499103

Change-Id: I7e759d5039ae6e85abc6435049016b1dcaabc834
2015-07-07 19:37:21 +00:00
Paul Jensen
fe41722b10 am 5973eb48: am bf816248: am e51c46b0: Merge "Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API" into mnc-dev
* commit '5973eb48220e1e44a4a3192cd9740fe8b47f8a3a':
  Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API
2015-07-03 05:35:58 +00:00
Paul Jensen
78f6b805dc Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API
This better pairs up with
registerNetworkCallback(NetworkRequest, PendingIntent).

Bug:22175708
Change-Id: I336df3f48a0b814f1cbeba6d00afc4e6cc536483
2015-06-30 14:29:18 -04:00
Paul Jensen
015b5fa610 am 2d72041d: am 013275d5: am 89a3e1bb: Merge "Don\'t reevaluate disconnected networks" into mnc-dev
* commit '2d72041d47faa6718a7a0ec0b9b9b9b75757651b':
  Don't reevaluate disconnected networks
2015-06-30 11:44:49 +00:00
Paul Jensen
89a3e1bbb3 Merge "Don't reevaluate disconnected networks" into mnc-dev 2015-06-30 11:11:14 +00:00
Erik Kline
3a5abfabe7 am f2a08d05: am 49aeed9f: am 5f950417: Merge "Fix use of reachable DNS server logic" into mnc-dev
* commit 'f2a08d054cdc301eb66c957f9ae05307d1e1f215':
  Fix use of reachable DNS server logic
2015-06-30 07:06:06 +00:00
Erik Kline
1c8fab54bd Fix use of reachable DNS server logic
Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().

Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.

Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
2015-06-30 12:12:37 +09:00
Robert Greenwalt
6acc36f8be am 07fae068: am b3fcf1af: am b6e69b8c: Merge "Add Validation logging." into mnc-dev
* commit '07fae068d3edc7b265f47c8340dfa105064c09fc':
  Add Validation logging.
2015-06-26 23:13:15 +00:00
Robert Greenwalt
b6e69b8c80 Merge "Add Validation logging." into mnc-dev 2015-06-26 22:40:31 +00:00
Robert Greenwalt
2784ed6559 Add Validation logging.
Persist the last 20 lines of validation info for the last 10
networks.

bug: 21599856
Change-Id: I8124480cc9181eea2adb7eb6eabcd07c9506b6d3
2015-06-26 11:12:39 -07:00
Paul Jensen
773f4f38a0 Don't reevaluate disconnected networks
This serves no purpose and adds several log messages every time a
network disconnects.  The extra log messages contribute to
NetworkMonitor's chatty-ness and towards it getting muted.

Bug:21480101
Change-Id: I372f9939c534f77b052a15fdb2cd5288d19ddbab
2015-06-26 11:56:33 -04:00
Erik Kline
603e78e796 am 00d28aee: am 2800c9fd: am 8dbe37c6: Merge "Don\'t lose critical success/failure messages" into mnc-dev
* commit '00d28aee898cf50530b61d099228745f674fa8da':
  Don't lose critical success/failure messages
2015-06-25 05:35:55 +00:00
Erik Kline
8dbe37c6b5 Merge "Don't lose critical success/failure messages" into mnc-dev 2015-06-25 03:46:35 +00:00
Erik Kline
f5086144f3 Don't lose critical success/failure messages
Occasionally, "dumpsys connectivity --diag" will show measurement
results without success or failure messages.  Properly record the
error before decrementing the countdown latch.

Bug: 20733156
Change-Id: Ic654dedb753a65a96fe870f79fb296fbfc459fcb
2015-06-24 20:02:20 +09:00
Lorenzo Colitti
5d265fdc05 am 8ab9cbd3: am 208b626e: am 7f78b330: Use heads-up notifications when selecting networks with no Internet
* commit '8ab9cbd3ce1d3643f450801e991aafcea6e1946f':
  Use heads-up notifications when selecting networks with no Internet
2015-06-24 10:08:49 +00:00
Lorenzo Colitti
7f78b33089 Use heads-up notifications when selecting networks with no Internet
Currently, when connecting to a network that has a captive portal
or has no Internet access, we display a regular notification.
Because this notification is easy to miss, switch to using a
heads-up notification if the user just manually selected the
network. If the system connects automatically, continue to use a
regular notification.

Bug: 20081183
Change-Id: I7a988b2bddfe898a0d2607ad85a04b227d678469
2015-06-24 17:47:44 +09:00
Adam Lesinski
ec9c1cb1b4 am 9d05553b: am ce5bcf8b: am f37606b6: Merge "Extend the time between WiFi energy samples" into mnc-dev
* commit '9d05553b07fe2ba3534e5f39372165c6f48b99a4':
  Extend the time between WiFi energy samples
2015-06-23 22:21:51 +00:00
Paul Jensen
c9bbac4472 am 0a99ca6e: am daf6b73b: am 9065b810: Merge "Disallow requesting networks with mutable NetworkCapabilities." into mnc-dev
* commit '0a99ca6e3c15983e91273fbc1c109f84f25ea982':
  Disallow requesting networks with mutable NetworkCapabilities.
2015-06-23 21:31:00 +00:00
Paul Jensen
b7b4416235 am 79437726: am afb94be6: am 28dd8c4a: Merge "Fix missing NetworkCallbacks for NET_CAPABILITY_VALIDATED changes" into mnc-dev
* commit '794377266121cafc365b8d284b06e03c593feeae':
  Fix missing NetworkCallbacks for NET_CAPABILITY_VALIDATED changes
2015-06-23 21:30:54 +00:00