Commit Graph

303300 Commits

Author SHA1 Message Date
Paul Duffin
8aeb59ebcd Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
2017-01-18 16:39:34 +00:00
Greg Daniel
57b8eb3da0 Merge "Update hwui_unit_tests to support running with Vulkan backend." 2017-01-18 16:13:04 +00:00
TreeHugger Robot
9ecde44945 Merge "Handle multiprocess flag in WebView update service." 2017-01-18 15:19:43 +00:00
TreeHugger Robot
eec32e2d2d Merge "Don't play notification audio in vibrate mode" 2017-01-18 14:56:48 +00:00
Greg Daniel
98c78dad19 Update hwui_unit_tests to support running with Vulkan backend.
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL

Test: manual running of hwui_unit_tests

Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
2017-01-18 09:12:31 -05:00
TreeHugger Robot
2ec59897cf Merge changes I01e81b9c,I532c2d74
* changes:
  Add a listener when task snapshots change
  When app dies, destroy snapshot
2017-01-18 12:17:45 +00:00
Paul Duffin
112e7e007c Merge "Add legacy-android-test target containing android.test classes" am: c20518139a am: 78af448c30 am: 2ac0e2a186
am: 93a897b3db

Change-Id: Id481b8b89ef6b180ba0099f214a5681e41851af3
2017-01-18 11:45:21 +00:00
Paul Duffin
93a897b3db Merge "Add legacy-android-test target containing android.test classes" am: c20518139a am: 78af448c30
am: 2ac0e2a186

Change-Id: I965734e5064fccf08ae676047078632e7a95f3c7
2017-01-18 11:39:39 +00:00
Paul Duffin
2ac0e2a186 Merge "Add legacy-android-test target containing android.test classes" am: c20518139a
am: 78af448c30

Change-Id: I272502ca8504683f5feb4abf345a2665e99da057
2017-01-18 11:34:39 +00:00
Paul Duffin
78af448c30 Merge "Add legacy-android-test target containing android.test classes"
am: c20518139a

Change-Id: I0c591f26a7fe4ebbb89a7fb6ad6b5bb846756c99
2017-01-18 11:30:04 +00:00
Paul Duffin
c20518139a Merge "Add legacy-android-test target containing android.test classes" 2017-01-18 11:19:58 +00:00
Pavel Grafov
eaed75d923 Merge "Make ENSURE_VERIFY_APPS global even when set by PO." 2017-01-18 11:15:28 +00:00
Lorenzo Colitti
311c5d4854 Merge changes from topic 'net-update-mr2-dev-plus-aosp' into nyc-mr2-dev-plus-aosp
am: 5db17efcf6

Change-Id: Iba75e1bdc9ebf526be228bd9efa4e3bf86271eed
2017-01-18 10:51:20 +00:00
Hugo Benichi
0aef77c7f6 DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
am: 7a61361724  -s ours

Change-Id: I6aab263cf5efb7d5a9e1e68dc97c57099c7a9cf8
2017-01-18 10:51:11 +00:00
Lorenzo Colitti
1bce615a62 DO NOT MERGE: Add missing dependency.
am: d9409d3b60  -s ours

Change-Id: Id8bb3a632968f12ffd7bf5988f81cf85953ae08f
2017-01-18 10:50:13 +00:00
Tony Mak
a24817775c DO NOT MERGE: Show notification for always-on app VPN
am: b31b83377b  -s ours

Change-Id: I8af0a0746154d5774b0fb841616b57ce65a36707
2017-01-18 10:49:08 +00:00
Stephen Chen
1439b5bcdb DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
am: c926b7399a  -s ours

Change-Id: I970aed286a5bcc69d2ee69ea23b53af36dc2bbea
2017-01-18 10:48:16 +00:00
Hugo Benichi
deb8944fc4 DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
am: bccd8ad00a  -s ours

Change-Id: Ifdac8feb994342d18a0795a676da558445867b1f
2017-01-18 10:47:07 +00:00
Hugo Benichi
1fd377c424 DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
am: de7002ef0d  -s ours

Change-Id: Iccb849a88e017c3189b2c374a98c44dc58085861
2017-01-18 10:46:07 +00:00
Jeff Sharkey
1883686435 DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
am: 389b853bc8  -s ours

Change-Id: Iaffba4104fa3f64747cc7b57bdedf8979a08578e
2017-01-18 10:45:17 +00:00
Stephen Chen
453df0e74d DO NOT MERGE: Define API for metering network stats buckets.
am: 1fee3a64b7  -s ours

Change-Id: I03a015bbc76c762d48688b1c66562bbd599d4265
2017-01-18 10:44:12 +00:00
Felipe Leme
bafa107105 DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
am: d445c55538  -s ours

