Commit Graph

62 Commits

Author SHA1 Message Date
Motomu Utsumi
c6dc826c22 Merge changes If3217916,I86023b1f into main
* changes:
  Add java_defaults for @FlaggedApi handling
  Prepare api directory for udc mainline branch
2023-09-12 08:25:42 +00:00
Motomu Utsumi
c480039309 Merge remote-tracking branch 'remotes/aosp/tmp_libs_net_move' into libs_net_move_merge
frameworks/libs/net/common ->
packages/modules/Connectivity/staticlibs

frameworks/libs/net/client-libs ->
packages/modules/Connectivity/staticlbs/client-libs

Test: TH
Bug: 296014682
Change-Id: I5dc78f0c4653e20312ab3d488b1e69262dbb9840
2023-09-11 11:53:46 +09:00
Motomu Utsumi
310f11acfe Add java_defaults for @FlaggedApi handling
This CL is a preparation to ignore @FlaggedApi API in udc mainline
branch

Bug: 299411828
Test: TH
Change-Id: If3217916b2c37ebaa7b48d8387c69cb078af9550
2023-09-08 14:47:03 +09:00
Patrick Rohr
740b1d4ac3 cronet: Move cronet defaults to framework/Android.bp
Since cronet has moved out of the tethering jar.

Test: TH
Change-Id: Ibf476c0afd72863b26188dae6838825e6762976a
2023-05-12 10:15:01 -07:00
Patrick Rohr
2e3e2955b8 cronet: delete option to disable cronet in tm-mainline-prod
With the release cut of the July train and the recent automerger
cutover, tm-mainline-prod is now officially an abandoned branch.

This change deletes (most) infrastructure that was put in place to
disable cronet on tm-mainline-prod.

Test: builds
Change-Id: I078f2114b736a634f08d8f704c19beb2224ef645
2023-05-12 10:15:01 -07:00
Motomu Utsumi
73e2e87d56 Move cronet to framework-connectivity
aosp/2384137 added cronet to framework-tethering.
But framework-connectivity is a better place to put cronet since
cronet does not work on R devices (b/270049141) and
framework-tethering is R+, framework-connectivity is S+.

Followup CLs will move some modules (e.g. CronetJavaPrejarjarDefaults)
that use the branch dependent soong variables to framework/Android.bp

Test: TH
Bug: 278070640
Change-Id: I6bc10116759fb9e083c02147908e53022dab740a
2023-04-19 11:32:12 +09:00
Chidera Olibie
ef0074143d Revert "Fix symbol not found error for hidden apis used by MTS"
This reverts commit 5f44ed3e7e.

Reason for revert: The symbol not found error was a transient build failure.

