Commit Graph

48 Commits

Author SHA1 Message Date
Jooyung Han
669772eb76 Merge "Set min_sdk_version for updatable mainline modules" am: 50f4887299 am: e25536866e
Change-Id: I3152d9e94e0a1fce02ecb16b3ec0cea92c856ebe
2020-05-08 09:40:48 +00:00
Jooyung Han
50f4887299 Merge "Set min_sdk_version for updatable mainline modules" 2020-05-08 08:45:49 +00:00
Mark Chien
cca6aad882 Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev 2020-05-07 15:15:59 +00:00
Jeongik Cha
1aba7987de Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Original-Change: https://android-review.googlesource.com/1301313
Merged-In: I507f40866d04db5ed3361831e01eaa4dfaf20bed
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-07 11:48:44 +00: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
markchien
9548c8580c Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 14:21:49 +08:00
Jeongik Cha
0630f383af Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-04 08:11:26 +00:00
Amit Mahajan
ee27d55295 DO NOT MERGE Remove references of telephony-stubs.
Since it's not used for now.

Test: TH
Bug: 153304048
Merged-in: I1812818c3d49463c3840a98212bbab58a110359a
Change-Id: I1812818c3d49463c3840a98212bbab58a110359a
2020-04-15 17:55:52 -07:00
Luke Huang
d20078112b Use the lastest frozen netd_aidl_interface in framework
Bug: 140541991
Test: build
Merged-In: I984969e09f8d5196945a7412c51bd8880223ad9e
Change-Id: I984969e09f8d5196945a7412c51bd8880223ad9e
2020-04-09 16:20:44 +00:00
Luke Huang
6ca4ec97d2 Use the lastest frozen netd_aidl_interface in framework
Bug: 140541991
Test: build
Change-Id: I984969e09f8d5196945a7412c51bd8880223ad9e
2020-04-07 08:35:42 +00:00
Anton Hansson
bbe4af1f08 Build tethering against the module SDK
Link against the stubs of other modules and the implementation
of the tethering module jar.

Bug: 146757305
Test: m Tethering
Change-Id: I7c93b60654e21a4a27d21cbf0c2a6cb21f813529
Merged-In: I7c93b60654e21a4a27d21cbf0c2a6cb21f813529
(cherry picked from commit aaeaa195b8)
2020-03-23 10:29:11 +00:00
Anton Hansson
aaeaa195b8 Build tethering against the module SDK
Link against the stubs of other modules and the implementation
of the tethering module jar.

Bug: 146757305
Test: m Tethering
Change-Id: I7c93b60654e21a4a27d21cbf0c2a6cb21f813529
2020-03-20 15:31:02 +00:00
Jooyung Han
81675e2d94 tethering: transitive deps from jni_libs
The build system collects transtive deps from jni_libs for APKs.
No need to list them explicitly in android_app definition.

Bug: 146992436
Test: m com.android.tethering
      deapexer extract com.android.tethering.apex apex
      unzip apex/priv-app/Tethering/Tethering.apk -u apk
      ls apk/lib/arm64-v8a

Merged-In: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
Change-Id: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
(cherry picked from commit 9618b66f285ad5baa50b004b788d60272958a04d)
2020-02-26 14:14:17 +09:00
Jooyung Han
cfea439ba4 tethering: transitive deps from jni_libs
The build system collects transtive deps from jni_libs for APKs.
No need to list them explicitly in android_app definition.

Bug: 146992436
Test: m com.android.tethering
      deapexer extract com.android.tethering.apex apex
      unzip apex/priv-app/Tethering/Tethering.apk -u apk
      ls apk/lib/arm64-v8a

Change-Id: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
2020-02-25 17:35:18 +09:00
Colin Cross
131380ff26 Remove liblog from Tethering jni_libs
Tethering's JNI libraries use the NDK version of liblog, it should
not package the platform version of liblog into the APK.

Bug: 149591340
Test: m checkbuild
Change-Id: If208c1078d2755907f57d7853a5c545bf12458c2
2020-02-21 14:49:40 -08:00
Remi NGUYEN VAN
b9379a518c Add tethering client callbacks
The callbacks are fired when the list of connected clients or their IP
addresses / hostname change.

Test: flashed, connected 2 devices, verified callbacks
Test: atest TetheringTests
Bug: 135411507
Change-Id: I96291038cf7b39a67547a5f74fcd7cbedc1ca002
Merged-In: I96291038cf7b39a67547a5f74fcd7cbedc1ca002
2020-02-19 17:05:00 +08:00
Remi NGUYEN VAN
293d351b7e Fix usage of annotations in TetheringLib
Annotations such as @SystemApi cannot be jarjared to a different
package, as the members would not match the system API declarations.

