Commit graph android_packages_modules_Co.../services/core/java
Message SHA1
Add an API hint for metered multipath traffic.
This allows an application that knows how to provide seamless
network connectivity (e.g., using QUIC multipath) to find out if
doing so is desired.

Test: builds, boots, runtest frameworks-net passes.
Bug: 34630278
Change-Id: Ic7fd0b9e1cd879fdfaf84009d7125391895e9087

Lorenzo Colitti   commited 2017-02-01 17:02:29 +09:00
231efb08b7
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: b8dfec4b88 am: a566163a38 am: 3cdc4f95e0
am: 1afd50b7b8

Change-Id: I5aefc453c022286e6ee2332a53e6c9f36472e9a5

Lorenzo Colitti   authored and   android-build-merger   commited 2017-02-01 03:17:19 +00:00
0ad0efae32
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: b8dfec4b88 am: a566163a38
am: 3cdc4f95e0

Change-Id: I91f1338f3488cfc60eef0c2147aa7b1d61107cdd

Lorenzo Colitti   authored and   android-build-merger   commited 2017-02-01 02:59:42 +00:00
1afd50b7b8
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker
am: b8dfec4b88

Change-Id: I7615c9128deed7011eb9ab6f2efdcfe2e237a1a5

Lorenzo Colitti   authored and   android-build-merger   commited 2017-02-01 02:37:31 +00:00
a566163a38
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker
Rename the class and ensure that all code related to bad wifi
avoidance has names that reflect its purpose.  This will allow us
to reuse most of the the code for other purposes in future CLs.

Test: runtest frameworks-net passes
Bug: 34630278
Change-Id: Ida190e5a79e7a12f4eec07e1a3e4d9d138e83bcd

Lorenzo Colitti   commited 2017-01-31 15:42:57 +09:00
b8dfec4b88
Merge "ConnectivityServiceTest: remove flaky waitForIdle test." am: be80577f5b am: 100dd57c82 am: d635e56751
am: 5ba5fd6ee6

Change-Id: Iebafbf438ee4efcd53b3e6d5c71b34c0ca4e2c6b

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-27 10:00:14 +00:00
569a9fdb40
Merge "ConnectivityServiceTest: remove flaky waitForIdle test." am: be80577f5b am: 100dd57c82
am: d635e56751

Change-Id: I1d3707b4bc2ae00ca0fad1c3ec7e6ca859fcdd16

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-27 09:55:36 +00:00
5ba5fd6ee6
Merge "ConnectivityServiceTest: remove flaky waitForIdle test."
am: be80577f5b

Change-Id: I444746af6adc7be4a3f69243379f65aadf29ea19

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-27 09:47:05 +00:00
100dd57c82
Captive portal systel log improvements
This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit 6fe7d3cdb3)

Change-Id: I1eaab5ea702063dde3e23324d3a1b3dc172c5ac5

Hugo Benichi   authored and   Lorenzo Colitti   commited 2017-01-26 18:52:55 +09:00
6d8a58f1cd
[CS] Remove timeout event after first available
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.

Bug: 31402633
Test: all timeout related unit tests pass (new one added)

(cherry picked from commit 88087226a6)

Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748

Etan Cohen   authored and   Lorenzo Colitti   commited 2017-01-26 18:51:15 +09:00
b6ae65fe6b
Add option to skip and avoid captive portals.
Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug: 30222699

(cherry picked from commit 3fd101e574)

Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696

Calvin On   authored and   Lorenzo Colitti   commited 2017-01-26 18:50:42 +09:00
74d07eb5f3
Support timeouts for requestNetwork() invocations.
(cherry-pick of 8616c69985)
(cherry picked from commit 66721821df)

Bug: 21414325
Change-Id: I1a58823a372154589f972b98c4c428eab0e0523e

Erik Kline   authored and   Lorenzo Colitti   commited 2017-01-26 18:50:23 +09:00
61a7b73d7b
Silence the obnoxious MTU 0 error message that occur when no MTU is
specified for a given network.

Bug: 10705136

(cherry picked from commit 98f9c2c23b)

Change-Id: I89e2fdfbbfa981d435a2974422d9d9c009872d76

Pierre Imai   authored and   Lorenzo Colitti   commited 2017-01-26 18:50:18 +09:00
6783e38e36
ConnectivityServiceTest: remove flaky waitForIdle test.
This patch removes testNotWaitingForIdleCausesRaceConditions() from
ConnectivityServiceTest because it is in nature flaky and prevents using
ConnectivityServiceTest as a patch presubmit check. Estimated failure
rate is 1/15 on Nexus 6p.