Change-Id: Iada1a0bc9c2282286c1e3b972de42e6387c901d6
2023-04-13 09:38:39 +00:00
Chidera Olibie
5f44ed3e7e Fix symbol not found error for hidden apis used by MTS
This fails to build on git_master when
depending on `sdk_version:module-current` and
`libs:["framework-tethering-pre-jarjar"].

AIUI, some builds use sdk prebuilts that have compiled out
some of the hidden apis. And thus fails with symbol not found.

So we depend on the impl version of frame-tethering so we always
have access to these hidden apis for MTS.

Test: atestNetHttpCoverageTests
Change-Id: Id68a9051b9f8566f9ca42142669150a6db8b0925
2023-03-23 15:53:11 +00:00
Mohannad Farrag
9c6801f81b Revert^2 "gn2bp: Remove soong_namespace"
8484ec4dcd

Change-Id: I490c09179ea6a20ca5fba83c314b552d360be688
2023-03-23 12:47:47 +00:00
Mohannad Farrag
8484ec4dcd Revert "gn2bp: Remove soong_namespace"
Revert submission 2502135-remove_soong_namespace

Reason for revert: Missing line needs to be added

Reverted changes: /q/submissionid:2502135-remove_soong_namespace

Change-Id: I780a21cf7031e04eb368fda4f93ed16ea032ca8d
2023-03-23 12:36:48 +00:00
Mohannad Farrag
16ba062336 gn2bp: Remove soong_namespace
* This was causing the infra to ignore the modules and masking build errors.

Test: TH
Change-Id: Ic5aa3557353488d5370f4d9c4240954820bfe52b
2023-03-23 12:14:04 +00:00
Stefano Duo
a5e1029101 Merge "Reland "Bundle Cronet's boringssl"" 2023-03-20 13:10:30 +00:00
Stefano Duo
43d89f659f Reland "Bundle Cronet's boringssl"
This relands commit 2cd4ac8725

Merged-In: I903369dbad37b663a39e80149e25b0634386df6d
Change-Id: I018121bf4d02ccc59c89de39e3d1598deb9cf67b
Bug: 274094720
2023-03-17 13:46:25 +00:00
Anton Hansson
57f3d69fd5 Use filegroup defaults for framework sources
There's now a shared defaults module for this kind of filegroup. Use
that and remove the previously duplicated prop.

Bug: 271816210
Test: m
Change-Id: Ia4547984a73179fdfc98c427482dd10246f9722c
2023-03-15 10:36:52 +00:00
Patrick Rohr
77c084d1f6 Revert "Bundle Cronet's boringssl"
This reverts commit 2cd4ac8725.

Reason for revert: b/273575026

Change-Id: I5b9886465b8a0f71af469d303a39f670a9b0cb68
2023-03-14 22:45:06 +00:00
Stefano Duo
2cd4ac8725 Bundle Cronet's boringssl
Test: m && atest CtsNetHttpTestCases
Change-Id: I3c28a52d60128cf4324eda436c1f6e9fa463108e
2023-03-13 13:28:35 +00:00
Motomu Utsumi
d4a1c63c5d cronet: re-enable lint
Bug: 265674359
Test: TH
Change-Id: I867a66518db0eb9fe446aa28e07d4678f0e3af94
2023-03-10 19:01:18 +09:00
Patrick Rohr
ffdeb180a1 cronet: remove cronet_java_defaults_enabled_srcs
external/cronet has been added to the default manifest in
tm-mainline-prod, so this soong variable is not needed anymore.

Test: TH
Merged-In: I5750d87c9cab0e9d4d213b5a81a2d71cc9610a08
Change-Id: I5750d87c9cab0e9d4d213b5a81a2d71cc9610a08
2023-01-25 01:07:04 -08:00
Dan Stahr
e2be25f6a0 Add Cronet to the Tethering apex.
Test: m
API-Coverage-Bug: 258707653

Change-Id: I2d6401ec719ce265abdb30d6ba8fd94861845197
2023-01-17 08:06:53 -08:00
Motomu Utsumi
841643a95e cronet: Introduce constant for CronetJavaDefaultsEnabled srcs
This is required temporarily until the external/cronet is auto-merged
to tm-mainline-prod

Test: m
Change-Id: Ie875e4108a0b2a82e9615d1f32f3b0bf76572146
2023-01-17 15:03:03 +09:00
Dan Stahr
1a8d9d1521 Set up the jarjar config generator for the Tethering module.
This does not affect existing classes in framework-tethering.jar
as everything inside android.net is excluded from being jarjar'ed.
It is a preparatory step to adding cronet to framework-tethering.jar
which will use jarjar.

Test: m
Change-Id: I8cc7babaa37f7aef52306a833593dba097fd26db
2023-01-13 02:26:19 -08:00
Patrick Rohr
a6d600ff50 cronet: enable defaults in aosp
Automerger into tm-mainline-prod is currently broken, so this change
uses a Merged-In line that is already present in tm-mainline-prod (and
downstream from it). This means that this change must also be
cherry-picked into internal-master with a slightly different Merged-In
specification.

Test: TH
Merged-In: I555ad1ed687632cfe8a7e30283f80e80956fc1d4
Change-Id: I25096f4cc21923c602d77a66aad248d52b42b18f
2023-01-06 04:13:56 -08:00
Patrick Rohr
3b9ba6acdf cronet: add defaults to enable / disable Cronet in framework-tethering
A similar option already exists in
packages/modules/Connectivity/Cronet/apex/Android.bp. This is in
preparation of adding cronet to framework-tethering. It is possible that
we only end up using one of the variables but better safe than sorry.

This change will be blocked by the blocked automerger into
tm-mainline-prod. If this continues to be a problem, we might have to
play some tricks with automerger.

Test: TH
Change-Id: I40ba22aba041ec12ec2bf2881df14e6c0ee53b44
2023-01-06 04:12:59 -08:00
Igor Chernyshev
9dac660bf0 Add CDM dependency in Tethering
This change introduces a limited library for dependencies on
framework-connectivity from Tethering,
connectivity-internal-api-util, where all classes are annotated with
@RequiresApi(S) to ensure proper API checks are done before usage.

Bug: 245972418

Change-Id: I82bafd9063341adc71d07f0858e6d68283d081f0
2022-12-16 17:55:53 +00:00
Remi NGUYEN VAN
bdaa351e8a Add visibility for core tests
Allow core tests to use hidden connectivity APIs. Benchmark tests in
particular cannot be run without these.

Ignore-AOSP-First: Avoiding merge conflicts, cherry-pick will follow
Bug: 197717846
Test: m
Change-Id: Ia01f24317d14b063f9a7e24c3ada11b140641c50
2022-02-07 10:11:40 +09:00
Aaron Huang
7174ac3d86 Have connectivity targets be visible to Frameworks[Vcn|Ike]Tests
Bug: 204153604
Ignore-AOSP-First: part of large topic that only builds internally
Test: build, FrameworksVcnTests, FrameworksIkeTests
Change-Id: I40740200fe4a7476a21bb5330429a11c97e38fb8
2022-02-02 23:53:43 +00:00
Chiachang Wang
3bc5276568 Enable strict_updatability_linting in connectivity src
Bug: 188851968
Test: m lint-check
Change-Id: I3cd06ea16f05cb37d9369a48dd0285d8239fd764
2021-11-26 10:31:58 +08:00
markchien
2fbd3e72d3 Support set test network to tethering upstream
Test: atest EthernetTetheringTest

Change-Id: Ief2a92bc6c573a6bb75c72b7a0630e5c0accfa73
2021-09-30 10:14:58 +00:00
Remi NGUYEN VAN
fe20e1317d Add connectivity coverage tests
The coverage tests will allow measuring code coverage for all
Connectivity+Tethering code.

This is a combination of the current TetheringCoverageTests, and
FrameworksNetTests.

Adding min_sdk_version to the test prevents it from using deprecated
IoUtils utilities. Replace it with the non-deprecated alternative.

Test: atest ConnectivityCoverageTests
Change-Id: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
2021-06-16 19:45:20 +09:00
Remi NGUYEN VAN
f20103940e Reference framework-connectivity stubs explicitly
To merge the framework-connectivity and framework-connectivity.impl
targets, framework-connectivity stubs need to be referenced explicitly
in java_sdk_libraries, otherwise the build system will currently see
dependency cycles.

Bug: 183600168
Test: m
Merged-In: I556747f9ba934f8b44b6ea9a518adbccc84ac2a9
Change-Id: I0ff10dcb553115d349e287c9f648d77579158f9d
2021-06-08 15:24:05 +09:00
markchien
35ad54b25e Add the tethering type to TetheringEventCallback methods
Before this change, tethering always report a list of tethered
interfaces and the caller need to use each tethering type's interface
regex to matching tethered list to manual implement the mapping of
tethering type and interface. This change allow caller to get rid of
tethering interface regex.

Bug: 162920185
Bug: 152203943
Test: atest CtsTetheringTest on S

Merged-In: I91bcccd676d109c1b974497ac29bd366a41b8899
Change-Id: I91bcccd676d109c1b974497ac29bd366a41b8899
2021-06-01 14:35:39 +08:00
Baligh Uddin
3684713b8a Merge history of packages/Connectivity
Modified License Import for:
- Tethering/common/TetheringLib/Android.bp
- framework/Android.bp
- service/Android.bp
- tests/common/Android.bp
- tests/deflake/Android.bp
- tests/integration/Android.bp
- tests/smoketest/Android.bp
- tests/unit/Android.bp
- tests/unit/jni/Android.bp

BUG: 186628461
TEST: TH
Merged-In: I7b5fd61cd551c7010f5b8ceabbfdd04f30f648dd
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ia2185820f485e8ad2d3626a96eab7f5a874736cf
2021-05-24 05:45:18 +00:00
Remi NGUYEN VAN
74b274424a Add dependency on system API in connectivity
The system API are moved to the connectivity module: add dependency on
the stubs from framework-tethering.

This only allows tethering to depend on system API defined by the
connectivity classes, not on any private code, even if they are
eventually bundled in the same APEX.

Bug: 171540887
Test: m

Merged-In: Iebfb3e01c5d2480e84edcfc76cf489520bd60237
Merged-In: Ic2491f04880ff66abc3b2d3aaee6168e18f6d68a
(clean cherry-pick from internal branch)

Change-Id: Iebfb3e01c5d2480e84edcfc76cf489520bd60237
2021-02-26 19:36:06 +09:00
Bob Badour
97e6be27f6 [LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity
Added SPDX-license-identifier-Apache-2.0 to:
  Tethering/Android.bp
  Tethering/apex/Android.bp
  Tethering/bpf_progs/Android.bp
  Tethering/common/TetheringLib/Android.bp
  Tethering/tests/Android.bp
  Tethering/tests/integration/Android.bp
  Tethering/tests/mts/Android.bp
  Tethering/tests/privileged/Android.bp
  Tethering/tests/unit/Android.bp
  tests/cts/hostside/Android.bp
  tests/cts/hostside/aidl/Android.bp
  tests/cts/hostside/app/Android.bp
  tests/cts/hostside/app2/Android.bp
  tests/cts/hostside/certs/Android.bp
  tests/cts/net/Android.bp
  tests/cts/net/api23Test/Android.bp
  tests/cts/net/appForApi23/Android.bp
  tests/cts/net/jni/Android.bp
  tests/cts/net/native/dns/Android.bp
  tests/cts/net/native/qtaguid/Android.bp
  tests/cts/net/util/Android.bp
  tests/cts/tethering/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I8534c580f0e2a17be146300b67b3604817b64507
2021-02-16 04:09:58 -08:00
Nikita Ioffe
583e35a12e com.android.tethering: set min_sdk_version 30
Tethering is updatable apex module that was launched in R, hence it and
all it dependencies should specify min_sdk_version <= 30.

Test: m
Bug: 171668006
Bug: 171330443
Change-Id: Ic91cf96dda6419d1038b0329b920f9cd24482aef
Merged-In: Ic91cf96dda6419d1038b0329b920f9cd24482aef
(cherry picked from commit bee20e84f8)
(cherry picked from commit 1fe1e539e1)
2020-11-05 20:30:40 +00:00
Baligh Uddin
f814b9b1ce Add visibility rules for packages/modules/Connectivity/Tethering
BUG: 167962976
Test: TH
Change-Id: Id28881b35cf24fc9517fa11af6d8e539ab244fa6
2020-10-29 02:11:55 +00:00
Anton Hansson
9aed13818c Simplify module visibility post build refactor
//visibility:override is no longer needed for impl_library_visibility
to override visibility.

Removing this allows the defaults module to specify better defaults.

- Stub libraries are made publicly visible, via `visibility`
- Impl libraries are private by default, but visibility is extended
  by the modules

Bug: 165017290
Test: m
Exempt-From-Owner-Approval: build refactor
Change-Id: Ibf35bfac5c99a21125f89ba10945f3364217b90f
2020-09-07 07:54:50 +00:00
Paul Duffin
dfc7fb7f75 Switch to standard naming scheme
Removes use of the special framework-modules naming scheme.

Bug: 155164730
Test: m java
Exempt-From-Owner-Approval: Build cleanup.
Change-Id: I3896d7c91e937f503b49f5df011c21ee51219652
Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
Merged-In: I3b78fcbcacc3df787e171d6eedeef1e51b087615
(cherry picked from adac7d2cc3)
2020-06-02 14:15:28 +00:00
Paul Duffin
2a8d380f40 Clean up the visibility rules for framework modules
Switching from java_library to java_sdk_library switched the meaning
of the module name from referring to the implementation library to
referring to the stubs. This change updates the visibility rules to
reflect that new meaning.

Visibility rules that were previously set for the java_library have
been moved to the impl_library_visibility property and the special
//visibility:override value has been prepended to prevent it from
inheriting the values from the visibility property.

Visibility rules set for the stubs (via stubs_library_visibility)
property have been moved to the visibility property.

Bug: 155164730
Test: m nothing
Exempt-From-Owner-Approval: Build cleanup
Change-Id: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
Merged-In: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
(cherry picked from a17cf677b5)
2020-06-02 11:41:07 +01:00
Paul Duffin
2dae272903 Switch framework-tethering to use java_sdk_library
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
    naming_scheme: "frameworks-modules"

That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.

Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.

However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.

In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.

Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
2020-05-28 13:14:52 +00:00
Paul Duffin
82e7165284 Cleanup packages/Tethering/common/TetheringLib
Merge the otherwise unused tethering-aidl-interfaces into
framework-tethering.

This is in preparation for converting to use java_sdk_library.

Bug: 155164730
Test: m droid
Change-Id: I4583539d11ba69320aa5a0dfcfee072c81affac2
2020-05-13 09:56:18 +01:00
Jooyung Han
8182d8bd56 Set min_sdk_version for updatable mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 145796956
Bug: 150999716
Test: m
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
2020-05-07 17:30:00 +09:00
Anton Hansson
b098442b7b Merge "Rename module dist files" 2020-05-05 13:45:03 +00:00
Anton Hansson
d2ec5841fb Merge "Fix tethering module lib stub default" 2020-05-01 08:58:26 +00:00
Anton Hansson
bb5231decc Rename module dist files
This makes the filenames of the disted artifacts (api txts and stubs)
match the module name of the modules they're from. This matches the
naming scheme used by java_sdk_library, which should make the future
transition to this build rule easier.

Bug: 149293194
Test: lunch sdk_phone_armv7 && m sdk dist && find out/dist/apistubs
Change-Id: I076f30931bf2524d57703873cd7de25b3f23b457
Merged-In: I076f30931bf2524d57703873cd7de25b3f23b457
(cherry picked from commit d7f1fabc94)
2020-04-30 20:56:11 +01:00
Anton Hansson
a8f2e3ead5 Fix tethering module lib stub default
It was using the systemapi stub defaults, but should be using the
module_lib default.

Bug: 144149403
Test: m
Change-Id: Iaab154d9d71900284d92d518a086fc1227c00d5c
Merged-In: Iaab154d9d71900284d92d518a086fc1227c00d5c
(cherry picked from commit dc8e0fc1a1)
2020-04-30 17:05:01 +01:00
Jiyong Park
de93db8570 Mark some aidl_interface modules as unstable
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 152655547
Test: m
Merged-In: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
(cherry picked from commit 6c9c10c91e)
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
2020-04-20 07:44:52 +00:00
Anton Hansson
cdc8658403 Feed framework-tethering-stubs the src filegroup
This filegroups strips the "src" prefix away from the src path
for the filter_packages check in droiddoc.

Bug: 149293194
Test: m update-api (no change)
Change-Id: I5b9ffa211be9c1a7dd8f63d5e7ba2a825d0d3190
Merged-In: I5b9ffa211be9c1a7dd8f63d5e7ba2a825d0d3190
2020-03-31 09:56:55 +01:00
Anton Hansson
5fa1704f04 Make framework-tethering stubs use the new defaults
Makes it convenient to change all stubs from a central place.

Bug: 149293194
Test: m framework-tethering-stubs{public,system,module_libs_}api
Exempt-From-Owner-Approval: Approved internally
Change-Id: I330133824e78b3a8927e3d3ffbbd729bcdcb8822
Merged-In: I330133824e78b3a8927e3d3ffbbd729bcdcb8822
(cherry picked from commit 7939cb0a4a)
2020-03-26 12:15:01 +00:00
Vladimir Marko
eae43d4fcc Add permitted_packages to framework-tethering.
(cherry picked from commit 577707e09b)

Test: m out/soong/.intermediates/frameworks/base/packages/Tethering/common/TetheringLib/framework-tethering/android_common/package-check.stamp
Bug: 151314205
Merged-In: I248c36b2cf2f5776978c4fd2322d3b73ade309ff
Change-Id: Iddeeb6648f1ed2a31eebf04eb465ea675fb610ae
2020-03-25 14:04:00 +00:00