Commit Graph

6279 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
a47b222a5f Merge "Remove NetworkParcelable" am: 205886d28f am: 7201f61c57
am: 13be9e9fcd

Change-Id: Ifec0dd683bf9c9b73c4af12835b76d284559daf8
2019-03-17 19:12:02 -07:00
Remi NGUYEN VAN
462e944ff9 Merge "Remove aidl wrappers for framework parcelables" am: 1a1396070e am: 7cf43a2f53
am: 5fd40295cb

Change-Id: I019fbbfd5dde5268cbb38bdaee1bc50a434372bc
2019-03-17 18:59:43 -07:00
Remi NGUYEN VAN
13be9e9fcd Merge "Remove NetworkParcelable" am: 205886d28f
am: 7201f61c57

Change-Id: Ice0f04749d2b7c2863ad18c29f5967649127ee0e
2019-03-17 18:55:26 -07:00
Remi NGUYEN VAN
5fd40295cb Merge "Remove aidl wrappers for framework parcelables" am: 1a1396070e
am: 7cf43a2f53

Change-Id: I41a07768ec8d9af2b7f16d86ee074c206b153b0c
2019-03-17 18:50:17 -07:00
Remi NGUYEN VAN
205886d28f Merge "Remove NetworkParcelable" 2019-03-18 01:30:25 +00:00
Remi NGUYEN VAN
1a1396070e Merge "Remove aidl wrappers for framework parcelables" 2019-03-18 01:30:01 +00:00
Remi NGUYEN VAN
904a38be5e Remove NetworkParcelable
With the @JavaOnlyStableParcelable annotation, Network can now be used
as-is as a framework parcelable.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 126477266
Change-Id: I5d9695a31b3ac48d10edcf08ccd0c34375353b79
2019-03-16 03:51:09 +09:00
Remi NGUYEN VAN
e80be85790 Remove aidl wrappers for framework parcelables
The new @JavaOnlyStableParcelable annotation allows using the framework
parcelables directly, which removes a lot of boilerplate.

Includes new copy constructors for IpPrefix and LinkAddress so they can
be copied easily as-is into parcelables.

Test: atest FrameworksNetTests
Test: booted, WiFi works
Bug: 126477266

Change-Id: Icac8afe498d0b5ebf9a0d0b9eceb14d64a29b381
2019-03-16 03:50:58 +09:00
Junyu Lai
235f8d3b05 Merge "[KA02.5] Use binder thread and executor to invoke callback" am: f9ae70a41c am: 1ed9d716fc
am: d3b8a5c332

Change-Id: I881c1ab09187ab23facc03bb71cc38a7978e442c
2019-03-15 01:19:55 -07:00
Junyu Lai
d3b8a5c332 Merge "[KA02.5] Use binder thread and executor to invoke callback" am: f9ae70a41c
am: 1ed9d716fc

Change-Id: I259ff770ce491d9dec5d136202bebf08e6de58e2
2019-03-15 01:10:46 -07:00
TreeHugger Robot
e8eef8aea1 Merge "Convert tests/**/Android.mk files to Android.bp, part II" 2019-03-14 17:25:12 +00:00
junyulai
7c469179ce [KA02.5] Use binder thread and executor to invoke callback
Currently, client side of keepalive event handling rely on a
newly created thread, looper, messenger and handler per object.

However, by creating oneway AIDL interface with the executor,
the callbacks can be invoked on the binder thread with user
specified context, which not only greatly simplify the design
but also reduce the cost of current thread modeling.

Bug: 114151147
Bug: 123969871
Test: 1. atest FrameworksNetTests --generate-new-metric 10
      2. atest-deflake.sh

Change-Id: I27504074cd28d5b5eb94a7ec0e97ebaaaaa1ae3d
2019-03-14 19:24:12 +08:00
TreeHugger Robot
00d3b38e34 Merge "Update #registerAppUsageLimitObserver to take time used." 2019-03-13 07:23:27 +00:00
Ian Kasprzak
89eb8b8701 Merge "Temporarily disable flaky test." am: 3fb5ba9e61 am: 36da0beab3
am: 7c625e93c9

Change-Id: Ifcfee2d83c2a173f1cc2f22597aff3cffe558281
2019-03-12 22:40:38 -07:00
Chalard Jean
c94bd038f1 Merge "Tell the factory it is already serving a request." am: ae79013ec2
am: b8b94ba4c0

Change-Id: I8c89110d3b8d55fb8c516a966f4726d4059a098e
2019-03-12 22:21:24 -07:00
Xiao Ma
92af719fcf Merge "[KA13]: add unit test for exposed TCP socket keepalive API." am: f1e012ae9b am: d3c00327b9
am: 8323ab407b

Change-Id: Ib2b2474a74e2e84b3bb75c36b518ad48009065af
2019-03-12 22:19:28 -07:00
Ian Kasprzak
7c625e93c9 Merge "Temporarily disable flaky test." am: 3fb5ba9e61
am: 36da0beab3

