Commit Graph

276833 Commits

Author SHA1 Message Date
Yoshinori Hirano
435db7e690 Merge "Don't include front most excluded task in Multi-Window mode"
am: a8c2c229d7

Change-Id: If5c1a8de2cc951d8ec97b40c57cbbc8313137a37
2016-12-08 21:05:16 +00:00
Treehugger Robot
a8c2c229d7 Merge "Don't include front most excluded task in Multi-Window mode" 2016-12-08 20:52:15 +00:00
Lorenzo Colitti
0a7f2d076d Merge changes from topic 'framework-net-aosp'
am: b92aa5bdfd

Change-Id: I9f4cb99312b61e47bfb80f35a5c2478bc1be2473
2016-12-08 10:15:03 +00:00
Etan Cohen
a8b73b23d6 DO NOT MERGE: [CS] Remove timeout event after first available
am: bf3b1bad15  -s ours

Change-Id: I24ccd42ff2078ffac5560a132dcd2432118f6788
2016-12-08 10:14:55 +00:00
Hugo Benichi
2a2e22ab23 DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
am: 5d2654124e  -s ours

Change-Id: I8cfbe35c719dc2f135ec695f346c555fb45dfa58
2016-12-08 10:14:16 +00:00
Lorenzo Colitti
efd928fe56 DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
am: 5bce5a16b1  -s ours

Change-Id: I820b911f737e8b00ff3069505a2412ba9fdf3e1c
2016-12-08 10:13:37 +00:00
Lorenzo Colitti
d1e22a3f07 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
am: 7ceef950a0  -s ours

Change-Id: I866c317dbec720a5ec6c64b1e7e14437d132ce7e
2016-12-08 10:12:57 +00:00
Lorenzo Colitti
bcb7e32954 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
am: 3c295b59f5  -s ours

Change-Id: I72123940742a0ca1418f8c892da82b6bb984f4ae
2016-12-08 10:11:44 +00:00
Lorenzo Colitti
a84ede299c DO NOT MERGE: Move FakeSettingsProvider to a common location.
am: b8df76e413  -s ours

Change-Id: I017a302961d252a3fe4e062a0642b79d64230f54
2016-12-08 10:11:01 +00:00
Hugo Benichi
e47b0886ad DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
am: 5d540d1410  -s ours

Change-Id: I2bd4e64b397fe2bd6ec8a11b02753c26df1a2000
2016-12-08 10:10:22 +00:00
Calvin On
8006bd5c66 DO NOT MERGE: Add option to skip and avoid captive portals.
am: 1f64f3fd14  -s ours

Change-Id: I549bc49715a6476069f30aa206d8b4d1310fe6c5
2016-12-08 10:09:43 +00:00
Hugo Benichi
d063978acf DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
am: dafc44ea11  -s ours

Change-Id: Ic80e642dffa4f1246e91aeaa5bdedf450f703ccd
2016-12-08 10:09:05 +00:00
Hugo Benichi
eb98bc95d2 DO NOT MERGE: Do not synchronize boolean reads/writes
am: 94dcb3c3fd  -s ours

Change-Id: If30f221e24c897be9e2fddf66a9d6c9db2b5a431
2016-12-08 10:08:15 +00:00
Hugo Benichi
2889968553 DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
am: 4104ff9220  -s ours

Change-Id: I699a4d4403e21c3ebb59e29c7732dba78eb006d7
2016-12-08 10:07:12 +00:00
Hugo Benichi
976ef7538a DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
am: 0668a61d82  -s ours

Change-Id: I961d0fd200c1317e1e81657071acf1fe7ae43f6f
2016-12-08 10:06:34 +00:00
Erik Kline
eb6be2c826 DO NOT MERGE: Support timeouts for requestNetwork() invocations.
am: 3841a48d0a  -s ours

Change-Id: Ia0431810a2a2081116bc5c31b4c6a37ab09a69ad
2016-12-08 10:05:58 +00:00
Pierre Imai
8a73b2896d DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
am: accd5fcb79  -s ours

Change-Id: Ib54fcd8b268872bc599e2b4dedaa7bbb4d7f8956
2016-12-08 10:05:18 +00:00
Lorenzo Colitti
b92aa5bdfd Merge changes from topic 'framework-net-aosp'
* changes:
  DO NOT MERGE: [CS] Remove timeout event after first available
  DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
  DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
  DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
  DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
  DO NOT MERGE: Move FakeSettingsProvider to a common location.
  DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
  DO NOT MERGE: Add option to skip and avoid captive portals.
  DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
  DO NOT MERGE: Do not synchronize boolean reads/writes
  DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
  DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
  DO NOT MERGE: Support timeouts for requestNetwork() invocations.
  DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
2016-12-08 09:56:19 +00:00
Etan Cohen
bf3b1bad15 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 681fcda589)

Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748
2016-12-08 17:13:37 +09:00
Hugo Benichi
5d2654124e DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
Test methods not tagged with @{Small,Medium,Large}Test will not appear
in the Android Platform Continuous Testing dashboard.

