Commit Graph

167 Commits

Author SHA1 Message Date
markchien
217d7b01f8 Pass entitlement configuration to Settings for entitlement check
Tethering resource configuration is move from framwork to tethering
module. Since tethering resource would not be accessible from outside
of tethering module, EntitlementManager would tell Settings the
entitlement configuration via intent extra when run entitlement check.

Bug: 146918263
Test: atest TetheringTests
Change-Id: I6f23553bb1da5f0b767f920b32a86fafb9e00b9e
2020-06-11 13:53:27 +08: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
cfbb7c8157 Merge "Switch to standard naming scheme" into rvc-dev am: f94d682a9b am: 23926cc12a
Original change: undetermined

Change-Id: I881cccf3f96b39731208b48b6ff615c21183991b
2020-06-02 12:11:25 +00:00
Paul Duffin
672fa36bdd Merge "Switch to standard naming scheme" into rvc-dev am: f94d682a9b
Original change: undetermined

Change-Id: I57cffc68409c2e9b795b0c8732fecc9bbf33e113
2020-06-02 11:58:50 +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
6812c1b1ee 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: I3b78fcbcacc3df787e171d6eedeef1e51b087615
Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
(cherry picked from 8b864fb45ce79051437f13c2a19510718ea3b7aa)
2020-06-02 06:53:53 +00:00
Paul Duffin
a94baff0f4 Merge "Switch to standard naming scheme" 2020-06-01 21:58:15 +00:00
Paul Duffin
e7418a6175 Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5 am: 408914d348 am: c610401918 am: 005c6cad80
Change-Id: Ia4c804083f6b0db47585aa6491a8c36c4c8ff0aa
2020-05-31 15:11:17 +00:00
Paul Duffin
c610401918 Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5 am: 408914d348
Change-Id: Ib58ede3af2e2c12b7c5a4fdfde3f74a595e229b4
2020-05-31 14:45:39 +00:00
Paul Duffin
4a93d5ea3a Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5
Change-Id: I385b2d13d96fd34c8fe031994d56de3763fe3917
2020-05-31 14:25:37 +00:00
Paul Duffin
adac7d2cc3 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: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
2020-05-31 14:19:32 +01:00
Paul Duffin
a17cf677b5 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
2020-05-31 13:45:51 +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
6216a6904e Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f
Change-Id: Icf8a3b8eed7e85065d54f2f48d8cb6f05974de00
2020-05-28 13:09:48 +00:00
Paul Duffin
cbac8e0b63 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 Tethering InProcessTethering checkapi
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
2020-05-28 12:50:04 +01:00
Paul Duffin
e0b78577f7 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 Tethering InProcessTethering checkapi
Bug: 155164730
Change-Id: If5c115f482751f9f4b5f047e9e401a18e36799ef
2020-05-28 08:21:53 +01:00
Paul Duffin
b016744a1a 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
Merged-In: I4583539d11ba69320aa5a0dfcfee072c81affac2
Change-Id: I4583539d11ba69320aa5a0dfcfee072c81affac2
(cherry picked from commit 267dd95c3e93f75c42c3f4e5cf576829b528f6c2)
2020-05-13 13:57:12 +01:00
Paul Duffin
aacd7ec159 Merge "Cleanup packages/Tethering/common/TetheringLib" am: 85bdee7daa am: 9488e5f521 am: e42763eb6f am: 6fb171fc7f am: 0fffda7f4f
Change-Id: I8b19ff825442e1c9814290d871236bce4b10d9fe
2020-05-13 11:58:45 +00:00
Paul Duffin
e42763eb6f Merge "Cleanup packages/Tethering/common/TetheringLib" am: 85bdee7daa am: 9488e5f521
Change-Id: I0c19abcb8c8a909585b14e4213c59c1cef34be13
2020-05-13 11:13:26 +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
5f9f31c18b 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
Merged-In: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
(cherry picked from commit 33aa294e96f13906f596e427b96652fe80cf199b)
2020-05-13 16:18:51 +09:00
Jooyung Han
aea37a492d Merge "Set min_sdk_version for updatable mainline modules" am: 50f4887299 am: e25536866e am: 669772eb76 am: 5f2f34a042 am: a0428f67ae
Change-Id: I1c8bde4023857acd1b9ab95bfa6fe4e445e9b884
2020-05-08 10:44:56 +00:00
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
acc558a279 Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee am: b79d07bb0e am: 05b28e03c5 am: 6e56ed82f8
Change-Id: I2fed16e195880a4ecb03dacf1aa3787d2f7794d3
2020-05-06 10:24:21 +00:00
Anton Hansson
05b28e03c5 Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee am: b79d07bb0e
Change-Id: I919965aceb625ccdcfea6d50d408462452801dbf
2020-05-06 09:44:26 +00:00
Anton Hansson
834ffa7f52 Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee
Change-Id: Iceaddc7ad960239c33f97d17616b0ba984e0a5ea
2020-05-06 09:30:20 +00: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
0ada065772 Merge "Rename module dist files" into rvc-dev am: 7e0949732f am: 5dadd627be am: 52ba1b7f85 am: 5413c99cc5
Change-Id: Icfe69c6ac573de1f78ac97eb50ea1ce61a83d0a5
2020-05-01 09:13:25 +00:00
Anton Hansson
d2ec5841fb Merge "Fix tethering module lib stub default" 2020-05-01 08:58:26 +00:00
Anton Hansson
52ba1b7f85 Merge "Rename module dist files" into rvc-dev am: 7e0949732f am: 5dadd627be
Change-Id: I26692b3902bd9dfe97196acd11bd6ddb73b8f16e
2020-05-01 08:48:42 +00:00
Anton Hansson
b84b93b629 Merge "Rename module dist files" into rvc-dev am: 7e0949732f
Change-Id: If24bfcc6dbe243d61863a5561b01f44bdadb439e
2020-05-01 08:38:54 +00:00
Anton Hansson
c8e9da6d4a Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313 am: 03a93bff6d am: 605b8564b7 am: 7439d68b74
Change-Id: Id47b937bb7ae864a150720c5c5757b72c300baaf
2020-04-30 20:26:01 +00:00
Anton Hansson
605b8564b7 Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313 am: 03a93bff6d
Change-Id: I0c9a7df0d9c5fd060f27316a12f74c228d797c93
2020-04-30 20:07:58 +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
261d6735ce Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313
Change-Id: I9366346c2e9735b3dcbe0e54fa886e65d86106c0
2020-04-30 19:53:17 +00: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
Philip P. Moltmann
8d5c1d7efb Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: 83ba9531d7 am: 319db1af8b
Change-Id: I099944752fc3006c1e98750dd46dbebf5e50789f
2020-04-22 15:19:14 +00:00
Philip P. Moltmann
f4c703461d Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" 2020-04-22 14:57:49 +00:00
Philip P. Moltmann
b94bb42096 Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests
Bug: 136595429
Change-Id: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Exempt-From-Owner-Approval: Merge from AOSP
2020-04-21 21:46:34 +00:00
Philip P. Moltmann
64343b0b8d Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests TetheringTests:TetheringServiceTest
Bug: 136595429
Merged-In: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Change-Id: Ic3d937e7bb5141798234ed5b2852c1f768e97495
2020-04-20 18:00:03 -07: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
Treehugger Robot
5da1070d8f Assign specific client address to dhcp server
Bug: 141256482
Test: manual
      atest TetheringTests

Merged-In: Ief76c98c843ba5420224cbf0f34464f366c891b7
Change-Id: Ief76c98c843ba5420224cbf0f34464f366c891b7
2020-04-10 10:03:20 +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
fb38e85a50 Merge "Make framework-tethering stubs use the new defaults" 2020-03-30 14:16:02 +00:00
Treehugger Robot
a3fbca5f60 Merge "Assign specific client address to dhcp server" am: 037becbf64 am: 815ab636c3
Change-Id: Ia0e4a913faa5eac5d5ccba837eb7774d59670d27
2020-03-30 04:23:55 +00:00