Instead, only build against the annotations from
framework-annotations-lib, but do not include them as classes in the
output jar; annotations are not required to be available to the
classloader at runtime.

Test: builds, boots, tethering working
Bug: 147812912
Fixes: 148609988
Change-Id: I1fae97a1c1e0ba07fa3e2d64cde7650cd26d0acd
Merged-In: I1fae97a1c1e0ba07fa3e2d64cde7650cd26d0acd
2020-02-19 16:32:26 +08:00
Remi NGUYEN VAN
c8871c1b66 Add tethering client callbacks
The callbacks are fired when the list of connected clients or their IP
addresses / hostname change.

Test: flashed, connected 2 devices, verified callbacks
Test: atest TetheringTests
Bug: 135411507
Change-Id: I96291038cf7b39a67547a5f74fcd7cbedc1ca002
2020-02-18 13:32:16 +08:00
Mark Chien
88f04a19df Merge "Fix usage of annotations in TetheringLib" 2020-02-17 11:00:55 +00:00
Remi NGUYEN VAN
63dc279dfc Fix usage of annotations in TetheringLib
Annotations such as @SystemApi cannot be jarjared to a different
package, as the members would not match the system API declarations.

Instead, only build against the annotations from
framework-annotations-lib, but do not include them as classes in the
output jar; annotations are not required to be available to the
classloader at runtime.

Test: builds, boots, tethering working
Bug: 147812912
Fixes: 148609988
Change-Id: I1fae97a1c1e0ba07fa3e2d64cde7650cd26d0acd
2020-02-12 03:44:16 +00:00
markchien
547e168540 Move offload config hidl usage from native to java
TetheringUtil JNI is too big that it statically linking hidl and its
dependency library. To remove these static libraries, calling hidl in java
directly instead of using JNI.

Bug: 148984662
Test: -build, flash, boot
      -manually ON/OFF tethering

Change-Id: Id5a9759eb453fddaf0c3b7a31da17224e35e963e
2020-02-10 15:25:19 +08:00
Steven Moreland
1d89dfc93e rm libbinderthreadstate
This library is empty, and its functionality has moved
into libbinder/libhwbinder.

Bug: 148692216
Test: N/A
Change-Id: I3ee973cef68281cb57b4912b4b66c798b5d9d715
2020-02-06 13:23:47 -08:00
markchien
9574f5e1c8 Tethering: build tethering as unbundled APP
Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Merged-In: I09117228c193137f6359fdcfced38352b8a38f57
Change-Id: I09117228c193137f6359fdcfced38352b8a38f57
(clean cherry-pick)
2020-01-30 11:50:01 +09:00
markchien
75fc6ab629 Tethering: Fix hidden API selectBestRoute
Bug: 143925787
Test: -build, flash, boot
      -ON/OFF hotspot
      -atest TetheringTests

Merged-In: I824a05fac8b606123667d20ab9b1f7de905e4088
Change-Id: I824a05fac8b606123667d20ab9b1f7de905e4088
(clean cherry-pick)
2020-01-30 11:49:44 +09:00
Automerger Merge Worker
299bb8f7c6 Merge "add java_api_finder plugin to tethering module" am: cdf60baad8 am: 1d97c995f2 am: a277a46187
Change-Id: Ic00cb4f98e0d74d224de001f436928c8032f920b
2020-01-17 21:59:08 +00:00
markchien
84a9282ecd add java_api_finder plugin to tethering module
This is used to generate java APIs used by tethering module

Bug: 145490751
Test:  m com.android.tethering RUN_ERROR_PRONE=true

Change-Id: I97c26e3dcdf4f4c5017f1df582a16335c613f8dd
2020-01-16 13:07:36 +08:00
markchien
51706aae8b Tethering: build tethering as unbundled APP
Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I09117228c193137f6359fdcfced38352b8a38f57
2020-01-15 11:55:26 +00:00
markchien
78c1bbcf14 Tethering: Fix hidden API selectBestRoute
Bug: 143925787
Test: -build, flash, boot
      -ON/OFF hotspot
      -atest TetheringTests

Change-Id: I824a05fac8b606123667d20ab9b1f7de905e4088
2020-01-15 11:55:06 +00:00
Treehugger Robot
5e9d0685dc Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 13:05:17 +00:00
Jiyong Park
1eb8933d3e Platform shouldn't directly link to jars in APEXes
The non-updatable part of the platform shouldn't directly link to the
boot jars in APEXes. Ensure this by

1) setting the visibility property for the boot jars so that they are
not visible to non-APEX modules and
2) setting the apex_available property so that the boot jars are only
built for the corresponding APEXes, but not for others.