Test methods tagged with @LargeTest will not be run in the Android
Platform Continuous Testing dashboard.

Test: ApfTest passes ($runtest frameworks-net)
Bug: 31479480

(cherry picked from commit 4195c28347)

Change-Id: Ia215fc8e2ccc61f6223c24fdf390e1e759de302f
2016-12-08 17:13:36 +09:00
Lorenzo Colitti
5bce5a16b1 DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
This was broken by the implementation of IPv6 tethering, which
relies on various private classes which end up calling unmockable
final classes like NetworkInterface.

Making everything public like this is almost certainly not the
best way of fixing this test, but on the other hand there is
value to the test continuing to pass.

Test: runtest frameworks-net  # Everything passes.
Test: IPv6 tethering continues to work.

(cherry picked from commit 7e0eeca8ba)

Change-Id: I8a3cf466871c026f4ae0f5cfa73071338cdf5b7e
2016-12-08 17:13:36 +09:00
Lorenzo Colitti
7ceef950a0 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
This will give us a good place to put all the networking tests.

Fix: 31479480
Test: adb  shell am instrument -w -e notClass com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest 'com.android.frameworks.tests.net/android.support.test.runner.AndroidJUnitRunner'  # PASS

(cherry picked from commit ecc986d430)

Change-Id: I993eeaa5dec001c39389023f355f506129b356e7
2016-12-08 17:13:35 +09:00
Lorenzo Colitti
3c295b59f5 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.

Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.

(cherry picked from commit 281a17c958)

Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest  # Already failing.
Bug: 31479480
Change-Id: Ifab32c9214e9caab71dbf93b3d3ca88df6f49636
2016-12-08 17:13:35 +09:00
Lorenzo Colitti
b8df76e413 DO NOT MERGE: Move FakeSettingsProvider to a common location.
(cherry picked from commit 7df1a82802)

Test: runtest frameworks-util -c com.android.internal.util.test.FakeSettingsProviderTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-services -c com.android.server.retaildemo.PreloadAppsInstallerTest
Test: runtest frameworks-services -c com.android.server.retaildemo.RetailDemoModeServiceTest
Bug: 31479480
Change-Id: I8d4d4de2937012dd33924f53e68f96241a9b2b4f
2016-12-08 17:13:34 +09:00
Hugo Benichi
5d540d1410 DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.

This new independent test is tagged with @FlakkyTest(tolerance = 3).

Test: ConnectivityServiceTest passes, with higher probability.
Bug: 31479480

(cherry picked from commit c8c1027762)

Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f
2016-12-08 17:13:34 +09:00
Calvin On
1f64f3fd14 DO NOT MERGE: 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 be96da11cc)

Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696
2016-12-08 17:13:33 +09:00
Hugo Benichi
dafc44ea11 DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
This patch replaces System.currentTimeMillis() with
SystemClock.elapsedRealTime() to make RA lifetime computation more
resilient to various external events inducing jumps in
currentTimeMillis().

Test: ApfTest passes.

(cherry picked from commit 305af8e98a)

Change-Id: If19011fc0c905948f2e42b975cfcc5f8672a95fb
2016-12-08 17:13:33 +09:00
Hugo Benichi
94dcb3c3fd DO NOT MERGE: Do not synchronize boolean reads/writes
This patch removes the synchronization around the private variable
mRunning inside of IpReachabilityMonitor and instead qualifeis the field
as volatile.

Synchronization is not needed for reads/writes on native fields or
object references because they are already guaranteed to be atomic.

Synchronization here was used for enforcing memory visibility across
concurrent threads indirectly through monitor acquire/release.
The volatile keyword achieves this in a more explicit way.

Also, this patch changes the way that probeAll() copies the
IpReachabilityMonitor's mIpWatchList by temporary holding mIpWatchList
keys into an ArrayList instead of a more expensive HashSet. Since Java
HashSet are just degenerated HashMaps, and that key iteration order is
based on key hash, the iteration order over this temporary collection
will be consistent for the same mIpWatchList.

Test: refactoring CL. Existing unit tests still pass.

(cherry picked from commit b0f1186c03)

Change-Id: I48d2b4d837a459150cd431b400ec01b87b48c014
2016-12-08 17:13:32 +09:00
Hugo Benichi
4104ff9220 DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
This patch adds a getUint8 getter for ByteBuffers and changes ApfFilter
to make uses of getUint8/16/32 everywhere.

The return types of getUint16 is also changed from long to int, which
will expand gracefully to long as an unsigned int as it is guaranteed to
be positive after getUint16.

Test: ApfTest passes

(cherry picked from commit 995dd94673)

Change-Id: I606ebc5aedfcacde400d27cc6bc37145769b122c
2016-12-08 17:13:32 +09:00
Hugo Benichi
0668a61d82 DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
Test: added new unit tests

(cherry picked from commit 8acea76a2b)

