Commit Graph

42 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
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
5b0be161ad Enable api lint and check_last_api for modules
This adds checking of module api compatibility to the individual module
api rules. Until now, this checking has been done via the monolithic
metalava runs which we are aiming to get rid of.

Now is a good time to do this because we can compare them to the just
finalized version 30 API, which we have no diffs with. Baseline the
existing wifi failures that metalava fails to find in the previous API.

Bug: 144149403
Test: m checkapi
Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
2020-05-05 19:17:08 +01: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
d7f1fabc94 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
2020-04-30 17:42:20 +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
Anton Hansson
dc8e0fc1a1 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
2020-04-30 17:02:07 +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
Jiyong Park
6c9c10c91e 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.

Bug: 152655547
Test: m
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
2020-04-13 13:00:47 +09: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
90ae90b6e0 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
2020-03-27 13:46:11 +00: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
Anton Hansson
49c50fb36b Merge "Make framework-tethering stubs use the new defaults" into rvc-dev 2020-03-26 08:39:02 +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
Vladimir Marko
577707e09b Add permitted_packages to framework-tethering.
Test: m out/soong/.intermediates/frameworks/base/packages/Tethering/common/TetheringLib/framework-tethering/android_common/package-check.stamp
Bug: 151314205
Change-Id: I248c36b2cf2f5776978c4fd2322d3b73ade309ff
2020-03-25 11:19:36 +00:00
Anton Hansson
7939cb0a4a 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
Change-Id: I330133824e78b3a8927e3d3ffbbd729bcdcb8822
2020-03-24 19:52:44 +00:00
Anton Hansson
064ed493ce Create all variants of stubs for tethering
Add separate publicapi, systemapi and module_libs stubs for tethering.

Bug: 147768409
Test: m
Test: m framework-tethering-stubs-{public,system,module_libs_}api
Change-Id: I0ed44691b4e7080818442a9d0eb37d874f707195
Merged-In: I0ed44691b4e7080818442a9d0eb37d874f707195
2020-03-16 15:54:19 +00:00
Anton Hansson
6a9c68b619 Create all variants of stubs for tethering
Add separate publicapi, systemapi and module_libs stubs for tethering.

Bug: 147768409
Test: m
Test: m framework-tethering-stubs-{public,system,module_libs_}api
Change-Id: I0ed44691b4e7080818442a9d0eb37d874f707195
2020-03-10 13:13:36 +00:00
Automerger Merge Worker
5650a2bcce Build framework-tethering against module_current
Bug: 146757305
Test: build

Change-Id: Id6051296a02060179666b67fc6ea9092273c1780
Merged-In: Id6051296a02060179666b67fc6ea9092273c1780
Merged-In: Iad504f0e709daadfb4d86205c07f0faf429f5a8f
(cherry picked from commit bb09ceaf09c8aea00a5001ba7079c13a2575e809)
2020-02-25 09:47:25 +00:00
markchien
9e0792f8dc Build framework-tethering against module_current
Test: build
Change-Id: Iad504f0e709daadfb4d86205c07f0faf429f5a8f
2020-02-25 00:22:44 +08:00
Anton Hansson
e814258f09 Stop exposing generated AIDL from Tethering
We don't want new modules exposing stable aidl directly. APIs should
be defined as java @SystemApi. It also seems like nothing actually
depend on these interfaces, except one simple exception.

Bug: 147200698
Test: m
Change-Id: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
2020-02-19 19:03:24 +00:00
Anton Hansson
c82ea10ea2 Stop exposing generated AIDL from Tethering
We don't want new modules exposing stable aidl directly. APIs should
be defined as java @SystemApi. It also seems like nothing actually
depend on these interfaces, except one simple exception.

Bug: 147200698
Test: m
Change-Id: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
Merged-In: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
2020-02-19 16:26:05 +00: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
markchien
b6ad1966c4 Use framework-tethering-stub instead of framework-tethering
The non-updatable part of the platform now is built with
framework-tethering-stub, which is a stub library of
framework-tethering.

Bug: 147200698
Test: m
Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
Merged-In: I97ef83f7f9b4c1376f373713036f5256318f1050
2020-02-19 15:10:44 +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
44fc26d19e Use framework-tethering-stub instead of framework-tethering
The non-updatable part of the platform now is built with
framework-tethering-stub, which is a stub library of
framework-tethering.

Bug: 147200698
Test: m
Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
2020-02-07 00:27:26 +08:00
Remi NGUYEN VAN
3662c1bb6d Add API for tethering clients change
Add a onClientsChanged callback to OnTetheringEventCallback.

The callback will provide information on connected clients combining
at least DHCP leases and WiFi AP information (WiFi AP tethering used).

Test: atest TetheringTests
Bug: 135411507
Change-Id: I7065d081c11bc606d691f76ac8b499dd075d6504
Merged-In: I7065d081c11bc606d691f76ac8b499dd075d6504
2020-01-24 23:39:50 +09:00
markchien
f6761bdd0c Allows the caller to specify configuration by TetheringRequest
This is initial work to allow caller to pass their prefered
configuration to start tethering. Caller may able to specify the
downstream interface ipv4 address with dhcp server disabled for
static IP configuration, or able to exempt entitlement check if
they have permission in follow up CL.

Bug: 141256482
Test: -atest TetheringTest
      -ON/OFF wifi tethering

Change-Id: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3
Merged-In: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3
2020-01-24 23:39:50 +09:00
markchien
249752d8a3 Make TetheringManager to system API
Also deprecated tethering APIs in ConnectivityManager.
Will have follow up change to remove @hide tethering function in
ConnectivityManager.

Bug: 145093446
Bug: 148038547
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ia432057bf9056727c4a0ca97d160a49274d33581
Merged-In: Ia432057bf9056727c4a0ca97d160a49274d33581
2020-01-24 23:39:49 +09:00
Remi NGUYEN VAN
2781c80d28 Add API for tethering clients change
Add a onClientsChanged callback to OnTetheringEventCallback.

The callback will provide information on connected clients combining
at least DHCP leases and WiFi AP information (WiFi AP tethering used).

Test: atest TetheringTests
Bug: 135411507
Change-Id: I7065d081c11bc606d691f76ac8b499dd075d6504
2020-01-24 13:21:59 +09:00
markchien
ecaba161bd Allows the caller to specify configuration by TetheringRequest
This is initial work to allow caller to pass their prefered
configuration to start tethering. Caller may able to specify the
downstream interface ipv4 address with dhcp server disabled for
static IP configuration, or able to exempt entitlement check if
they have permission in follow up CL.

Bug: 141256482
Test: -atest TetheringTest
      -ON/OFF wifi tethering

Change-Id: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3
2020-01-23 23:19:23 +09:00
markchien
5786b6dc9a Make TetheringManager to system API
Also deprecated tethering APIs in ConnectivityManager.
Will have follow up change to remove @hide tethering function in
ConnectivityManager.

Bug: 145093446
Bug: 148038547
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ia432057bf9056727c4a0ca97d160a49274d33581
2020-01-23 00:41:59 +09: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
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
e7ccfca9da [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
2019-12-20 10:31:31 +08: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
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
2c4cc6f514 [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
2019-11-29 07:05:21 +00: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