Change-Id: I4c92c8bfe7cd19839a86a63e5afb3b3868a63825
2017-01-18 10:43:14 +00:00
Felipe Leme
4734756f0b DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
am: c97d8b7464  -s ours

Change-Id: I6e6fea2d375c40e53fee1877abeb06a9e6d2e218
2017-01-18 10:42:03 +00:00
Felipe Leme
10304d10a1 DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
am: fe46a2f868  -s ours

Change-Id: I72964aed5f8f27120300948d57e4083bb81f06ec
2017-01-18 10:41:08 +00:00
Hugo Benichi
f3fd7198ed DO NOT MERGE: ConnectivityThread: use lazy holder idiom
am: 0f1f54d4d1  -s ours

Change-Id: I8af8bbe0b13b73d4c394c182d299a57c7d8b5736
2017-01-18 10:40:14 +00:00
Hugo Benichi
dcb16f2ff0 DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
am: e804d3773c  -s ours

Change-Id: I12d27fd45f1182719df8c538e734419b640977e8
2017-01-18 10:38:59 +00:00
Hugo Benichi
bcd62c91d6 DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
am: 791ee32a62  -s ours

Change-Id: Ie2413170190809b0a95749f6788fb54b0a9bafd7
2017-01-18 10:37:50 +00:00
Philip P. Moltmann
78b9511368 DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
am: 81deef84fb  -s ours

Change-Id: I7d66e82b940bd88c7e5da0d4a4f2008f14d98a2e
2017-01-18 10:37:37 +00:00
Jeremy Klein
aee34454ea DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
am: 27089aadfb  -s ours

Change-Id: I62e8648a232f8c9ec1fe97270b654078a59e3cb9
2017-01-18 10:37:31 +00:00
Etan Cohen
c1971d180d DO NOT MERGE: [CS] Remove timeout event after first available
am: 4fde167490  -s ours

Change-Id: I84244312fb5314ac1d177571ff1a3fdd070480ef
2017-01-18 10:37:25 +00:00
Hugo Benichi
81982cc4e9 DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
am: 1e04e9ee49  -s ours

Change-Id: I4eeba34dcdb0d0ffc414e2fe01596408b87624ed
2017-01-18 10:37:18 +00:00
Lorenzo Colitti
cde2775016 DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
am: 144223318c  -s ours

Change-Id: Ie27a544873f3336ef3078798482857a538cc1c89
2017-01-18 10:37:12 +00:00
Lorenzo Colitti
7e658df891 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
am: 2fbc934cd9  -s ours

Change-Id: I255b736255c6f165f1600fe064e86bbd33bfe810
2017-01-18 10:37:05 +00:00
Lorenzo Colitti
1145fa8c21 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
am: 073e5e94ad  -s ours

Change-Id: If776d54cd1138a9266268f43833f6c329cd6285d
2017-01-18 10:37:00 +00:00
Lorenzo Colitti
fd50d90c9d DO NOT MERGE: Move FakeSettingsProvider to a common location.
am: 9997f1489a  -s ours

Change-Id: I896ce2cf8abf50e5189f609a4f810296817695c9
2017-01-18 10:36:56 +00:00
Hugo Benichi
60be0b3755 DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
am: 86e2765777  -s ours

Change-Id: Ifd485f77ada20a0773e791816e811fdf22442a92
2017-01-18 10:36:52 +00:00
Hugo Benichi
65c2f141ff DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
am: 17586f7f1f  -s ours

Change-Id: I9fda7a9806c45a7e0f322af937a7b25bbdb8b571
2017-01-18 10:36:48 +00:00
Erik Kline
f9031bfcd4 DO NOT MERGE: Support timeouts for requestNetwork() invocations.
am: e9e251fcfb  -s ours

Change-Id: Ife31e9372728e888ccf175f0a38577e17c3fc468
2017-01-18 10:36:44 +00:00
Pierre Imai
065bac596e DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
am: db5814ed3d  -s ours

Change-Id: I3fa3801e54b06ea4e51f1e0d3577a309f1b970ab
2017-01-18 10:36:39 +00:00
Lorenzo Colitti
5db17efcf6 Merge changes from topic 'net-update-mr2-dev-plus-aosp' into nyc-mr2-dev-plus-aosp
* changes:
  DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
  DO NOT MERGE: Add missing dependency.
  DO NOT MERGE: Show notification for always-on app VPN
  DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
  DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
  DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
  DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
  DO NOT MERGE: Define API for metering network stats buckets.
  DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
  DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
  DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
  DO NOT MERGE: ConnectivityThread: use lazy holder idiom
  DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
  DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
  DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
  DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
  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 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.