Change-Id: I847d7e4895766042043c0bba1c9b9a698a705d87
2016-12-08 17:13:31 +09:00
Erik Kline
3841a48d0a DO NOT MERGE: Support timeouts for requestNetwork() invocations.
(cherry-pick of 06c3ef1367)
(cherry picked from commit 57faba9ec7)

Bug: 21414325
Change-Id: I1a58823a372154589f972b98c4c428eab0e0523e
2016-12-08 17:13:01 +09:00
Pierre Imai
accd5fcb79 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 54f0d9edbf)

Change-Id: I89e2fdfbbfa981d435a2974422d9d9c009872d76
2016-12-08 16:49:22 +09:00
Amin Shaikh
a7c0b73971 Merge "Support multiple caches in NetworkScoreService."
am: 78f3f0049e

Change-Id: I37e3f4728c9aa0d931727932a1cd4be3ca6e79bf
2016-12-08 02:20:55 +00:00
Treehugger Robot
78f3f0049e Merge "Support multiple caches in NetworkScoreService." 2016-12-08 02:09:40 +00:00
Amin Shaikh
972e236e84 Support multiple caches in NetworkScoreService.
- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest

Test: runtest frameworks-services

Bug: 32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b
2016-12-07 15:52:33 -08:00
Stephen Chen
fe9a20c980 Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED."
am: faf3aa697f

Change-Id: Ib43452b0f819c12ec51402151e272ad190fd8362
2016-12-07 23:13:40 +00:00
Michael Plass
b8d3324bb7 Merge "Remove user-triggered disconnect counters"
am: 2007ee8de3

Change-Id: I6033a4cb4cdfe21f04ced289ce17e7b3bc734c65
2016-12-07 23:05:29 +00:00
Treehugger Robot
faf3aa697f Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED." 2016-12-07 23:00:26 +00:00
Michael Plass
2007ee8de3 Merge "Remove user-triggered disconnect counters" 2016-12-07 22:56:58 +00:00
Jeff Sharkey
e5617f5d16 Merge "Yet another set of installd Binder methods."
am: c69b210ec8

Change-Id: Iee5ff3acffcf3f26cbf964430952f447c117958f
2016-12-07 22:47:46 +00:00
Jeff Sharkey
c69b210ec8 Merge "Yet another set of installd Binder methods." 2016-12-07 22:38:48 +00:00
Jeff Sharkey
00334135d2 Merge "Move dump() to dumpAsync(), more oneway calls."
am: fedf0503be

Change-Id: I934aa7acbeb4929bfe87e5ade0b960daa3cc88ae
2016-12-07 21:52:45 +00:00
Treehugger Robot
fedf0503be Merge "Move dump() to dumpAsync(), more oneway calls." 2016-12-07 21:43:24 +00:00
Jeff Sharkey
ba6f8c8bef Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

(cherry picked from commit 850c83e6da)

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088

Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5

Change-Id: Ic2be10dc8478d613cea6e2c976b9987c250b86b7
2016-12-07 12:24:21 -08:00
Jeff Sharkey
c24fa029bf Yet another set of installd Binder methods.
Pretty straightforward refactoring.

Test: builds, boots, apps install fine
Bug: 13758960, 30944031
Change-Id: Ide533a04e1e31475a16046722f48b1934d8cacd3
2016-12-07 10:38:24 -07:00
Michael Plass
1ff5bd2646 Remove user-triggered disconnect counters
Removes these fields of WifiConfiguration:
  numUserTriggeredWifiDisableLowRSSI
  numUserTriggeredWifiDisableBadRSSI
  numUserTriggeredWifiDisableNotHighRSSI
  numTicksAtBadRSSI
  numTicksAtNotHighRSSI
  numUserTriggeredJoinAttempts

Add parcel test for WifiConfiguration.

Bug: 33013630
Test: unit tests pass
Change-Id: I39566c4e7845b01899739c36d6ec633f272fec6f
2016-12-07 08:50:10 -08:00
Paul Duffin
c5f2b08e83 Merge "Add legacy-performance-test-hostdex target"
am: f9587a35ba

Change-Id: Id400bbe4ca3ab4c348c07c76dbbdf868d9335087
2016-12-07 16:47:24 +00:00
Paul Duffin
f9587a35ba Merge "Add legacy-performance-test-hostdex target" 2016-12-07 16:37:11 +00:00
Paul Duffin
02f42f9a8b Add legacy-performance-test-hostdex target
This is needed for some internal targets that currently depend
directly on the source files and which break when the source
file is moved.

Bug: 30188076
Test: make legacy-performance-test-hostdex
Change-Id: I653325605204c1f272bd5f669e2297eedeaf7d61
2016-12-07 14:21:53 +00:00
Paul Duffin
a4d7100a3b Merge "Replace core-junit with junit"
am: 6ac5293751

Change-Id: I855552fe62801b2534ef63c2c62919bbd845a9af
2016-12-07 13:00:32 +00:00