Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Move TcpKeepalivePacketData out of the framework.
This class is not used in framework.jar, only in services.jar.
Move it out of the framework so framework.jar can stop depending
on the NetworkStack stable AIDL interfaces.

This should really under com.android.server as well, but that's
a cross-project change to be done in another CL.

Test: m
Bug: 128804404
Change-Id: Ib2805f7fcc516a5f6989c252365d1c95b8042703

Lorenzo Colitti   commited 2019-03-20 00:49:33 +09:00
47002ed0d1
Stop using netd parcelables in the framework.
The only actual users of these classes are in services.jar, not
in frameworks.jar. The only reason the framework depends on them
is that the code that converts to and from stable parcelables is
currently in the framework. Move that code to services and cut
the dependency.

These classes aren't used in the networkstack app so they don't
need to be in shared. They also can't be in shared because the
classes are not in the SDK. So put the conversion functions
directly inside their only user (NetworkManagementService).

Also remove the jarjar rules that rename the classes for use by
the NetworkStack app.

This does not actually remove the dependency from the build file,
that will be done in a future CL.

Bug: 128804404
Test: builds, boots
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest HostsideVpnTests
Change-Id: I027d50ba56091f5558f45e6e08f32e5912b2a82a

Lorenzo Colitti   commited 2019-03-20 00:49:32 +09:00
86b51bb8a4
Merge "Replace Handler with Executor for async DNS API" am: 21be4d297c am: 699127bae2
am: cadce1355b

Change-Id: Ia2305094fe66017fbdfdc18b2c7284452ac90036

Luke Huang   authored and   android-build-merger   commited 2019-03-18 23:40:49 -07:00
9c21fcd7f6
Merge "Refactor answer callback for async DNS query JAVA API" am: 2b474c454f am: 5f80d53df8
am: d54dc33070

Change-Id: Id4d0ae87b1ac8618c28da666619c5c5b5bd2d722

Luke Huang   authored and   android-build-merger   commited 2019-03-18 23:24:06 -07:00
bcee2f4588
Merge "Replace Handler with Executor for async DNS API"
Luke Huang   authored and   Gerrit Code Review   commited 2019-03-19 05:35:39 +00:00
21be4d297c
Merge "Refactor answer callback for async DNS query JAVA API"
Luke Huang   authored and   Gerrit Code Review   commited 2019-03-19 05:35:18 +00:00
2b474c454f
Merge "Remove deprecated entitlement API" am: 2adc944732 am: 74b3b60b76
am: 3baef16087

Change-Id: I6bb5611de8d45e9a5c17128ea38ba1bdd8f86ac2

Mark Chien   authored and   android-build-merger   commited 2019-03-18 20:38:36 -07:00
cb9503a379
Merge "Remove deprecated entitlement API"
Mark Chien   authored and   Gerrit Code Review   commited 2019-03-19 02:44:37 +00:00
2adc944732
Replace Handler with Executor for async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Ie1dc27643d4767f2a8a39da755edf388a00962d5

Luke Huang   commited 2019-03-16 18:53:07 +08:00
dfd2e4da29
Refactor answer callback for async DNS query JAVA API
1. refactor AnswerCallback with a generic type
2. support onError in AnswerCallback
3. Fix minor problem reported from API Review

Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: I685c9989f8401acb63d2e83f552b2d5b20c41af0

Luke Huang   commited 2019-03-16 18:53:05 +08:00
6d72b2c073
Merge "Integrate testNetworkService and Manager with Connectivity stack"
Benedict Wong   authored and   Gerrit Code Review   commited 2019-03-15 17:41:02 +00:00
546bcbb218
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

markchien   authored and   Mark Chien   commited 2019-03-15 09:03:50 +00:00
92344ef44f
Merge "[KA02.5] Use binder thread and executor to invoke callback" am: f9ae70a41c am: c93f9c7f0e
am: 06ea4015bf

Change-Id: I881c1ab09187ab23facc03bb71cc38a7978e442c