This patch also simplifies how ConnectivityServiceTest waits for
handlers to become idle by removing IdleableHandlerThread and turning it
into a signle static method.

Test: $ runtest frameworks-net
Bug: 31479480
Change-Id: I2d78709cbb61d5d01cd59cff326469417f73f1ab

Hugo Benichi   commited 2017-01-24 15:22:48 +09:00
56db715395
Merge "Disable always-on VPN in factoryReset" am: 5765604627 am: 7960c6b8b5 am: 495418cd9c
am: d1b8497454

Change-Id: Iaccb7394994ccce66df0ab2f713fd890a8b999c8

Robin Lee   authored and   android-build-merger   commited 2017-01-23 17:05:42 +00:00
bb98793be5
Merge "Disable always-on VPN in factoryReset" am: 5765604627 am: 7960c6b8b5
am: 495418cd9c

Change-Id: I99207281321861a3e720b5c1e2e316e12b104677

Robin Lee   authored and   android-build-merger   commited 2017-01-23 17:01:31 +00:00
d1b8497454
Merge "Disable always-on VPN in factoryReset" am: 5765604627
am: 7960c6b8b5

Change-Id: I66b6721932ae8798cbb406cafa04ed0c92fe47f6

Robin Lee   authored and   android-build-merger   commited 2017-01-23 16:54:59 +00:00
495418cd9c
Merge "Disable always-on VPN in factoryReset"
am: 5765604627

Change-Id: I021b288e3db17ddefbea3645fd282e3ee123a6e8

Robin Lee   authored and   android-build-merger   commited 2017-01-23 16:47:58 +00:00
7960c6b8b5
Merge "Disable always-on VPN in factoryReset"
Robin Lee   authored and   Gerrit Code Review   commited 2017-01-23 16:40:07 +00:00
5765604627
Merge "More concisely export whether we have a "tetherable configuration"" am: edea114308 am: 9d02ee9030 am: fa0b8e4cee
am: 52e97fcb8a

Change-Id: I290df5269739bc7fb5ebc8614a96c38bf7faf367

Erik Kline   authored and   android-build-merger   commited 2017-01-23 07:30:22 +00:00
b3ecedaedc
Merge "More concisely export whether we have a "tetherable configuration"" am: edea114308 am: 9d02ee9030
am: fa0b8e4cee

Change-Id: Iba07ae91906fa2f0763dae831f56b4841572e1f1

Erik Kline   authored and   android-build-merger   commited 2017-01-23 07:26:28 +00:00
52e97fcb8a
Merge "More concisely export whether we have a "tetherable configuration"" am: edea114308
am: 9d02ee9030

Change-Id: Ic67b2d4589f586c67109216330f68cb1fc08c55a

Erik Kline   authored and   android-build-merger   commited 2017-01-23 07:20:32 +00:00
fa0b8e4cee
Merge "More concisely export whether we have a "tetherable configuration""
am: edea114308

Change-Id: I5f9717c9dab6b39f1fbf2186107b2a1f3f2d4f8f

Erik Kline   authored and   android-build-merger   commited 2017-01-23 07:13:56 +00:00
9d02ee9030
More concisely export whether we have a "tetherable configuration"
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - vanilla WiFi-to-mobile tethering works
Bug: 32163131
Change-Id: I20dd36b5bf7fc55a639c76ea4bdb55b650654881

Erik Kline   commited 2017-01-23 13:04:28 +09:00
cf917febba
DO NOT MERGE Unit tests for NetworkNotificationManager
Test: new unit test, no functional changes.
Bug: 32198726

(cherry picked from commit 20904677af)

Change-Id: I123de68de9ae353b95edce89eb570cfbb5f8d9a3

Hugo Benichi   commited 2017-01-20 15:08:38 +09:00
ad903ab032
StrictMode to detect untagged network traffic.
Network usage is tracked by the kernel at the UID level, which is
granular enough for normal apps, but large components (such as the
system server) are impossible to debug without adding additional
socket tagging to help identify subsystems within a UID.

To help ensure that system components tag all their network traffic,
this change offers a new StrictMode option to detect and report
untagged sockets.

Test: builds, boots, all common traffic tagged
Bug: 30943431, 30414041
Change-Id: I825c7941076054732264690247de2863342638e2

