Hugo Benichi
5cd4b8d93c
DO NOT MERGE: frameworks-test: adding missing @SmallTest am: b10b3e9c14 -s ours am: 9f65f04157 -s ours am: c2b724e114
...
am: dde56579a3 -s ours
Change-Id: I349be4850debbdb6403ebf31d4478e800391bec5
2016-12-09 11:14:43 +00:00
Hugo Benichi
4436fec0e5
DO NOT MERGE: Netd events: record connect() success/errno am: 565f0b2d66 -s ours am: d84f932680 -s ours am: d090bd44dd
...
am: 82758595c0 -s ours
Change-Id: I04204d67dc2fb5b58d4769e69e905733e4e81f1e
2016-12-09 11:13:19 +00:00
Tony Mak
1e8344d9f0
DO NOT MERGE: Show notification for always-on app VPN am: 7b6200aa9f -s ours am: 118071a481 -s ours am: 39c1b059d6
...
am: c28ed9fe4c -s ours
Change-Id: I785b6a367ceb5b032243659c80c08e43d8302671
2016-12-09 11:11:35 +00:00
Stephen Chen
c9ebde3522
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. am: 0889b39d2c -s ours am: 3f5785260e -s ours am: a3430519b3
...
am: f785613fb2 -s ours
Change-Id: I8d502d83e00fdc1cb295b32c557ab253f4b5c091
2016-12-09 11:10:40 +00:00
Hugo Benichi
8a8d6f1ace
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings am: aadb059a9f -s ours am: a30ae5542b -s ours am: 8f56a5e39e
...
am: a2cb5accc6 -s ours
Change-Id: I13b634eaa559a2296c102d60c11e817b0af4ee5a
2016-12-09 11:06:30 +00:00
Hugo Benichi
4788aad5c3
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark am: d0f492a893 -s ours am: 0bef352535 -s ours am: 5ace8e7dca
...
am: a6c0fe058b -s ours
Change-Id: I7bc91eaae2261bd152f3e9bb41c7ee70917a5d48
2016-12-09 11:05:31 +00:00
Felipe Leme
499ebd9e97
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. am: 8d517776e8 -s ours am: fbbaf25665 -s ours am: 0404016147
...
am: a0a8c6d749 -s ours
Change-Id: Ic3005458ec91655ce105c70569877cf5dd8a920b
2016-12-09 11:02:22 +00:00
Felipe Leme
cebc814cc9
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. am: 0e6e089843 -s ours am: b296948b3b -s ours am: f346ceece7
...
am: 36f31949b8 -s ours
Change-Id: I39e12c63872d13d0b8581d7385ee4c971283da9a
2016-12-09 11:01:32 +00:00
Felipe Leme
563930c60d
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. am: bf499379b8 -s ours am: 82393f7b98 -s ours am: e5f4778f04
...
am: ead62d1cd7 -s ours
Change-Id: I9979e5411c032f500995efe7c83df31d40fda0f5
2016-12-09 11:00:02 +00:00
Jeremy Joslin
2214ff9e64
DO NOT MERGE: VPN network stat accounting changes. am: 71f79690a7 -s ours am: 12bb3f057b -s ours am: 4abd92e917
...
am: a66df62191 -s ours
Change-Id: I356877d99b1304777d3d9103e9e0d421b1bb112b
2016-12-09 10:59:11 +00:00
Hugo Benichi
a7f7972f59
DO NOT MERGE: ConnectivityThread: use lazy holder idiom am: e5ef0ce33c -s ours am: f6cb43ae32 -s ours am: cc374542ca
...
am: fdc2f1e075 -s ours
Change-Id: Iafa9ac6e49566a7165c2c586128c8e663e6a1b9a
2016-12-09 10:58:23 +00:00
Hugo Benichi
60c01a83d3
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 94e0d04479 -s ours am: 7337239702 -s ours am: 5617d4ef19
...
am: 2744db6456 -s ours
Change-Id: I649b6bcd026ad86055fa6cbe59cb85e0141d22b8
2016-12-09 10:57:34 +00:00
Hugo Benichi
c040e6743f
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 515e786cfd -s ours am: ef148edaa2 -s ours am: b6574912aa
...
am: 46ed74c3d3 -s ours
Change-Id: I07908e3f1734503e58bbf62586dbfc3a6c1f887a
2016-12-09 10:56:27 +00:00
Jeremy Klein
b2d0c99f50
DO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: d0542adb0b -s ours am: 3cd1ae2261 -s ours am: 7a9bc9c4a3
...
am: 4ce8d89299 -s ours
Change-Id: I9d5983d4f197d7cedb841081f48291288359988a
2016-12-09 10:53:51 +00:00
Hugo Benichi
dde56579a3
DO NOT MERGE: frameworks-test: adding missing @SmallTest am: b10b3e9c14 -s ours am: 9f65f04157 -s ours
...
am: c2b724e114
Change-Id: Ib6a8f4b7ca365ab5cb42b9e57311228be273075a
2016-12-09 10:40:12 +00:00
Hugo Benichi
82758595c0
DO NOT MERGE: Netd events: record connect() success/errno am: 565f0b2d66 -s ours am: d84f932680 -s ours
...
am: d090bd44dd
Change-Id: Ic83b2d46bc4d25878c70c0a02d39f14ecbeab84f
2016-12-09 10:39:20 +00:00
Tony Mak
c28ed9fe4c
DO NOT MERGE: Show notification for always-on app VPN am: 7b6200aa9f -s ours am: 118071a481 -s ours
...
am: 39c1b059d6
Change-Id: I871444d296f0c49f587e98d1e0b760846da37c13
2016-12-09 10:37:38 +00:00
Stephen Chen
f785613fb2
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. am: 0889b39d2c -s ours am: 3f5785260e -s ours
...
am: a3430519b3
Change-Id: Ic0f11bdb50d43c0dd9c449ae3c784b0214b865e3
2016-12-09 10:36:45 +00:00
Hugo Benichi
a2cb5accc6
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings am: aadb059a9f -s ours am: a30ae5542b -s ours
...
am: 8f56a5e39e
Change-Id: Iebd06f7c03b2068314c24a14a2b38d2413b88536
2016-12-09 10:32:40 +00:00
Hugo Benichi
a6c0fe058b
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark am: d0f492a893 -s ours am: 0bef352535 -s ours
...
am: 5ace8e7dca
Change-Id: I7379d8223778d3f2df97d88c0d6f291df219c579
2016-12-09 10:31:27 +00:00
Felipe Leme
a0a8c6d749
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. am: 8d517776e8 -s ours am: fbbaf25665 -s ours
...
am: 0404016147
Change-Id: I4aa888c55824eba58b7e0af78b510a144608e704
2016-12-09 10:28:28 +00:00
Felipe Leme
36f31949b8
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. am: 0e6e089843 -s ours am: b296948b3b -s ours
...
am: f346ceece7
Change-Id: Icaa4e18775b6e810738fb9d180ea20f7ce5c4506
2016-12-09 10:27:35 +00:00
Felipe Leme
ead62d1cd7
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. am: bf499379b8 -s ours am: 82393f7b98 -s ours
...
am: e5f4778f04
Change-Id: I4acc3df60493e5ac388772f8c0e22ac92bc3ce4c
2016-12-09 10:26:08 +00:00
Jeremy Joslin
a66df62191
DO NOT MERGE: VPN network stat accounting changes. am: 71f79690a7 -s ours am: 12bb3f057b -s ours
...
am: 4abd92e917
Change-Id: Ie33371e7e4e47071aa9f74fef93ddf2cff2ec57a
2016-12-09 10:25:17 +00:00
Hugo Benichi
fdc2f1e075
DO NOT MERGE: ConnectivityThread: use lazy holder idiom am: e5ef0ce33c -s ours am: f6cb43ae32 -s ours
...
am: cc374542ca
Change-Id: I121ad24bed0fa12b80110b1058ad4279ec9c0107
2016-12-09 10:24:20 +00:00
Hugo Benichi
2744db6456
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 94e0d04479 -s ours am: 7337239702 -s ours
...
am: 5617d4ef19
Change-Id: If52ab02bd501d4b071f24ddf8abdfe344e7358eb
2016-12-09 10:23:28 +00:00
Hugo Benichi
46ed74c3d3
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 515e786cfd -s ours am: ef148edaa2 -s ours
...
am: b6574912aa
Change-Id: I7c177123057676622e1aa43c68676ee06ed60ee6
2016-12-09 10:22:25 +00:00
Jeremy Klein
4ce8d89299
DO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: d0542adb0b -s ours am: 3cd1ae2261 -s ours
...
am: 7a9bc9c4a3
Change-Id: I897f28d2b002e1a2aa6be8ec423a1c9b1d5b761b
2016-12-09 10:20:04 +00:00
Hugo Benichi
c2b724e114
DO NOT MERGE: frameworks-test: adding missing @SmallTest am: b10b3e9c14 -s ours
...
am: 9f65f04157 -s ours
Change-Id: I717dbbd4d3ed657fec9ed9f45a5ae6f3e2a04b3e
2016-12-09 10:08:43 +00:00
Hugo Benichi
d090bd44dd
DO NOT MERGE: Netd events: record connect() success/errno am: 565f0b2d66 -s ours
...
am: d84f932680 -s ours
Change-Id: I2e11ad15c3327a1d57453295ebc904dcf68ec3e0
2016-12-09 10:07:51 +00:00
Tony Mak
39c1b059d6
DO NOT MERGE: Show notification for always-on app VPN am: 7b6200aa9f -s ours
...
am: 118071a481 -s ours
Change-Id: I35f5107f9984284379136fd86c57432317066e68
2016-12-09 10:05:30 +00:00
Stephen Chen
a3430519b3
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. am: 0889b39d2c -s ours
...
am: 3f5785260e -s ours
Change-Id: Ib6f4a4af04c3f4e26028604c66f6cc4f1720a801
2016-12-09 10:04:41 +00:00
Hugo Benichi
8f56a5e39e
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings am: aadb059a9f -s ours
...
am: a30ae5542b -s ours
Change-Id: If1fe794f87060443d721f0f269f519046a9ee321
2016-12-09 10:00:41 +00:00
Hugo Benichi
5ace8e7dca
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark am: d0f492a893 -s ours
...
am: 0bef352535 -s ours
Change-Id: I92e3730002c11f3c2d5ea9c324f61237190f44bc
2016-12-09 09:59:49 +00:00
Felipe Leme
0404016147
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. am: 8d517776e8 -s ours
...
am: fbbaf25665 -s ours
Change-Id: I66000b3cd40a8494ad144610436f6ee953821a06
2016-12-09 09:57:16 +00:00
Felipe Leme
f346ceece7
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. am: 0e6e089843 -s ours
...
am: b296948b3b -s ours
Change-Id: I43b77614b0ccdd573cf8b29b08ef518bad617aff
2016-12-09 09:55:47 +00:00
Felipe Leme
e5f4778f04
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. am: bf499379b8 -s ours
...
am: 82393f7b98 -s ours
Change-Id: I175601094ae486700c8a6886470abb3147b6ef4e
2016-12-09 09:54:55 +00:00
Jeremy Joslin
4abd92e917
DO NOT MERGE: VPN network stat accounting changes. am: 71f79690a7 -s ours
...
am: 12bb3f057b -s ours
Change-Id: Id9d26bf1b9512a85cd9b6a3253b86b77a6f62e77
2016-12-09 09:54:07 +00:00
Hugo Benichi
cc374542ca
DO NOT MERGE: ConnectivityThread: use lazy holder idiom am: e5ef0ce33c -s ours
...
am: f6cb43ae32 -s ours
Change-Id: I08a03dd249d30bc474a5d16472883737d12fec37
2016-12-09 09:53:16 +00:00
Hugo Benichi
5617d4ef19
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 94e0d04479 -s ours
...
am: 7337239702 -s ours
Change-Id: Ida0d76b540e800db215569717a1c5d26e0f583b0
2016-12-09 09:52:26 +00:00
Hugo Benichi
b6574912aa
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 515e786cfd -s ours
...
am: ef148edaa2 -s ours
Change-Id: Ie8ebf41835e62b64ceb22e552208c77482d96c73
2016-12-09 09:50:57 +00:00
Jeremy Klein
7a9bc9c4a3
DO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: d0542adb0b -s ours
...
am: 3cd1ae2261 -s ours
Change-Id: I3c471a8971c21cdbf1ebf7e1302524b038b20375
2016-12-09 09:48:50 +00:00
Hugo Benichi
b10b3e9c14
DO NOT MERGE: frameworks-test: adding missing @SmallTest
...
This activates all frameworks-test tests in runs of the continuous
platform tests.
Test: $ runtest frameworks-net passes (expect Tether
Bug: 32561414
(cherry picked from commit 174b398594 )
Change-Id: I7b0706a7e3368f971d508388e8ad4afc5de9d646
2016-12-09 14:35:05 +09:00
Hugo Benichi
565f0b2d66
DO NOT MERGE: Netd events: record connect() success/errno
...
Test: $ runtest frameworks-net pass
Bug: 32198976
(cherry picked from commit 8b06bcdfd24100302818ae0e11ee751dd813d5cf)
2016-12-09 14:34:39 +09:00
Tony Mak
7b6200aa9f
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 81f2dff176 )
Change-Id: I929a05c24df01e21415535a333bb14ac4b790a9d
2016-12-09 14:23:10 +09:00
Stephen Chen
0889b39d2c
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 7581e6d766 )
Change-Id: I46da93ba4afa968facf98f7c3d844fd0c469095a
2016-12-09 13:59:33 +09:00
Hugo Benichi
aadb059a9f
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 ccf7f00258 )
Change-Id: If41a24989d5f65aeb439f68741f511b5eb53b18d
2016-12-09 13:59:19 +09:00
Hugo Benichi
d0f492a893
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 cf7db79028 )
Change-Id: I196ab9ef7f5abe456a783eed65db09279d2ecb8c
2016-12-09 13:59:18 +09:00
Felipe Leme
8d517776e8
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 39e1923fbb )
Change-Id: Ia9929295ab2396a7ebb133e65d157f98414e4dfa
2016-12-09 13:59:14 +09:00
Felipe Leme
0e6e089843
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
...
BUG: 30839080
BUG: 31007021
(cherry picked from commit 2b54780c88 )
Change-Id: I35942e60493adebb22871541a34240368c691ee7
2016-12-09 13:59:10 +09:00