Bug: b/146167933
Bug: b/146218515
Bug: b/147200698
Test: m
Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6
Merged-In: I251fabd773bc31f46d572d143c72dd9162f3f0a6
2020-01-10 15:15:24 +00:00
Anton Hansson
c858f7cb0e Merge "Platform shouldn't directly link to jars in APEXes" 2020-01-10 15:12:17 +00:00
Artur Satayev
4784fb0f7d Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
Merged-In: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-09 15:08:18 +00:00
Jiyong Park
489e09abae Platform shouldn't directly link to jars in APEXes
The non-updatable part of the platform shouldn't directly link to the
boot jars in APEXes. Ensure this by

1) setting the visibility property for the boot jars so that they are
not visible to non-APEX modules and
2) setting the apex_available property so that the boot jars are only
built for the corresponding APEXes, but not for others.

Bug: b/146167933
Bug: b/146218515
Bug: b/147200698
Test: m
Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6
2020-01-09 17:52:55 +09:00
markchien
12c5bb8103 [Tether09] Use INetd to call netd directly
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
Merged-In: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
2020-01-08 12:33:58 +00:00
markchien
dac2826929 [Tether09] Use INetd to call netd directly
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
2020-01-08 20:07:04 +08:00
Artur Satayev
2e1ad6ef00 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-07 13:29:50 +00:00
markchien
f87ebdcbb4 Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -Off/On hotspot with ipv6 upstream

Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800
2020-01-07 07:42:13 +00:00
markchien
9d3538260b [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
Artur Satayev
2b6d27a838 Add new UnsupportedAppUsage annotation as lib dependency.
Bug: 145132366
Test: m
Change-Id: Ibb7f8424186149365354a96249c06c9fccde66bd
Merged-In: Ibb7f8424186149365354a96249c06c9fccde66bd
2019-12-11 19:44:16 +00:00
markchien
ee6ad37837 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
markchien
810aa68d27 [Tether07] Clean up build rule for libtetheroffloadjni
- Statically include android.hardware.tetheroffload.config@1.0,
  libcutils and their dependency library.
- Use shared-lib if there is NDK or NDK-compliant version
- Remove android.hardware.tetheroffload.control-V1.0-java from
  service.core because it is already statically built in tethering apk

Bug: 143195885
Test: -build, flash, boot
Change-Id: Ic082045bc04d3989f7f095c7a499bc0d943e4031
Merged-In: Ic082045bc04d3989f7f095c7a499bc0d943e4031
2019-11-30 09:57:36 +00:00
Remi NGUYEN VAN
88998f4fb4 Move shared packages to NetworkStack project
Both were already statically linked both in the NetworkStack module and
the framework, so this change only reorganizes the file locations.

It makes more sense to have the library files in the NetworkStack module
folder, as changes to these files will be released with the same cadence
as the module, not the framework.

Bug: 139106271
Test: built, flashed, WiFi working
Change-Id: Ifaa882b53d1084ef32db6b27d35b56eb226c468f
2019-11-20 17:01:25 +09:00
markchien
6aa388904e [Tether06] Migrate tether offload controller into module
The tether offload JNI library in this patch still have many dependencies
with internal libraries. Will have follow up changes to cut the
dependencies to let it be a unbundled library.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: Iacf8e0b94135e35672de3ee77c474ee39a00c591
2019-11-05 12:49:50 +09:00
markchien
f11a5da0d5 [Tether05] Migrate UpstreamNetworkMonitor into module
Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: Ic1d9deecb66aaba0a4264a57f2e6579ea491ac9b
2019-10-30 12:42:42 +00:00
markchien
dd6177b501 [Tether04] Migrate EntitlementManager into module
Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: Ifdfc6cd95377351c37946a146b60896f07ece59d
Merged-In: Ifdfc6cd95377351c37946a146b60896f07ece59d
2019-10-30 11:06:28 +00:00
markchien
74a4fa9b37 [Tether03] Migrate IpServer into module
Add IpServer which is used to serve ip configuration, dhcp, dns proxy
and nat for downstream interface.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I23652ae0b9509abe7d38da96d523eb22ab00a343
2019-10-24 14:20:52 +08:00
markchien
43e97e01b7 [Tether02] Migrate TetheringConfiguration into module
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4
2019-10-24 14:00:05 +08:00
markchien
932da868a5 [Tether01] Add Tethering App
This is initial patch that don't contain any service for now.

Bug: 136040414
Test: -build, flash, boot
Change-Id: I0b49d7e9c3fcba5af3025163f9cc9eafb0778116
2019-10-24 13:35:41 +08:00