3665 Commits

Author SHA1 Message Date
Dianne Hackborn
59da805846 Add new VoiceInteractionSession.setUiEnabled method
This allows the session to turn off all of its UI.  Use it
in onCreate() to prevent the session from ever creating any
of its UI.  Switched the window creation and initialization to
happen lazily to support this.

Test: New test added to android.assist.cts.LifecycleTest
Bug: 30999386

Change-Id: I8eacb3697c8ac9908c50b9577abea2d20597b016
2017-02-08 14:00:31 -08:00
Ben Weiss
995f4b5721 Merge "Extract and unhide TransitionListenerAdapter" 2017-02-06 10:16:50 +00:00
Erik Kline
e8bc75bfcc Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe am: 6f32aa0259 am: 7196e935a8
am: c700509ade

Change-Id: I15fe6fe4c9aec3d244b46516c2992ded33337a9f
2017-02-02 20:03:51 +00:00
Erik Kline
ee929e69fb Merge "Add test for repeated calls to registerMobileUpstreamRequest()" am: 603eefd5d5 am: 180a3d07a8 am: d85f448274
am: 2ebea21074

Change-Id: I2e0ab82edd8997188c8c16dce6373ccb19657e3d
2017-02-02 16:52:43 +00:00
Erik Kline
c700509ade Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe am: 6f32aa0259
am: 7196e935a8

Change-Id: I2ab05143299f13012dc2a88efca52160e08c6d97
2017-02-02 07:32:09 +00:00
Erik Kline
7196e935a8 Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe
am: 6f32aa0259

Change-Id: I6828bc3bb094ca8597ca2d8538045758638c374f
2017-02-02 07:27:13 +00:00
Erik Kline
6f32aa0259 Merge "Add ConnectivityManager.networkCapabilitiesForType()"
am: c313123afe

Change-Id: I0ad50fbf38f11b383fd889dc598cfddd47051477
2017-02-02 07:22:05 +00:00
Treehugger Robot
c313123afe Merge "Add ConnectivityManager.networkCapabilitiesForType()" 2017-02-02 07:15:05 +00:00
Erik Kline
2ebea21074 Merge "Add test for repeated calls to registerMobileUpstreamRequest()" am: 603eefd5d5 am: 180a3d07a8
am: d85f448274

Change-Id: Ia629aa5dbdf10566c28525d9a05b096482db3f2d
2017-02-02 05:25:05 +00:00
Erik Kline
d85f448274 Merge "Add test for repeated calls to registerMobileUpstreamRequest()" am: 603eefd5d5
am: 180a3d07a8

Change-Id: I9f80a3ff713b4b00136808051a717509f600bb9a
2017-02-02 05:20:05 +00:00
Erik Kline
180a3d07a8 Merge "Add test for repeated calls to registerMobileUpstreamRequest()"
am: 603eefd5d5

Change-Id: I6b2a0d6df70df028ef9b8ff5d689c5a627d8daf8
2017-02-02 05:15:23 +00:00
Erik Kline
35bf06c968 Add ConnectivityManager.networkCapabilitiesForType()
This static method returns a NetworkCapabilities instance with
transports and capabilities set according to the given legacy type.

Also:
    - add NetworkRequest.Builder.setCapabilities(), to be able to use
      the NetworkCapabilities instances returned from the above
    - update UpstreamNetworkMonitor to make immediate use of this

