Commit Graph

6334 Commits

Author SHA1 Message Date
Benedict Wong
546bcbb218 Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-15 17:41:02 +00:00
markchien
92344ef44f Remove deprecated entitlement API
The deprecated entitlement APIs[1] is introduced in the Q
development cycle. It should be replaced by new APIs[2][3].

[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/874220
[2] https://android-review.googlesource.com/c/platform/frameworks/base/+/920354
[3] https://android-review.googlesource.com/c/platform/frameworks/base/+/927513

Test: -build, flash, boot
bug: 126701557
bug: 126392011
Change-Id: I96487e9038c07363680a76db840994719d7ff768
2019-03-15 09:03:50 +00:00
Junyu Lai
9a4fe7fb2b Merge "[KA02.5] Use binder thread and executor to invoke callback" am: f9ae70a41c am: c93f9c7f0e
am: 06ea4015bf

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

Change-Id: I259ff770ce491d9dec5d136202bebf08e6de58e2
2019-03-15 01:10:46 -07:00
Junyu Lai
c93f9c7f0e Merge "[KA02.5] Use binder thread and executor to invoke callback"
am: f9ae70a41c

Change-Id: I892d4f4dc786aa42dcbe565f345e9a731f318c8a
2019-03-15 00:53:55 -07:00
Remi NGUYEN VAN
df04297b86 Add Parcelable implementation for ApfCapabilities
This is necessary to allow usage of ApfCapabilities as-is in AIDL,
instead of relying on ApfCapabilitiesParcelable, assuming that stable
AIDL starts allowing usage of @SystemApi classes. The Parcelable
implementation would be convenient for clients in any case.

Bug: 126477266
Test: atest FrameworksNetTests
Change-Id: Id2ef3cad261832a2918ccb6bb6bc154d99d75746
2019-03-15 13:41:59 +09:00
Jack Yu
7e0f9143e6 Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Merged-In: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 20:32:16 -07:00
Jack Yu
1d2fb10430 Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 19:24:49 -07:00
Varun Anand
bf1d84cc4e Revert "Revert "Update VPN capabilities when its underlying network set is null.""
This reverts commit c0e7f75e70.

Reason for revert: Retargeted for June monthly release

Bug: 119129310

Change-Id: I9d543415c5707859cfa2a14a1a8ce5909aae7d11
Merged-In: Id0abc4d304bb096e92479a118168690ccce634ed
2019-03-14 18:31:55 +00:00
junyulai
070f9ff460 [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
Benedict Wong
4f57153f1b Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-13 16:48:07 +00:00
Jeremy Klein
2b1a56abac Merge "Rename entitlement callback to adhere to API guidelines." am: 9e77cca082 am: de59c0cc99
am: 9ac0bea512

Change-Id: Iba73611c9330463f4517ac1555b6ee000d740c71
2019-03-12 23:57:05 -07:00
Jeremy Klein
9ac0bea512 Merge "Rename entitlement callback to adhere to API guidelines." am: 9e77cca082
am: de59c0cc99

Change-Id: I29bbf7cbbc0d87a9831762342d81496e6983df68
2019-03-12 23:36:36 -07:00
Android Build Merger (Role)
e3723d4b0b Merge "[automerger skipped] Merge "Tell the factory it is already serving a request." am: 11230da789 am: 55556c9c3a am: 422dc75001 -s ours am skip reason: change_id I597ac588f76dd507512ff02868fd1310b7e63f7e with SHA1 768ea1206d is in history" 2019-03-13 05:48:55 +00:00
Chalard Jean
0b7c7f3eac [automerger skipped] Merge "Tell the factory it is already serving a request." am: 11230da789 am: 55556c9c3a
am: 422dc75001 -s ours
am skip reason: change_id I597ac588f76dd507512ff02868fd1310b7e63f7e with SHA1 768ea1206d is in history

Change-Id: I19e8d1b43338fa64eaccf9ae3039c878ff7cf3c5
2019-03-12 22:47:50 -07:00
TreeHugger Robot
95b2268321 Merge "Add uid information in PackageListObserver" 2019-03-13 05:45:34 +00:00
Ian Kasprzak
0515792497 Merge "Temporarily disable flaky test." am: 89351e03ed am: ead65bd578
am: b08ebd5e39

Change-Id: Ifcfee2d83c2a173f1cc2f22597aff3cffe558281
2019-03-12 22:40:38 -07:00
Jeremy Klein
de59c0cc99 Merge "Rename entitlement callback to adhere to API guidelines."
am: 9e77cca082

Change-Id: If58d5724000fba5e1d794a98ccc89b73ce842f4a
2019-03-12 22:39:53 -07:00
Chalard Jean
422dc75001 Merge "Tell the factory it is already serving a request." am: 11230da789
am: 55556c9c3a

Change-Id: I8c89110d3b8d55fb8c516a966f4726d4059a098e
2019-03-12 22:21:24 -07:00
Xiao Ma
f352c01bc2 Merge "[KA13]: add unit test for exposed TCP socket keepalive API." am: 87b73b01df am: f4b7872afa
am: 82383d0f6e

Change-Id: Ib2b2474a74e2e84b3bb75c36b518ad48009065af
2019-03-12 22:19:28 -07:00
Ian Kasprzak
b08ebd5e39 Merge "Temporarily disable flaky test." am: 89351e03ed
am: ead65bd578

Change-Id: Ice8e6cd6cad901ca937ca0953049c2f9c83548f8
2019-03-12 22:15:44 -07:00
Xiao Ma
82383d0f6e Merge "[KA13]: add unit test for exposed TCP socket keepalive API." am: 87b73b01df
am: f4b7872afa

Change-Id: I2a2061df07612a9415528e18c6f741e750127adb
2019-03-12 22:01:06 -07:00
Treehugger Robot
9e77cca082 Merge "Rename entitlement callback to adhere to API guidelines." 2019-03-13 04:48:24 +00:00
Chalard Jean
55556c9c3a Merge "Tell the factory it is already serving a request."
am: 11230da789

Change-Id: I4c3948c2e7098668cf881d3f31fda87be1250828
2019-03-12 21:42:18 -07:00
Ian Kasprzak
ead65bd578 Merge "Temporarily disable flaky test."
am: 89351e03ed

Change-Id: Ie482f459c2f8bce40098657daa39efccfdf2bcd3
2019-03-12 21:38:43 -07:00
Xiao Ma
f4b7872afa Merge "[KA13]: add unit test for exposed TCP socket keepalive API."
am: 87b73b01df

Change-Id: I79fb97913e8b69c525733dcaec59a60ac6b980b6
2019-03-12 21:29:48 -07:00
Benedict Wong
493e04b932 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: Ic1a04aa66014d1c66a74e65dbace3218437403ae
Merged-In: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-13 02:26:30 +00:00
Benedict Wong
b36a811d58 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-12 19:21:28 -07:00
Chalard Jean
11230da789 Merge "Tell the factory it is already serving a request." 2019-03-13 02:07:29 +00:00
Ian Kasprzak
89351e03ed Merge "Temporarily disable flaky test." 2019-03-13 01:52:21 +00:00
Xiao Ma
87b73b01df Merge "[KA13]: add unit test for exposed TCP socket keepalive API." 2019-03-13 01:13:08 +00:00
Lorenzo Colitti
321475fe7e Temporarily disable flaky test.
Test: None
Bug: 128426024
Change-Id: Id88bf452f41f512703d5831e357d9ba72dc5b911
2019-03-13 09:23:54 +09:00
Jeremy Klein
7e7c742ad7 Rename entitlement callback to adhere to API guidelines.
The method for OnTetheringEntitlementResultListener needs to be
onTetheringEntitlementResult in order to meet our API guidelines:

"Use Listener when there is a single callback method and there will
never be any others. It should be an interface whose name is the same
as the callback method plus Listener."

Bug: 126392011
Change-Id: I9a883765541ae853c4eb3bd52c9d93a7af16e661
Test: Manual build
2019-03-12 13:36:21 -07:00
Chalard Jean
29d06db64b 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
265d164ddd [automerger skipped] Merge "[CS] Support "instant failure" from factories" am: dce527fbd6 am: 821d197ce6
am: cd78f5f821 -s ours
am skip reason: change_id I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5 with SHA1 4ad1b9f839 is in history

Change-Id: I8f82d119a7a940b190fecd665e47076404d47fd8
2019-03-12 05:44:42 -07:00
Chalard Jean
cd78f5f821 Merge "[CS] Support "instant failure" from factories" am: dce527fbd6
am: 821d197ce6

Change-Id: I2dbee9b36a500ff1140c208997581064dd0b4ef1
2019-03-12 05:35:00 -07:00
Chalard Jean
821d197ce6 Merge "[CS] Support "instant failure" from factories"
am: dce527fbd6

Change-Id: I0c5f2823763857edfc5095686345c764d9be12e1
2019-03-12 05:25:48 -07:00
Chalard Jean
dce527fbd6 Merge "[CS] Support "instant failure" from factories" 2019-03-12 12:04:46 +00:00
Lucas Lin
1f01518b68 Merge "Check if network has partial connectivity" am: 2d3cc4577a am: 0ea87a4edb
am: 973a569390

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9
2019-03-12 01:47:25 -07:00
Lucas Lin
973a569390 Merge "Check if network has partial connectivity" am: 2d3cc4577a
am: 0ea87a4edb

Change-Id: I1c552638f576738540dda033f35bd32b011485b5
2019-03-12 01:37:59 -07:00
Xiao Ma
fcd1ab6aaf [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
Lucas Lin
0ea87a4edb Merge "Check if network has partial connectivity"
am: 2d3cc4577a

Change-Id: I3e94029fe067a1a22acc640a0df6a87720572b94
2019-03-12 01:28:50 -07:00
Lucas Lin
2d3cc4577a Merge "Check if network has partial connectivity" 2019-03-12 08:11:14 +00:00
lucaslin
2240ef679d 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
Junyu Lai
16f5c7d596 Merge "Improve keepalive offload documentation and error handling" am: a0b880c9e8 am: 4a91c73e67
am: a820236f47

Change-Id: If13af1a50c9bb12c85559c9c7a83d0e861d76d09
2019-03-11 22:40:00 -07:00
Junyu Lai
a820236f47 Merge "Improve keepalive offload documentation and error handling" am: a0b880c9e8
am: 4a91c73e67

Change-Id: Iae2c4dfcfa2695a57ed54eb93c64eac54f18cf98
2019-03-11 22:30:39 -07:00
Junyu Lai
4a91c73e67 Merge "Improve keepalive offload documentation and error handling"
am: a0b880c9e8

Change-Id: Ia87def27904309d405c39607326a77133632461d
2019-03-11 22:21:27 -07:00
Junyu Lai
a0b880c9e8 Merge "Improve keepalive offload documentation and error handling" 2019-03-12 05:11:50 +00:00
Etan Cohen
fbfdd84e7c [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
Chenbo Feng
9d4479a4f4 Add uid information in PackageListObserver
The uid information of a removed package cannot be retrieved by the
packageName anymore once it is removed. So it would be useful to provide
the uid of removed package in the onPackageAdded and onPackageRemoved
method of the PackageListObserver. This modification helps simplify the
design in PermissionMonitor.

Bug: 125396053
Test: dumpsys netd trafficcontroller

Change-Id: I2bd4bdf924687960a4fa3a47235bae68d885e445
2019-03-11 16:11:16 -07:00