2017-01-18 10:29:57 +00:00
Narayan Kamath
c634c5724e Merge "API: Unhide MethodHandles API (java.lang.invoke)." am: 71b1d50531 am: ec667adb56 am: aa90336510
am: fc9c93c2dd

Change-Id: I5db4fe68e1f1e160097503d69312bf2a24a45f2b
2017-01-18 10:09:12 +00:00
Hugo Benichi
7a61361724 DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Test: manually created a bug report and inspected content.

(cherry picked from commit 51d14cb607)

(cherry picked from commit 5635c270a1)

Change-Id: I612b4ab9431633758d3a7048966c267d20cdfcbe
2017-01-18 19:08:48 +09:00
Lorenzo Colitti
d9409d3b60 DO NOT MERGE: Add missing dependency.
(cherry picked from commit 744b02069d)

Change-Id: I3030cc7a718e99ab129fc14174b6d917b9b8e7fb
2017-01-18 19:08:46 +09:00
Tony Mak
b31b83377b DO NOT MERGE: Show notification for always-on app VPN
This is the same notification as the one shown during legacy lockdown
mode, sans the 'reset' button.

The notification is only shown during times when VPN has not yet
established or has failed, for example during boot or after a crash.

Bug: 29123115

(cherry picked from commit 1a405fe300)

(cherry picked from commit de7f7d195e)

Change-Id: I42b4b24e25175bb7628b46a79431d2592644803c
2017-01-18 19:08:44 +09:00
Stephen Chen
c926b7399a DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
Dependent on ag/1550196 where API is defined.

Bug: 31015360
Bug: 26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.

(cherry picked from commit 2514787897)

(cherry picked from commit 963e8ddf6d)

Change-Id: I79e401fc4159264a075febba82bd8c295b8e677f
2017-01-18 19:08:41 +09:00
Hugo Benichi
bccd8ad00a DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
This patch introduces an assertEventuallyThat helper function in
ConnectivityServiceTest which given a boolean function retries until the
function returns true or until a maximum retry time is reached.

This function is used to fix flakyness of testAvoidBadWifiSetting where
the Message posted by reevaluate() could reach the Handler's
MessageQueue after waitForIdle takes effect, resulting in the test to
fail.

Instead of fixing the flakyness by introdcing hard sleep times,
assertEventuallyThat is used to reduce the overall test time.

With this change the test has been observed to pass with 100% success
rate over 50000 invocations.

Test: $ runtest frameworks-net
Bug: 32561414

(cherry picked from commit 99c8294ef0)

(cherry picked from commit 53d83d5142)

Change-Id: I432f90a699dadfef37a5d0a69e25050753340964
2017-01-18 19:08:39 +09:00
Hugo Benichi
de7002ef0d DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
This patch fixes flakyness of testRequestBenchmark by adjusting time
limit for callback registration from 100ms to 180ms, and time limits for
onAvailable and onLost triggers from 30ms to 40ms.

With these timeouts the test succeeds 100% over 5000 iterations.

When using 150ms for registration timeout, running the test 5000 times
fails 2 times.

When using 30ms for onLost timeout, running the test 5000 times fails
1 times.

In addition, this patch also cleans testRequestBenchmark and uses the
more stable SystemClock.elapsedRealtime() for duration measurements.

Test: $ runtest frameworks-net
Bug: 32561414

(cherry picked from commit 38be57b438)

(cherry picked from commit cbf8ff83a8)

Change-Id: I3caf10025f203156a297c0b522f24768a18accc9
2017-01-18 19:08:37 +09:00
Jeff Sharkey
389b853bc8 DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.

Test: builds, boots, and NTP fix obtained
Bug: 32969463

(cherry picked from commit d3f689bf14)

(cherry picked from commit dda938a698)

Change-Id: I67e4f54f8f2ec69b6522fbbe06ef196b1084f44a
2017-01-18 19:08:35 +09:00
Stephen Chen
1fee3a64b7 DO NOT MERGE: Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A

(cherry picked from commit 9ac251d116)

(cherry picked from commit dadf6caf9f)

Change-Id: I01ebb270c5bf7f2383e8923cce72545ca1bee118
2017-01-18 19:08:32 +09:00
Felipe Leme
d445c55538 DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.net.NetworkStatsServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

BUG: 30943463

(cherry picked from commit b8f946dc4b)

(cherry picked from commit e4c029918f)

Change-Id: I93cdfc8753dcded141732c0587783d1fa2085f5a
2017-01-18 19:08:29 +09:00