Test: as follows
    - build (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - WiFi to DUN upstream tethering works
Bug: 32163131

Change-Id: Idfe1ddd2815c355cbf27cf29eb0e3de177de84e9
2017-02-02 11:07:59 +09:00
Erik Kline
7462f467c1 Add test for repeated calls to registerMobileUpstreamRequest()
Test: as follows
    - built
    - flashed
    - booted
    - runtest framework-net passes
Bug: 32163131

Change-Id: I6d2519601b7a9dcfda2917118214a7ceb9dbbb7f
2017-02-01 21:30:15 +09:00
Lorenzo Colitti
2de4925f5c 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
2017-02-01 17:02:29 +09:00
Lorenzo Colitti
70fbc78896 ConnectivityServiceTest: remove remaining poll loops. am: d2706127d0 am: 54e9050710 am: 67d6d41954
am: 6e7f7dc643

Change-Id: Idc5d60f9ed5fbbb39256b9983a5b292a0302b2f1
2017-02-01 03:18:46 +00:00
Lorenzo Colitti
e45952c825 Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: 58ebe1c6f1 am: 0bc8070fce am: 338241de94
am: d526434f05

Change-Id: I5aefc453c022286e6ee2332a53e6c9f36472e9a5
2017-02-01 03:17:19 +00:00
Lorenzo Colitti
7d8b56b801 Attempt to make waitForIdleHandler reliable. am: ae3ce81cc3 am: 8780a8afeb am: 943808385a
am: 8e3718459b

Change-Id: Ia2d7a4405ce60ca99b1ee6c80c0babf93983cf64
2017-02-01 03:16:18 +00:00
Lorenzo Colitti
6e7f7dc643 ConnectivityServiceTest: remove remaining poll loops. am: d2706127d0 am: 54e9050710
am: 67d6d41954

Change-Id: I31681e1248721704a9b792962a2ef5955e375e93
2017-02-01 03:01:52 +00:00
Lorenzo Colitti
4fc1296cef Remove assertEventuallyTrue as it's unnecessary. am: 30145d755c am: 90a70cac26
am: 90babed246

Change-Id: Ib16f54aeaa783a6e26a9d80e61388cbd9ecd9bd3
2017-02-01 03:00:41 +00:00
Lorenzo Colitti
d526434f05 Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: 58ebe1c6f1 am: 0bc8070fce
am: 338241de94

Change-Id: I91f1338f3488cfc60eef0c2147aa7b1d61107cdd
2017-02-01 02:59:42 +00:00
Lorenzo Colitti
8e3718459b Attempt to make waitForIdleHandler reliable. am: ae3ce81cc3 am: 8780a8afeb
am: 943808385a

Change-Id: I2369fbd693b467283232f47703fd471c8ff60c1f
2017-02-01 02:58:24 +00:00
Lorenzo Colitti
67d6d41954 ConnectivityServiceTest: remove remaining poll loops. am: d2706127d0
am: 54e9050710

Change-Id: I06815166fe9ab4b7d6ab580a9eda5304067f9f91
2017-02-01 02:49:23 +00:00
Lorenzo Colitti
90babed246 Remove assertEventuallyTrue as it's unnecessary. am: 30145d755c
am: 90a70cac26

Change-Id: I7f6d543a3d05b0b165adc7a7c3938c7081c3f778
2017-02-01 02:48:10 +00:00
Lorenzo Colitti
338241de94 Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: 58ebe1c6f1
am: 0bc8070fce

Change-Id: I0ff0169ebc5e53cc9f57f224225fb0c93dc241ed
2017-02-01 02:47:16 +00:00
Lorenzo Colitti
943808385a Attempt to make waitForIdleHandler reliable. am: ae3ce81cc3
am: 8780a8afeb

Change-Id: I72c03d3686858631aefdf96e13e8033f27788f8c
2017-02-01 02:45:55 +00:00
Lorenzo Colitti
54e9050710 ConnectivityServiceTest: remove remaining poll loops.
am: d2706127d0

Change-Id: I675096683c8ed4bc0e540491c0ff6aa828114313
2017-02-01 02:39:30 +00:00
Lorenzo Colitti
90a70cac26 Remove assertEventuallyTrue as it's unnecessary.
am: 30145d755c

Change-Id: Id574b27b40e35fbccac49910867e9735c03118d4
2017-02-01 02:38:30 +00:00
Lorenzo Colitti
0bc8070fce Rename AvoidBadWifiTracker to MultinetworkPolicyTracker
am: 58ebe1c6f1

Change-Id: I7615c9128deed7011eb9ab6f2efdcfe2e237a1a5
2017-02-01 02:37:31 +00:00
Lorenzo Colitti
8780a8afeb Attempt to make waitForIdleHandler reliable.
am: ae3ce81cc3

Change-Id: Id7e23c3a2c885ff239efa577a8d366d3df6ca9a2
2017-02-01 02:36:22 +00:00
TreeHugger Robot
65626b663a Merge "Add UiBench jank and macrobench tests for saveLayer performance" 2017-01-31 22:05:22 +00:00
Stan Iliev
010b6a58c7 Add UiBench jank and macrobench tests for saveLayer performance
Create 2 jank tests and 1 macrobench that measure saveLayer
performance:
- Fling a ListView, which has a vertical fading edge.
- Draw a canvas with 20 saveLayer/restore interleaved with other
drawText and drawRect ops.

Test: built and ran UiBench jank and macrobench tests.
Change-Id: I5a50feb7431d597c92c7a49031505d41f397d175
2017-01-31 15:13:08 -05:00
Lorenzo Colitti
d2706127d0 ConnectivityServiceTest: remove remaining poll loops.
All the tests are now asynchronous. The only remaining uses of
Thread.sleep() are in the tests that check for NetworkRequest
timeouts.

Test: ConnectivityServiceTest passes 100 times in a row
Bug: 32561414
Change-Id: If420bd66c692a90d5031ee06a888a8cc3b4398a8
2017-01-31 15:44:23 +09:00
Lorenzo Colitti
30145d755c Remove assertEventuallyTrue as it's unnecessary.
The calls in testAvoidBadWifi are no longer necessary now that
waitForIdle is reliable, and the calls in testPacketKeepalives
are replaced with a wait for the NetworkAgent to disconnect.

Test: ConnectivityServiceTest passes 100 times in a row.
Bug: 32561414
Change-Id: Icbb161ca6e343bd14764a1c9ccfdd14b6cd6803f
2017-01-31 15:42:58 +09:00
Lorenzo Colitti
58ebe1c6f1 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
2017-01-31 15:42:57 +09:00
Lorenzo Colitti
ae3ce81cc3 Attempt to make waitForIdleHandler reliable.
The current implementation of IdleableHandlerThread is based on
the assumption that MessageQueue#isIdle will return true iff the
message loop has finished processing its messages.

Unfortunately, this is incorrect: isIdle returns true iff are no
more messages waiting in the queue; thus, it will also return
true while it is processing the last message before going idle.

Instead of using idle handlers, take the simpler approach of
posting a runnable to the message loop and waiting for it to
be processed.

Test: see other CLs in this patch series
Bug: 31479480
Change-Id: Iae75781f067b762c8653a488a5e4d5ee0c789e01
2017-01-31 15:42:17 +09:00
Hugo Benichi
db11740a01 Merge "ApfTest: fix flaky testApfFilterRa." am: c2e8588396 am: 60e1375f79 am: 811f6c86da
am: 488ffdc784

Change-Id: Ib4223b548b434211dda4e750f660eb68a30a9d96
2017-01-31 06:16:43 +00:00
Hugo Benichi
488ffdc784 Merge "ApfTest: fix flaky testApfFilterRa." am: c2e8588396 am: 60e1375f79
am: 811f6c86da

Change-Id: Idd738e1a4c9f0a865f5b84270535a94c492341ce
2017-01-31 06:11:35 +00:00
Hugo Benichi
811f6c86da Merge "ApfTest: fix flaky testApfFilterRa." am: c2e8588396
am: 60e1375f79

Change-Id: Ied249e20ffc80728d20ac1e5442d45f5cb767776
2017-01-31 06:07:08 +00:00
Hugo Benichi
60e1375f79 Merge "ApfTest: fix flaky testApfFilterRa."
am: c2e8588396

Change-Id: I79c3ec0ba35973cc0dd32709447b2cc30e790d08
2017-01-31 06:01:58 +00:00
Hugo Benichi
4456f33a95 ApfTest: fix flaky testApfFilterRa.
testApfFilterRa is failing with probabiliy 1/10 ~ 1/15 on the following
assert: assertDrop(program, packet, lifetime/6), for lifetime values
that are multiple of 6, where 6 is the hardcoded fraction of RA lifetime
to filter in ApfFilter.java.

When the lifetime is not a multiple of 6, the remainder of 1 to 5
seconds gives enough margin so that when the APF program is simulated
the faked lifetime of the program is less than lifetime/6 away and the
packet is dropped.

However for lifetimes which are exact multiples of 6, this margin is
always 0s and that result in nondeterminism in the result. This is
consistent with the obervation that the only failed assert was for a
lifetime of 300s, the only multiple of 6.

This can be observed by detecting the age limit at which the filter
stops dropping packet oscillating between lifetime/6 and lifetime/6 + 1
for lifetimes which are multiple of 6.

This patch fixes the flakyness by freezing the flow of time in tests so
that the expected filter age threshold is consistent and stable.

Test: no failure observed in 1000 runs.
Bug: 32561414
Change-Id: I5251d047039f34b82ce8a5d20ae46563e1e0cce8
2017-01-31 11:13:44 +09:00
TreeHugger Robot
efdc663569 Merge "Define targetSandboxVersion" 2017-01-31 01:14:44 +00:00
Todd Kennedy
11e4507522 Define targetSandboxVersion
The new attribute allows both ephemeral and non-ephemeral apps to
opt into a new, tighter security model.

Test: Manual; built app w/ targetSandboxVersion and verified the security domain
Change-Id: I8fcaf84e25f0519b438ba51302f79790e680e025
2017-01-30 14:47:30 -08:00
TreeHugger Robot
e244fd33b1 Merge "Create a jank test to measure clipped ListView performance (part 2)" 2017-01-27 21:19:20 +00:00
Stan Iliev
bf25627558 Create a jank test to measure clipped ListView performance (part 2)
Write a new UiBench test that opens and closes navigation drawer
on top of a trivial ListView.

Test: Built and ran UiBench tests.
Change-Id: I25413e27f78c756bb48e6dcaa92990592bb5b9de
2017-01-27 16:16:26 -05:00
Erik Kline
e17a1754ed Merge "Switch to listening for all network changes." am: 085ffa76fa am: 46f8abd229 am: 118c0c9e7d
am: 8aba32468a

Change-Id: I00951c996b04124f3d8fba83802e3610e7b0e6e3
2017-01-27 19:39:31 +00:00
Erik Kline
8aba32468a Merge "Switch to listening for all network changes." am: 085ffa76fa am: 46f8abd229
am: 118c0c9e7d

Change-Id: I82ac34a2f846f4ebe164e4190716559186204934
2017-01-27 19:33:16 +00:00
Erik Kline
118c0c9e7d Merge "Switch to listening for all network changes." am: 085ffa76fa
am: 46f8abd229

Change-Id: I28ad47a86ea534c5b675a530ffbaac415fd60b25
2017-01-27 19:20:19 +00:00
Erik Kline
46f8abd229 Merge "Switch to listening for all network changes."
am: 085ffa76fa

Change-Id: I87157788c5c2dc1015f9518c1c443256cfd30bae
2017-01-27 19:14:39 +00:00
Treehugger Robot
085ffa76fa Merge "Switch to listening for all network changes." 2017-01-27 19:07:08 +00:00
Lorenzo Colitti
c850137cf5 Merge "ConnectivityServiceTest: fix flaky tests" am: b8bbd30203 am: 8fea8e5bbd am: c620e64f61
am: 5bad599e2e

Change-Id: I3a16ff459b8f702249f14e9becbb2630ce7471fd
2017-01-27 10:04:15 +00:00