Commit Graph

2168 Commits

Author SHA1 Message Date
Erik Kline
6dc0891236 am 68bc390c: am 204b77ac: Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev
* commit '68bc390c0ab592b86b93e153fcc0c0dd51545e44':
  Log NetworkRequestInfo to get more detailed history
2015-07-14 06:17:07 +00:00
Erik Kline
204b77ac87 Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev 2015-07-14 04:09:29 +00:00
Erik Kline
edf878bedb 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
Erik Kline
99f47eaf04 Merge "Pass signal strength thresholds inside a Bundle" into mnc-vt-dev 2015-07-14 01:50:52 +00:00
Etan Cohen
67b1d603a4 am 686be938: am c09544bb: Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev
* commit '686be93854cce44d2dd87148ff8063edc89b6d7b':
  Fix filter on CONNECTIVITY_ACTION updates
2015-07-13 23:32:43 +00:00
Erik Kline
57fc627c32 Pass signal strength thresholds inside a Bundle
Bug: 21407651
Change-Id: I2c80e89441e2eb15a246cb1fa9347f886cefa80f
2015-07-13 18:01:15 +09:00
Robert Greenwalt
3df86c6974 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
1fdce40a96 am 2164cf4f: am 718df19e: Merge "Legacy VPN calls to require a userID" into mnc-dev
* commit '2164cf4f4043b4892db5688ed53624af758fcdaa':
  Legacy VPN calls to require a userID
2015-07-10 19:35:39 +00:00
Robert Greenwalt
79661f9187 am 66f59dc1: am 4ab39690: Merge "Enable EMERGENCY mobile connections." into mnc-dev
* commit '66f59dc1bde15be207d49fafb97db372cb01d977':
  Enable EMERGENCY mobile connections.
2015-07-10 19:22:59 +00:00
Paul Jensen
41b982ccc5 am 0bac7fa7: am 8079795a: Fix build break.
* commit '0bac7fa791ced8e1e1ab67eca72c48be1b19eded':
  Fix build break.
2015-07-10 19:20:29 +00:00
Robin Lee
718df19ed0 Merge "Legacy VPN calls to require a userID" into mnc-dev 2015-07-10 19:05:38 +00:00
Paul Jensen
4a111ae355 resolved conflicts for merge of 7f9e3274 to mnc-vt-dev
Change-Id: I6b6e5f2c1b624bf61e9d29620750cd4de8b5f3f4
2015-07-10 15:00:14 -04:00
Paul Jensen
9d01d09c79 resolved conflicts for merge of b54ec1bd to mnc-vt-dev
Change-Id: I975dbc6544dca1be0405b8fe62e0b3941fd6913b
2015-07-10 14:35:29 -04:00
Robert Greenwalt
4ab39690aa Merge "Enable EMERGENCY mobile connections." into mnc-dev 2015-07-10 18:23:24 +00:00
Paul Jensen
8079795a7b 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 d2a43f9 and 7fb8adc.

Change-Id: I8fd32e1a187236a65c1b7c0ecdf17b817d108fd0
2015-07-10 12:29:23 -04:00
Paul Jensen
4387ed3583 Merge "Fallback to Cellular if WiFi fails to validate" into mnc-dev 2015-07-10 15:51:38 +00:00
Paul Jensen
e40da7fc3b Merge "Prepare some ConnectivityService logic for fallback to Cellular change" into mnc-dev 2015-07-10 15:51:23 +00:00
Paul Jensen
d5088d7222 am 75a43340: am f2479b9d: Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev
* commit '75a43340b675fd13eac05965438aaac2a7164658':
  Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
2015-07-10 15:19:46 +00:00
Paul Jensen
f2479b9d50 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
b1f7f75874 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
b2fbd1a5d6 am 30d822e2: am b091695b: Merge "Revive NetworkInfo\'s SUSPENDED state." into mnc-dev
* commit '30d822e2bdfde4360fc072f7f4ee16c83ac9dcc8':
  Revive NetworkInfo's SUSPENDED state.
2015-07-09 20:13:59 +00:00
Paul Jensen
75e0adb220 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
de49eb18c6 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
d2a43f9b6d 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
7fb8adcd51 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
Lorenzo Colitti
98a4c4d25b Support NetworkCallbacks based on signal strength.
Bug: 21405941
Change-Id: I2ed8a5aeb8dac464a4305671ed22abcacb485bc9
2015-07-09 03:34:25 +09:00
Lorenzo Colitti
493910ac44 ConnectivityManager API for for packet keepalives.
Bug: 21405946
Change-Id: Ie1f8f8bee684fe2bb1092a9f1bc9f5dc29b1defc
2015-07-09 03:34:24 +09:00
Lorenzo Colitti
696a214258 Make immutable NetworkCapabilities more explicit.
Bug: 21405941
Change-Id: Iafd738c31747b0f5f9356bed1c97f5f282830af1
2015-07-09 03:34:24 +09:00
Robin Lee
35ca2e7768 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
cb9c502cdb am e51c46b0: Merge "Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API" into mnc-dev
* commit 'e51c46b0683114d0aa9010a45ec0443505a0b389':
  Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API