Change-Id: Ice8e6cd6cad901ca937ca0953049c2f9c83548f8
2019-03-12 22:15:44 -07:00
Xiao Ma
8323ab407b Merge "[KA13]: add unit test for exposed TCP socket keepalive API." am: f1e012ae9b
am: d3c00327b9

Change-Id: I2a2061df07612a9415528e18c6f741e750127adb
2019-03-12 22:01:06 -07:00
Chalard Jean
ae79013ec2 Merge "Tell the factory it is already serving a request." 2019-03-13 02:07:29 +00:00
Ian Kasprzak
3fb5ba9e61 Merge "Temporarily disable flaky test." 2019-03-13 01:52:21 +00:00
Xiao Ma
f1e012ae9b Merge "[KA13]: add unit test for exposed TCP socket keepalive API." 2019-03-13 01:13:08 +00:00
Shafik Nassar
ddb007f669 Merge "Test staged rollback for apk and apex install" 2019-03-13 00:29:09 +00:00
Lorenzo Colitti
5ae2caf8db Temporarily disable flaky test.
Test: None
Bug: 128426024
Change-Id: Id88bf452f41f512703d5831e357d9ba72dc5b911
2019-03-13 09:23:54 +09:00
Varun Shah
4f76a1e091 Update #registerAppUsageLimitObserver to take time used.
Update the time remaining parameter of #registerAppUsageLimitObserver to
time used to avoid confusion between time limit and time remaining.

Bug: 128414428
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForUnregisterObserver
Test: manual (mmma frameworks/base/tests/UsageStatsTest/)
Change-Id: Ied8e4ca0b8636bb9efc4d85dcae46ac6cf1ef5f7
2019-03-12 11:46:10 -07:00
Sasha Smundak
89414e1ed5 Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
2019-03-12 09:37:32 -07:00
Chalard Jean
05ab6811d0 Tell the factory it is already serving a request.
This is a cherry-pick of ag/607226 that has been rebased on
top of four years of changes and with comments addressed.

Gives each factory a serial number and propagates it to every
NetworkAgent so when a score comes back indicating a request is
being handled the factory can account for it properly.

Without this, a new request that's already handled by a network
offered by a factory will not cause an increment of the factorys
ref count. Concretely this results in issues like the RAT icon
not being displayed in spite of the network actually being up
and usable.

This will be ported to AOSP as soon as possible, but immediately
some master-only WiFi tests need to be adjusted with this change
which would not let me submit to AOSP.

Bug: 18637384
Bug: 29030667
Test: manual
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks-net
Test: atest CtsNetTestCases CtsHostsideNetworkTests
Change-Id: I597ac588f76dd507512ff02868fd1310b7e63f7e
Merged-In: I597ac588f76dd507512ff02868fd1310b7e63f7e
2019-03-12 21:47:21 +09:00
Chalard Jean
c3b48be493 Merge "[CS] Support "instant failure" from factories" am: eb3e7b3f64
am: 65d66eec82

Change-Id: I2dbee9b36a500ff1140c208997581064dd0b4ef1
2019-03-12 05:35:00 -07:00
shafik
26b3e5b955 Test staged rollback for apk and apex install
In addition, add some methods to RollbackTestUtils to make old code
reusable for the new test.

Bug: 124043688
Test: atest StagedRollbackTest
Change-Id: I2b259671861c4081f13922f03ea2e251568e06bc
2019-03-12 12:19:14 +00:00
Richard Uhler
8a9774550d Use test stubs for RollbackTests, not system stubs.
Adds @TestApi for all system apis needed for RollbackTests.

Removes @SystemApi for RollbackManager.expireRollbackForPackage and
RollbackManager.reloadPersistedData, which were always intended to be
used solely for testing.

Bug: 127282563
Test: atest RollbackTest StagedRollbackTest
Change-Id: I183b8a484b4a08f36fc19d64241ab408d28c64ca
2019-03-12 12:14:37 +00:00
Chalard Jean
eb3e7b3f64 Merge "[CS] Support "instant failure" from factories" 2019-03-12 12:04:46 +00:00
Lucas Lin
fc0fbbb3af Merge "Check if network has partial connectivity" am: 174ae05817 am: 6cf91d1558
am: c0448b383f

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9
2019-03-12 01:47:25 -07:00
Lucas Lin
c0448b383f Merge "Check if network has partial connectivity" am: 174ae05817
am: 6cf91d1558

Change-Id: I1c552638f576738540dda033f35bd32b011485b5
2019-03-12 01:37:59 -07:00
Xiao Ma
a46371173a [KA13]: add unit test for exposed TCP socket keepalive API.
Bug: 123987272
Test: atest FrameworksNetTests
Change-Id: I543d8f00ae539b706592a149981e3e8992999284
2019-03-12 17:30:47 +09:00
lucaslin
e252a740ca Check if network has partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Test: 1. Build pass.
      2. Fake partial connectivity case for testing.
      3. atest FrameworksNetTests
      4. atest NetworkStackTests

