Commit Graph

241 Commits

Author SHA1 Message Date
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
Treehugger Robot
037becbf64 Merge "Assign specific client address to dhcp server" 2020-03-30 03:38:46 +00: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
3ef31a3ccd Merge "Add permitted_packages to framework-tethering." 2020-03-25 17:09:24 +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
markchien
1d0aebc713 Hide startTethering with type function to module-lib only
Bug: 151918384
Test: m
Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750
Merged-In: Icef8b363aae97dd020d618bcb397f661aa6c4750
2020-03-25 08:07:01 +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
junyulai
a8b377747b Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8
Merged-In: I0158d88e364772f9ac258bd18955edcdad266ad8
(this is a clean cherry-pick from ag/10796412)

Change-Id: I64f1527d79085cc5dfd78c01a6c49c4df87c82e7
2020-03-23 14:14:22 +08:00
junyulai
e3b9708c3a Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8
2020-03-23 12:13:57 +08:00
Anton Hansson
4168cea5e1 Update tethering module api files
Bug: 147768409
Test: m checkapi
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
Change-Id: I3da71661048b1f66522696e9333c2c14a224fe9f
2020-03-20 13:49:34 +00:00
Anton Hansson
4dd8a42cff Merge "Add individual API tracking files for modules" 2020-03-20 12:47:52 +00:00
markchien
b1bfea5367 Hide startTethering with type function to module-lib only
Bug: 151918384
Test: m
Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750
2020-03-19 21:04:04 +08:00
markchien
8146b56d01 TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 19:32:50 +08:00
Anton Hansson
65d1e30c0f Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api check-api
Exempt-From-Owner-Approval: approved internally
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit e7c52c7e3f)
2020-03-19 08:51:11 +00:00
markchien
f1332573bb TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 16:32:37 +08:00
Automerger Merge Worker
9462a3c9f0 Support static address configuration
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.

When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
  -startProvisioningIfNeeded just posts a message to the handler thread.
  -enableTetheringInternal doesn't do anything synchronously, it just
  asks the downstreams to get their interfaces ready and waits for
  callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.

Bug: 141256482
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest

Change-Id: I2b2dd965a673e6f1626738d41b5d443f0f9fbd0e
Merged-In: I0399917e7cefa1547d617e688225544c4fc1a231
(cherry picked from commit 5d6723e24e21154bef3967585a8adc069e007f49)
2020-03-19 12:39:46 +08:00
markchien
245352ed07 Assign specific client address to dhcp server
Bug: 141256482
Test: manual
      atest TetheringTests

Change-Id: Ief76c98c843ba5420224cbf0f34464f366c891b7
2020-03-19 01:47:25 +08:00
Anton Hansson
49bdf5615f Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
2020-03-18 11:03:12 +00:00
Mark Chien
6d175120a0 Merge "Support static address configuration" 2020-03-17 13:26:09 +00:00
markchien
f053e4b6f5 Support static address configuration
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.

When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
  -startProvisioningIfNeeded just posts a message to the handler thread.
  -enableTetheringInternal doesn't do anything synchronously, it just
  asks the downstreams to get their interfaces ready and waits for
  callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.

Bug: 141256482
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest

Change-Id: I0399917e7cefa1547d617e688225544c4fc1a231
2020-03-17 00:11:16 +08: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
Automerger Merge Worker
0010ca0c70 Cleanup the TetheredClients API
Add comments to getters as requested in API review, and remove the
expirationTime private field that was planned to be replaced with
LinkAddress expiration.

Test: atest TetheringTests
Fixes: 150878126
Change-Id: Iecf65859cdeeaac2fa7b817b4f505c510424ac89
Merged-In: Iecf65859cdeeaac2fa7b817b4f505c510424ac89
(cherry picked from commit 594d0eae38c13e2bb03de0b3ae1f8781991c321e)
2020-03-16 10:11:29 +00:00
Automerger Merge Worker
943fb5b686 Change TetheringConstants class to final
Bug: 151322331
Test: m doc-comment-check-docs

Change-Id: Ieca36d81b7799988b8dbb9c0d22de690136303ab
Merged-In: Ia02be3d1d91a08ae4a56b25560ed448c96a693db
(cherry picked from commit 5e2740b24658ba340a6b47a46c89cfd642afe394)
2020-03-16 07:43:05 +00:00
Mark Chien
0c5f387efe Merge "Change TetheringConstants class to final" 2020-03-16 05:25:40 +00:00