2015-07-01 16:28:56 +00:00
Paul Jensen
169f662203 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
4a9a3f9994 am 0a1bac88: Merge "Don\'t reevaluate disconnected networks" into mnc-dev
* commit '0a1bac889906c4b8ae335d5e1fb845eaa1f44efb':
  Don't reevaluate disconnected networks
2015-06-30 11:21:23 +00:00
Paul Jensen
0a1bac8899 Merge "Don't reevaluate disconnected networks" into mnc-dev 2015-06-30 11:11:14 +00:00
Erik Kline
f8147b34d7 am 5f950417: Merge "Fix use of reachable DNS server logic" into mnc-dev
* commit '5f950417f63718880e0cc14a1a5865106b2fe551':
  Fix use of reachable DNS server logic
2015-06-30 06:43:04 +00:00
Erik Kline
a923dbae3a 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
e735d3bd99 am fafc8fef: Merge "Add Validation logging." into mnc-dev
* commit 'fafc8fef0ce78c08fd453a18ecd1ccb9c794ca1f':
  Add Validation logging.
2015-06-26 22:45:08 +00:00
Robert Greenwalt
fafc8fef0c Merge "Add Validation logging." into mnc-dev 2015-06-26 22:40:31 +00:00
Robert Greenwalt
27ff774f30 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
3c3c6e8c40 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
7d211ae751 am c28e13c2: Merge "Don\'t lose critical success/failure messages" into mnc-dev
* commit 'c28e13c2cd8b80d49ee657f70edca3c99fd5e4a9':
  Don't lose critical success/failure messages
2015-06-25 05:17:10 +00:00
Erik Kline
c28e13c2cd Merge "Don't lose critical success/failure messages" into mnc-dev 2015-06-25 03:46:35 +00:00
Erik Kline
431daaac77 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
03308b9db9 am 350bee04: Use heads-up notifications when selecting networks with no Internet
* commit '350bee0406e73e09de92c87830bcffc28f4169f6':
  Use heads-up notifications when selecting networks with no Internet
2015-06-24 09:43:38 +00:00
Lorenzo Colitti
350bee0406 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
0aa80efc0f am 92bb3df5: Merge "Extend the time between WiFi energy samples" into mnc-dev
* commit '92bb3df50b76a74f09e8663396b44e30e609f297':
  Extend the time between WiFi energy samples
2015-06-23 21:22:37 +00:00
Adam Lesinski
92bb3df50b Merge "Extend the time between WiFi energy samples" into mnc-dev 2015-06-23 21:12:35 +00:00
Adam Lesinski
f9c93168dc Extend the time between WiFi energy samples
With bursty WiFi traffic, we end up sampling the WiFi controller's
energy data quite a lot. Extend the timeout so that we sample
once there has been no activity for 15 seconds.

Note: Once the WiFi radio goes down after being active, it can come back and be
active in less than 15 seconds, which means we may sample twice quickly.

Bug:21478443
Change-Id: I99081b664f8a33fef734bc55eef4d33ac297e83a
2015-06-23 13:42:53 -07:00
Paul Jensen
a0ef32ec3f am 9065b810: Merge "Disallow requesting networks with mutable NetworkCapabilities." into mnc-dev
* commit '9065b810160e34ab4cf4613a5a3d7db69b94d453':
  Disallow requesting networks with mutable NetworkCapabilities.
2015-06-23 19:52:05 +00:00
Paul Jensen
98f1ca875b am 28dd8c4a: Merge "Fix missing NetworkCallbacks for NET_CAPABILITY_VALIDATED changes" into mnc-dev
* commit '28dd8c4a29fddce5bd462834fbe641b40c906909':
  Fix missing NetworkCallbacks for NET_CAPABILITY_VALIDATED changes
2015-06-23 19:51:57 +00:00
Paul Jensen
c8d300a039 am dafd5612: Merge "Add NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL" into mnc-dev
* commit 'dafd561298c4162dd6d95a22334e4cd3988a8f84':
  Add NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL
2015-06-23 19:51:52 +00:00