Jeff Sharkey   commited 2017-01-19 20:52:05 -07:00
9c21ac6438
DO NOT MERGE: [CS] Remove timeout event after first available
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.

Bug: 31402633
Test: all timeout related unit tests pass (new one added)

(cherry picked from commit 88087226a6)

(cherry picked from commit 69e6a108a5)

Change-Id: I0cf1a2b7d25bc9912e03fca30621809a9071396c

Etan Cohen   authored and   Lorenzo Colitti   commited 2017-01-18 19:08:11 +09:00
dcdf130646
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
(cherry-pick of 8616c69985)
(cherry picked from commit 66721821df)

Bug: 21414325

(cherry picked from commit 950bfc31f9)

Change-Id: I640c43315a071ecbf881e5ce898164915e0b787f

Erik Kline   authored and   Lorenzo Colitti   commited 2017-01-18 19:07:33 +09:00
1a1fea2d24
Disable always-on VPN in factoryReset
When network setting reset is started while always-on VPN is enabled,
application crash occurs with IllegalStateException in prepareVpn().

Therefore, it's necessary to also disable always-on VPN in factoryReset
before prepareVpn() when turning off VPN.

Bug: 29030858
Change-Id: I08c5406717dd7937d197c2e934a56d037477aafc

Koichi, Sugimoto   authored and   Robin Lee   commited 2017-01-18 10:02:58 +00:00
d1a32ad120
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is
specified for a given network.

Bug: 10705136

(cherry picked from commit 98f9c2c23b)

(cherry picked from commit 68902bc1df)

Change-Id: I12ac6f511a6760ef26f489ba3a052ca3c125e5ee

Pierre Imai   authored and   Lorenzo Colitti   commited 2017-01-18 18:12:35 +09:00
93d4c23fac
Merge "Enable mobile data always on." am: 68317d6329 am: ab50ac01d0 am: 3daca8b56b
am: 8dfc506c43

Change-Id: I8d61c1a22a702cbd23638d46dfad36365b29180c

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-17 06:56:53 +00:00
156231784f
Merge "Enable mobile data always on." am: 68317d6329 am: ab50ac01d0
am: 3daca8b56b

Change-Id: Iaf4f84f53be65800c95a4f1b456a0d2d142c8c87

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-17 04:36:21 +00:00
8dfc506c43
Merge "Enable mobile data always on." am: 68317d6329
am: ab50ac01d0

Change-Id: Ie2b6887021585a2e7246d66603dadc8d0fa1bd94

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-17 04:31:00 +00:00
3daca8b56b
Merge "Enable mobile data always on."
am: 68317d6329

Change-Id: I9758da5105b9a8eac66aaaf9e4a1658685a6a3f7

Lorenzo Colitti   authored and   android-build-merger   commited 2017-01-17 04:25:44 +00:00
ab50ac01d0
Enable mobile data always on.
Test: has been on in fishfood several months.
Bug: 23113288
Change-Id: I73ba432f619d28dab78e2d865d56aa7e7c5a67f9

Lorenzo Colitti   commited 2017-01-17 11:07:50 +09:00
73f44c7656
Stricter NetworkNotificationManagerTest
This patch changes NetworkNotificationManagerTest to populate extraInfo
of NetworkInfo in order to catch regressions in malformed format Strings
of log statements in NetworkNotificationManager.

Test: verified that the test fails when reintroducing the format String
bug.
Bug: 33737715

(cherry picked from commit 85a6c96ef3)

Change-Id: Ic2f23e860a17cb83b90edcfd2ba365134cacfe36

Hugo Benichi   commited 2017-01-16 15:15:26 +09:00
60ad351e6b
Temporarily restore the net.dnsX system properties.
This will limit app breakage in dogfood. The plan is to remove
these obsolete system properties again in O developer preview
builds so that application developers can move away from them.

Test: marlin boots and net.dnsX exists and is updated correctly

Bug: 33308258
Bug: 33807046
Bug: 34028616
Bug: 34115651
Change-Id: Iaf2fa213c314b7ba251c065b304e7e9869bafe9f

Lorenzo Colitti   commited 2017-01-06 03:09:18 +00:00
aefac392ea
DO NOT MERGE Captive portal systel log improvements
This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit 6fe7d3cdb3)

Change-Id: I1eaab5ea702063dde3e23324d3a1b3dc172c5ac5

Hugo Benichi   commited 2017-01-05 12:09:35 +09:00
5ca0b9ce20
NetworkNotificationManager: remove spammy log am: 9430f95c21
am: 08e147a7d0