Change-Id: I69ed00ac4850904ff708c9fef22e148879a10e92
2019-03-12 07:37:33 +00:00
Ian Kasprzak
a22fbb808b Merge "Remove android-support-test lib from testutils." am: bc18cc9b19
am: 2a8c949988

Change-Id: I43eac6807d208c35e1338a6cc0bd626da440b6e3
2019-03-11 17:11:44 -07:00
Etan Cohen
ddb720a85e [CS] Support "instant failure" from factories
Add a mechanism by which a factory can declare "instant failure" for
a request - which would result in it getting an OnUnavailable()
(even without a timeout).

Factories may only do this iff:
1. They know they are the only factory which may fulfill this
   request (common for transport-specific requests).
2. The know that the request can definitely not be
   fulfilled at any point in the future.

Bug: 31382922
Test: atest ConnectivityServiceTest
Merged-In: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5
Change-Id: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5
2019-03-11 16:15:43 -07:00
Treehugger Robot
bc18cc9b19 Merge "Remove android-support-test lib from testutils." 2019-03-11 22:57:58 +00:00
Ian Kasprzak
df6b2f6989 Remove android-support-test lib from testutils.
Fixed dependencies as needed.

Fixes apct/net/networking_framework_unit_test broken
in aosp/919393.

Test: m tests, checkbuild and Forrest (via gerritt) testing
Bug: 127910239

Change-Id: Ida0ca8012ede9227d204935b11002ddfa2f134ff
Merged-In: Ia825e0926b46855f9056739441cb21a065692076
(Manual partial cherry-pick of ec6bcbceee)
2019-03-11 20:09:29 +00:00
Chalard Jean
6018db93d7 Merge "Add tethering event callback API" am: 5227285ad7
am: b14afc3a5f

Change-Id: I083910feb7abf3f554fd2b8dddbc13a7aed8e27c
2019-03-11 10:36:15 -07:00
Chalard Jean
5227285ad7 Merge "Add tethering event callback API" 2019-03-11 17:04:57 +00:00
shafik
92ea53f448 API cleanup: add boolean param to setEnableRollback
Mark PackageInstaller.SessionParams#setEnableRollback() as @removed and
@deprecated.
Add PackageInstaller.SessionParams#setEnableRollback(enable).
Replace old API usages in RollbackTestUtils with the new API.

Also, add PackageInstaller.SessionInfo#getEnableRollback().

Fixes: 127282838
Test: atest RollbackTest
Change-Id: I696680207be5ac06560d2abb525f91a100301b4c
2019-03-11 09:48:54 +00:00
Sasha Smundak
ba36f89d7f Merge "Convert tests/**/Android.mk files to Android.bp" am: 40ff4f7d83 am: c33506ce2f
am: c15ff15587

Change-Id: I55c5f273e09a2a0ad53fdd8cb4860f04207c4241
2019-03-09 08:25:50 -08:00
Bernie Innocenti
a7de534a93 Merge "Add junyulai@ as owner of the core networking dirs" am: e5e3ac639b am: b0498ba448
am: 6f6fc40839

Change-Id: I5902959b76797a58884480e3fd219ba53497ae8e
2019-03-09 06:04:09 -08:00
Luke Huang
e2ff3cb9fd Merge "Minor changes to the async DNS query JAVA API" am: c8dfb72891 am: 5b0b36a6b4
am: 6a047b2645

Change-Id: I5ce24db3888c9ac4e05af254aa99aae3abcb7140
2019-03-09 04:33:13 -08:00
TreeHugger Robot
045630b80d Merge "Delete the color extraction blacklist" 2019-03-09 02:40:35 +00:00
Sasha Smundak
c15ff15587 Merge "Convert tests/**/Android.mk files to Android.bp" am: 40ff4f7d83
am: c33506ce2f

Change-Id: Ia1a6c26f4f786f22763ebde95b238887914951f4
2019-03-08 15:33:18 -08:00
Treehugger Robot
40ff4f7d83 Merge "Convert tests/**/Android.mk files to Android.bp" 2019-03-08 22:54:11 +00:00
Robert Snoeberger
4603244f68 Delete the color extraction blacklist
Bug: 124180048
Test: TonalTest passes
Change-Id: Ia3c00d88e2b224a5ea2f81e3734f2b3eff8a712a
2019-03-08 15:58:38 -05:00
Bernie Innocenti
6f6fc40839 Merge "Add junyulai@ as owner of the core networking dirs" am: e5e3ac639b
am: b0498ba448

Change-Id: Ic47555bcaf336a09f6e79fd570e93bc665bb7714
2019-03-08 08:58:44 -08:00
TreeHugger Robot
5b7a3053a2 Merge "Fix damage tracking for RenderNode drawn twice" 2019-03-08 16:45:45 +00:00