Junyu Lai   authored and   android-build-merger   commited 2019-03-15 01:19:55 -07:00
9a4fe7fb2b
[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

junyulai   commited 2019-03-14 19:24:12 +08:00
070f9ff460
Merge "Integrate testNetworkService and Manager with Connectivity stack"
Benedict Wong   authored and   Android (Google) Code Review   commited 2019-03-13 16:48:07 +00:00
4f57153f1b
Merge "Rename entitlement callback to adhere to API guidelines." am: 9e77cca082 am: de59c0cc99
am: 9ac0bea512

Change-Id: Iba73611c9330463f4517ac1555b6ee000d740c71

Jeremy Klein   authored and   android-build-merger   commited 2019-03-12 23:57:05 -07:00
2b1a56abac
Merge "Rename entitlement callback to adhere to API guidelines."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-03-13 04:48:24 +00:00
9e77cca082
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

Benedict Wong   commited 2019-03-13 02:26:30 +00:00
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: I741ef9cdf4bd4125d9129af3a030edf32f438e4f

Benedict Wong   commited 2019-03-12 19:21:28 -07:00
b36a811d58
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

Jeremy Klein   commited 2019-03-12 13:36:21 -07:00
7e7c742ad7
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

Chalard Jean   commited 2019-03-12 21:47:21 +09:00
29d06db64b
Merge "[CS] Support "instant failure" from factories"
Chalard Jean   authored and   Gerrit Code Review   commited 2019-03-12 12:04:46 +00:00
dce527fbd6
Merge "Check if network has partial connectivity" am: 2d3cc4577a am: 0ea87a4edb
am: 973a569390

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9

Lucas Lin   authored and   android-build-merger   commited 2019-03-12 01:47:25 -07:00
1f01518b68
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

lucaslin   authored and   Lucas Lin   commited 2019-03-12 07:37:33 +00:00
2240ef679d
Merge "Improve keepalive offload documentation and error handling" am: a0b880c9e8 am: 4a91c73e67
am: a820236f47

Change-Id: If13af1a50c9bb12c85559c9c7a83d0e861d76d09

Junyu Lai   authored and   android-build-merger   commited 2019-03-11 22:40:00 -07:00
16f5c7d596
Merge "Improve keepalive offload documentation and error handling"
Junyu Lai   authored and   Gerrit Code Review   commited 2019-03-12 05:11:50 +00:00
a0b880c9e8
[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

Etan Cohen   commited 2019-03-11 16:15:43 -07:00
fbfdd84e7c
Merge "Minor changes to the async DNS query JAVA API" am: 06ef4a5bc4 am: 39c58a32d3
am: 6005667ec0

Change-Id: I5ce24db3888c9ac4e05af254aa99aae3abcb7140

Luke Huang   authored and   android-build-merger   commited 2019-03-09 04:33:13 -08:00
a3acfe29a9
resolve merge conflicts of 7365441fe3 to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia76e345ddda5972b2c00731cd1d73a2c1d41c1db

Benedict Wong   commited 2019-03-08 23:45:49 +00:00
17ab80fd9d
Add tethering event callback API
Provide OnTetheringEventCallback for system app to know
tethering's upstream.

Bug: 125583822
Test: -build, flash, boot
      -atest FrameworksNetTests

Change-Id: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36
Merged-in: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36

markchien   commited 2019-03-09 00:35:55 +08:00
4ef53e8819
Add tethering event callback API
Provide OnTetheringEventCallback for system app to know
tethering's upstream.

Bug: 125583822
Test: -build, flash, boot
      -atest FrameworksNetTests

Change-Id: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36

markchien   commited 2019-03-08 17:28:33 +08:00
20f6eea87c
Merge "Minor changes to the async DNS query JAVA API"
Luke Huang   authored and   Gerrit Code Review   commited 2019-03-08 03:19:55 +00:00
06ef4a5bc4
Merge changes Ie66ba631,Ic42c09a3
* changes:
  Implement TestNetworkService
  Add shell TestNetworkManager and Service

Benedict Wong   authored and   Gerrit Code Review   commited 2019-03-07 23:32:55 +00:00
6525e97ea5
Merge "Fix TetheringEntitlementValueListener related API" am: cdfb2b941d am: 71894fbf14
am: ae8e49de86

Change-Id: I9a1f7c9fa34b6f1e6104a8e5af4b6957e7aae3eb

Mark Chien   authored and   android-build-merger   commited 2019-03-07 05:51:10 -08:00
f8279fdf25
Merge "Fix TetheringEntitlementValueListener related API"
Mark Chien   authored and   Gerrit Code Review   commited 2019-03-07 13:21:53 +00:00
cdfb2b941d
Minor changes to the async DNS query JAVA API
1. refine the naming in DnsPacket and add more comment
2. add comment in DnsResolver

Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Ib482d079d6823fd1d9bff163427b7aad38374199

Luke Huang   commited 2019-03-07 16:40:49 +08:00
1244835690
Improve keepalive offload documentation and error handling
Bug: 123987401
Test: atest FrameworksNetTests
Change-Id: Id651cfb743f02b05ca3845af3c393eaf5762bb20

junyulai   commited 2019-03-07 16:01:30 +08:00
97767bf71c
Fix TetheringEntitlementValueListener related API
Test: -build, flash, boot
      -atest FrameworksNetTests
bug: 126701557
bug: 126392011

Change-Id: I6dda10fbfe8ffaef71269617750a22563396f5ea

markchien   commited 2019-03-07 13:33:21 +08:00
bf5ab01869
Merge "Add @UnsupportedAppUsage annotations"
Andrei-Valentin Onea   authored and   Gerrit Code Review   commited 2019-03-06 17:18:05 +00:00
7e3ccaa77a
Merge "Adding new APN type for Mission Critical Services." am: a32315e69a am: 65bde4b9a0
am: 45f927af1e

Change-Id: Iaa216ae164b1bbc1c27be0549bd9e19fa9803cb8

Amit Mahajan   authored and   android-build-merger   commited 2019-03-04 11:10:07 -08:00
2de8d9415a
Merge "Adding new APN type for Mission Critical Services."
Amit Mahajan   authored and   Gerrit Code Review   commited 2019-03-04 18:23:30 +00:00
a32315e69a
Merge "Fixed all APIs not meeting API review requirement" am: 37cde6b81d am: 75d5f94bb5
am: 2313596576

Change-Id: I9683c9616e524013eda818e34d817d636ff1f365

Jack Yu   authored and   android-build-merger   commited 2019-03-02 20:59:32 -08:00
0b5569af6f
Merge "Fixed all APIs not meeting API review requirement"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-03-03 04:27:32 +00:00
37cde6b81d
Merge "getConnectionOwnerUid: Clarify documentation" am: 72a6706e8b am: 563f40fb7f
am: f26bffe73f

Change-Id: I4861a830f974d542452fb1ea8710438cf4fec14a

Jeff Vander Stoep   authored and   android-build-merger   commited 2019-03-01 20:24:38 -08:00
879c396fec
Merge "getConnectionOwnerUid: Clarify documentation"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-03-02 03:42:22 +00:00
72a6706e8b
Merge "Fix Automated API Review: InetAddresses" am: 4daca39083 am: cd8d86ab93
am: 0be0a4138e

Change-Id: I20a88429cd47bf16d7b2766fde5b978c33e9272b

Paul Duffin   authored and   android-build-merger   commited 2019-03-01 19:35:02 -08:00
22b9062704
Adding new APN type for Mission Critical Services.
Test: build
Bug: 124447962
Change-Id: I9f608badd363703394432640dc892a4465660b6d

Amit Mahajan   commited 2019-03-01 16:52:17 -08:00
b7aafd26aa
Fixed all APIs not meeting API review requirement
To address the API review feedback provided by
the API council.

Bug: 126702995
Bug: 126701710
Bug: 126702357
Bug: 126701113
Bug: 126701239
Bug: 126700713
Bug: 126700064
Test: Manual
Change-Id: I4b902c1fc2c09133022b05dacdda8964436205d2

Jack Yu   commited 2019-03-01 14:37:47 -08:00
9fc82e3a86
Fix Automated API Review: InetAddresses
Add @NonNull annotations as required by the automated review.

Bug: 126702338
Test: make checkbuild
Change-Id: I9057f06de8d7ea846af00d5cefa744d4206b4b63

Paul Duffin   commited 2019-03-01 14:06:18 +00:00
e59e8c6255
All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations

Jeff Sharkey   commited 2019-02-28 23:29:04 -07:00
f8525286b4