Change-Id: I2b9b1b52e11ddf784244eedf1311f3b015841215

Hugo Benichi   authored and   android-build-merger   commited 2016-12-22 03:07:19 +00:00
cdb61441a0
NetworkNotificationManager: remove spammy log
am: 9430f95c21

Change-Id: I01785760854cd040c0d09f76e3832bbb7986dc4e

Hugo Benichi   authored and   android-build-merger   commited 2016-12-22 03:02:39 +00:00
08e147a7d0
NetworkNotificationManager: remove spammy log
Test: build, flashed, booted phone.
Bug: 32198726
Change-Id: I3ac2f07c756f48653195f6198aaee4d8b3939fb5

Hugo Benichi   commited 2016-12-22 09:51:01 +09:00
9430f95c21
DO NOT MERGE Stricter NetworkNotificationManagerTest
am: 85a6c96ef3

Change-Id: I94ea5c6994d181e730ec4f49e98001eb81ed8740

Hugo Benichi   authored and   android-build-merger   commited 2016-12-20 06:49:08 +00:00
b2966ad433
DO NOT MERGE Fix other String.format issues in NetworkNotificationManager.java
am: f2e4cc9037

Change-Id: I79c4129b861b9dd93ac14acce5a86aadd48e8d39

Paul Stewart   authored and   android-build-merger   commited 2016-12-20 05:04:46 +00:00
3d205c909c
DO NOT MERGE Fix malformed log statement.
am: d7423d12a9

Change-Id: Ie52f24f39305f325e01972f5046247482053db28

Joe LaPenna   authored and   android-build-merger   commited 2016-12-20 05:04:02 +00:00
c4a0d516ce
DO NOT MERGE Stricter NetworkNotificationManagerTest
This patch changes NetworkNotificationManagerTest to populate extraInfo
of NetworkInfo in order to catch regressions in malformed format Strings
of log statements in NetworkNotificationManager.

Test: verified that the test fails when reintroducing the format String
bug.
Bug: 33737715

Change-Id: If14063554b8246d9d80cd222cb41c30dee121c5a

Hugo Benichi   commited 2016-12-20 05:02:28 +00:00
85a6c96ef3
DO NOT MERGE Fix other String.format issues in NetworkNotificationManager.java
Commit 51727428fc added a string
format which caused an exception.  On top of the fixes to this
from 5a45327352, we can also fix
a few more issues here with some missing arguments to other
String.format invocations in the aforementioned CL, and other
formatting problems.

Bug: 33737715
Test: Build and run SUW

(cherry picked from commit e46b47d85d)

Change-Id: I40064d3e1a0f0300c43bdbc51839b579a5394a36

Paul Stewart   authored and   Hugo Benichi   commited 2016-12-20 12:31:49 +09:00
f2e4cc9037
DO NOT MERGE Fix malformed log statement.
Introduced in I1201d1d4fab8183dd83449c2afb2c35cfece883f

BUG: 33746580

Test: built, triggered notification, no crash.

(cherry picked from commit 5a45327352)

Change-Id: I50594ad865e6f95abc5c67c58af604ef2aa88f9b

Joe LaPenna   authored and   Hugo Benichi   commited 2016-12-20 12:31:45 +09:00
d7423d12a9
Fix other String.format issues in NetworkNotificationManager.java
Commit 51727428fc added a string
format which caused an exception.  On top of the fixes to this
from 5a45327352, we can also fix
a few more issues here with some missing arguments to other
String.format invocations in the aforementioned CL, and other
formatting problems.

Bug: 33737715
Test: Build and run SUW
Change-Id: I13410ffebbc606b8801656ea0934f96ccd4b5357

Paul Stewart   commited 2016-12-19 13:12:09 -08:00
e46b47d85d
Fix malformed log statement.
Introduced in I1201d1d4fab8183dd83449c2afb2c35cfece883f

BUG: 33746580

Test: built, triggered notification, no crash.

Change-Id: Ia3e5370f95a6cea421ae0d3febdc5e3fe156dceb

Joe LaPenna   commited 2016-12-19 10:35:10 -08:00
5a45327352
DO NOT MERGE Network notifications: revamp keying scheme
am: 6cccb3bec3

Change-Id: Ibad7d0210b2c69826462b781f43a82d65849ebfb

Hugo Benichi   authored and   android-build-merger   commited 2016-12-19 08:29:23 +00:00
a7c95ac2cb