Commit Graph

841 Commits

Author SHA1 Message Date
Adam Vartanian
bbc39aba5b Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev am: fb27c032ff
am: 3c22d6bea8

Change-Id: I2fe9d75f0bf5b94f2fa0b2d0a819f2b8281ccf7b
2018-02-02 03:32:08 +00:00
Adam Vartanian
3c22d6bea8 Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev
am: fb27c032ff

Change-Id: I459897b291fff063091f4d5e64330df4ade47c0c
2018-02-01 23:31:51 +00:00
Android Build Merger (Role)
ea75ff0609 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f am: 3bc75c3136 am: 1e65404eb8 am: 330b09b8a8 am: 119bbb1cdb
Change-Id: Ib52e5a020d679328e9d91534e636f6f89abb8781
2018-01-31 11:17:54 +00:00
Android Build Merger (Role)
1e65404eb8 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f am: 3bc75c3136
Change-Id: I3e58d87b69ba1f32474550364e04324e6fc8fd88
2018-01-31 11:17:39 +00:00
Android Build Merger (Role)
3bc75c3136 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f
Change-Id: I164c155385cef9ca2ed8bb810d1c1e7be65e4458
2018-01-31 11:17:34 +00:00
Android Build Merger (Role)
2f52ceef6f [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c
Change-Id: Ie5d7744787cd7b700b42dc22ddc921f5b1965a01
2018-01-31 11:17:29 +00:00
Android Build Merger (Role)
67ae9d3245 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a
Change-Id: I29da2e67aa8c3ec9bde0d72c91ada85f160e39d9
2018-01-31 11:17:19 +00:00
Android Build Merger (Role)
27914625b1 [automerger] Add CTS test for URI fix. am: 85156429a2
Change-Id: Iedd07e900b8512737df2d0d6ca33920ef9bfd30b
2018-01-31 11:17:09 +00:00
Adam Vartanian
85156429a2 Add CTS test for URI fix.
Bug: 71360761
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: I09a156040d4970b7b2f973e9bffcfc97a8ff2274
2018-01-31 10:47:13 +00:00
Alex Vakulenko
cf9ee25695 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071 am: 5a35f88cbb
am: 8324e947c3

Change-Id: Ie74187a985dcfa543e1ccd489cf5019d1a46db9e
2018-01-12 00:23:34 +00:00
Alex Vakulenko
8324e947c3 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071
am: 5a35f88cbb

Change-Id: Id3ca47b04227c1a5425eb156095a387f4cced06a
2018-01-12 00:17:04 +00:00
Alex Vakulenko
5a35f88cbb Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev
am: 9992c29071

Change-Id: I7aa6862055d7252b1c801b5deee4b81d7b707c4b
2018-01-12 00:12:38 +00:00
Treehugger Robot
9992c29071 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev 2018-01-12 00:01:30 +00:00
Alex Vakulenko
9a35c697dc Add a delay before toggling WiFi to let listening activity to start up
testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent()
starts up a helper activity that listens to network connection/disconnection
notification. In many cases the test fails because the activity is just
able to start up and initialize itself before the first toggle event
arrives and in many cases it just misses by a matter of 100ms.

Added a short sleep after we start the activity and before we start
toggling WiFi to let the activity a chance to receive the first
notification.

Bug: 70988664
Change-Id: Ie122770fc8447a936d079fae7bdce61b10cf6dc2
2018-01-10 17:27:32 -08:00
Adam Vartanian
a02bbf31c4 DO NOT MERGE Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
(cherry picked from commit a01da8536c)
2018-01-08 13:33:23 -08:00
Sudheer Shanka
b7a503b578 Skip unsupported tests on low ram devices.
Notification listeners are not allowed on low ram devices.
Skip testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
on low ram devices since these tests depend on being able to
register notification listeners.

Bug: 70242457
Bug: 70545780
Test: testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
Change-Id: I8ce6f330760042ca790cd6fb10e62ebe86498a06
2017-12-21 11:23:21 -08:00
Adam Vartanian
cd4ab882f0 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a am: 3d7e43b226
am: 2516305c8c

Change-Id: I7e7f5363c4747289c9817e58cb6636839aa2da05
2017-11-08 00:29:47 +00:00
Adam Vartanian
2516305c8c Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a
am: 3d7e43b226

Change-Id: I318a6c318db25c5d4dd4be3426b480a9de0b9b11
2017-11-08 00:05:43 +00:00
Adam Vartanian
3d7e43b226 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285
am: f259a8e37a

Change-Id: Iaf798faba75cb1f543e012eee98707e20a08e8ce
2017-11-07 23:41:55 +00:00
Adam Vartanian
fb73667810 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052
am: 2204809646

Change-Id: Ic96d9b4693178421303c45ac628c456b66cdf655
2017-11-07 22:35:33 +00:00
Adam Vartanian
2204809646 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832
am: 1e1de4f052

Change-Id: I4153cfa021655ba19b4b6dca19b70aaf91b5caa8
2017-11-07 22:08:32 +00:00
Adam Vartanian
1e1de4f052 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42
am: e88ef1b832

Change-Id: Ie60c0885bc52b26fa900d2908946a56169d2f04c
2017-11-07 21:52:12 +00:00
Adam Vartanian
5d8ba63f42 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa
am: c210cc1a90

Change-Id: I276a0be85c41f823506fc8397050d406257324e9
2017-11-07 21:26:57 +00:00
Adam Vartanian
73105d42aa Add CTS test for URI fix. am: a01da8536c
am: b1b5379591

Change-Id: Ib1bcf1c84ee878161f812e8a9ba762a746329a3b
2017-11-07 20:49:55 +00:00
Adam Vartanian
b1b5379591 Add CTS test for URI fix.
am: a01da8536c

Change-Id: I21c707648e6cc02b267f663bd02140dd66b6bd80
2017-11-07 20:40:20 +00:00
Adam Vartanian
a01da8536c Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
2017-11-07 14:02:08 +00:00
Etan Cohen
66aec9074f Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0 am: 8e699c86fc
am: 294f9ae45b

Change-Id: Id6806b4936ec7e3ae9bcc2ae3b62ff37b370e69b
2017-10-24 18:08:45 +00:00
Etan Cohen
294f9ae45b Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0
am: 8e699c86fc

Change-Id: I7860a70a1cb206f4af24441886efa2cb9512b3b5
2017-10-24 18:02:30 +00:00
Etan Cohen
8e699c86fc Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev
am: d5c00ceee0

Change-Id: I9b42b412355a641f2bb8a06f031fced7575bab44
2017-10-24 17:57:29 +00:00
Etan Cohen
591518f378 [CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network
Before calling the testAddPasspointConfigWithCertCredential
we need to check number of network already present in device

Bug: 67630919
Test: android.server.cts.CtsNetTestCases, WifiManagerTest
Change-Id: If643ab7bde760a65e9a5b1e9d47af53378a178fd
2017-10-23 23:07:59 +00:00
Ningyuan Wang
8666bc8c23 CTS: update wifi scan timeout to 9 seconds
This creates a new timeout constant for scan duration, so
this test doesn't share timeout constant with other events.

This also increases the scan timeout time to 9 seconds per
our estimation.

Bug: 67462981
Test: cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiScanTimestamp

Change-Id: I7e1dea64bc8df3e4b31adbf8b5f05c8564a739b1
2017-10-10 13:26:34 -07:00
Sudheer Shanka
21163bc32d CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I1dc0603011522f73c63dcb7f0f1422428f727fad
2017-09-29 17:13:32 -07:00
Sudheer Shanka
26e6bf91be Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev 2017-09-27 21:00:54 +00:00
Lorenzo Colitti
b47b977afa Ensure that Ethernet is supported if the service is running.
Currently, it's possible for isNetworkSupported() to return false
for TYPE_ETHERNET even if the device could otherwise support
Ethernet (e.g., via a USB host adapter). This can lead to APIs
APIs such as getActiveNetworkInfo and CONNECTIVITY_ACTION
behaving as if Ethernet was not present, even if it's connected.

Reduce the chance of this sort of misconfiguration by ensuring
that if the Ethernet service is running, isNetworkSupported
will return true for TYPE_ETHERNET. OEMs that would like the
function to return false should avoid starting the Ethernet
service.

(cherry picked from commit c4f38c2e5b)

Bug: 37359230
Test: ConnectivityManagerTest passes on aosp_bullhead
Change-Id: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
Merged-In: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
2017-09-27 17:32:15 +09:00
Sudheer Shanka
f23cf00410 CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I8e04e061b949a44e6c63bc56eba9612311065a4d
2017-09-26 18:19:43 -07:00
Sudheer Shanka
459e28159c Fix flaky CtsHostsideNetworkTests.
'set metered-network' adb command is not blocking, it doesn't
wait for the network to be marked as metered. Updated test
to sleep and poll for metered status.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ide3e1633167979bdca912c1c299ad17d988b537e
2017-09-13 18:17:01 -07:00
Sudheer Shanka
518999df34 Add extra logging when the test fails.
When the test fails, dump network_management and netpolicy
services to help in debugging.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I76287de2c7cd6f394af9768a69e2c0fabba3be25
2017-09-07 15:36:08 -07:00
Sudheer Shanka
46f8aa6d48 Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev am: 203361a0c3
am: 662e13b57a

Change-Id: I0d070bfbe19666f77b9ae21c19893f776389fac0
2017-09-07 18:20:35 +00:00
Sudheer Shanka
f0bc6efb5e Merge "Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev am: 203361a0c3" into nougat-mr1-cts-dev
am: b5abc8f89b

Change-Id: Ic3aee8310d6250d15a5414640dbd35cb66a7c18c
2017-09-07 18:17:21 +00:00
Sudheer Shanka
662e13b57a Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev
am: 203361a0c3

Change-Id: I7bd246e79792960c53e12c166a255eabe7f428ed
2017-09-07 18:11:26 +00:00
Sudheer Shanka
9418ecdc40 Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev
am: 203361a0c3

Change-Id: Ifbd3594524de6fc45cb199345715794f9869c9d6
2017-09-07 18:08:27 +00:00
Sudheer Shanka
07e00f7523 Increase timeout for ordered broadcast response.
Bug: 65269531
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Merged-In: Ibdb84048b04405f234aa5ad9124eb70e9e592498
Merged-In: I99668396abcf7421cd7ffb9118e309aaecb80f07

Change-Id: I6f1de7ccc8d4164dc6f770b54863c04bb7d9e62e
2017-09-05 14:56:04 -07:00
Sudheer Shanka
46ec0e97b4 Add notification listener using the new shell command.
Adding notification listener by updating secure setting has
been deprecated.

Fixes: 65245599
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I98dbff45bffed592cba2cd964f1a148450a1197d
2017-08-31 17:42:41 -07:00
Bjoern Johansson
68842e0e90 Skip WifiManager tests if WiFi is not supported
am: d4c2d2aca3

Change-Id: I87d6e927e5b739db343b013c212fc9fb1e076a98
2017-08-23 18:12:26 +00:00
Bjoern Johansson
d4c2d2aca3 Skip WifiManager tests if WiFi is not supported
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.

BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
(cherry picked from commit 9703adffd5e3bf85e482cdac45a1147caff4ac3d)
2017-08-23 15:52:48 +00:00
Bjoern Johansson
bd7f2904d9 Skip WifiManager tests if WiFi is not supported
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.

BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
2017-08-17 17:14:40 -07:00
Sudheer Shanka
a30a1edf9f Add location permission to netpolicy test app.
As part of the test, wifi ssid needs to be extracted which
is guarded by ACCESS_COARSE_LOCATION permission.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I5c23b11dc1bf26a672bc1454ff1e2594935d43d8
2017-08-16 10:17:59 -07:00
shreerag
7f06181c86 Merge "No longer using specific watch device idle settings" into oc-dev am: 8bde47ae82
am: eb2c021f93

Change-Id: Iff4af17accb81c3111c0a7517dfcb295858ad48f
2017-08-10 00:05:26 +00:00
shreerag
eb2c021f93 Merge "No longer using specific watch device idle settings" into oc-dev
am: 8bde47ae82

Change-Id: I46f8f4bdfea7ae4f75119226cbaa100365a260db
2017-08-09 23:58:26 +00:00
Lorenzo Colitti
80c62eb79b Merge "Dup fds to stop finalizers from invalidating them." into nougat-mr1-cts-dev
am: bfabfe75f9

Change-Id: If02ea4f12870acb3e5e1bce9e9ddbc42c0fd05f0
2017-08-09 16:29:49 +00:00