41 Commits

Author SHA1 Message Date
Anton Hansson
59292377d4 Revert "Add new class with APIs of varying visibility"
This reverts commit 7d6704e4b07283b893b8ae07f7e92ad46a7f4187.

The experiment has concluded, and we don't want these APIs in
the finalized R api.

Also update the newly-arrived module txt files.

Bug: 149108482
Test: m checkapi
Change-Id: I965111b9a8ad2d3e5849bd9dfdae9c00cc471ce6
2020-03-27 15:36:06 +00:00
junyulai
25d643991f 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
markchien
62a625df98 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
37a22754c8 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
Automerger Merge Worker
54a85999d6 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
0bba033e34 Merge "Send offload status changed callback" into rvc-dev 2020-03-09 09:50:20 +00:00
Automerger Merge Worker
c22ab7b368 Send offload status changed callback
The callback would be fired when offload started, stopped, or failed.
If offload is not supported, "failed" callback would be fired when user
enable tethering. Enabling multiple tethering would not have multiple
offload status callbacks because offload should already be started or
failed.

Bug: 130596697
Test: -build, flash, boot
      -atest TetheringTests
      -ON/OFF hotspotf

Change-Id: Ifb16dcedc8081833fa95a39596fe5cdc309ededd
Merged-In: Ifb16dcedc8081833fa95a39596fe5cdc309ededd
Merged-In: Ia0398601144b0e5f61dc0c5771eacf13e7cfbb59
(cherry picked from commit cd266076bed28459234c5d74ad373867944df116)
2020-03-09 07:59:29 +00:00
Automerger Merge Worker
fcf74d1d8d Tethering: add isTetheringSupported with callerPkg parameter
BT tethering need to know whether tethering is supported for its caller
that call isTetheringSupported in binder thread under BT's process.
Current isTetheringSupported API is getting callerPkg inside
TetheringManager that would be BT's package name for bt tethering case.
Provide isTetheringSupported(String callerPkg) for caller to pass its
caller's package name if the use case is under binder IPC.

Bug: 146915889
Test: -boot, flash, boot

Change-Id: I01646fe045772c57b4e39a5e129531f8a2cea89f
Merged-In: I01646fe045772c57b4e39a5e129531f8a2cea89f
Merged-In: I2a35e1b6851e7a799c343be0dd60da23514768ba
(cherry picked from commit e09a92fabe7956692f34e94c198d9763bf76e53d)
2020-03-09 02:42:28 +00:00
Automerger Merge Worker
b96b334d43 Merge "Stop exposing constructor of TetheringConstants" am: 5dd58dac7e am: f2472fa7aa am: 051bd7f721
Change-Id: If4cf11820b0d712584e7ee393c26c7c359d7952f
2020-02-20 13:27:19 +00:00
markchien
d8cfb6ecc7 Stop exposing constructor of TetheringConstants
Fully-static utility classes must not have constructor.

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

Change-Id: I18e1129ef8717211d667ccd3b4110169dd7905b4
2020-02-20 16:11:35 +08:00
markchien
8cf2a5588b 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
TreeHugger Robot
98a201dcd9 Merge "Finalize @SystemApi annotation for StatsFrameworkInitializer (retry)" 2020-02-12 17:36:49 +00:00
Anton Hansson
7f94169e56 Add @Nullable and @NonNull to module API
These two annotations are already in the public/system stubs,
but are re-written to be package private instead of public. This
makes them inaccessible to libs building against these stubs.

When setting sdk_version:<X>, the stubs of X will appear before any
other libraries on the classpath. This also makes it impossible for
modules to add Nullable annotations of their own when setting sdk_version.

Exposing these annotations as public in the module stubs makes it
possible for modules using these annotation to specify an sdk_version.

Bug: 146758669
Test: m
Test: downstream CLs using sdk_version:module_current
Change-Id: I71fb766d02f833ed9a1b3a7dbfbc1c8118882b30
Merged-In: I71fb766d02f833ed9a1b3a7dbfbc1c8118882b30
(cherry picked from commit c8fc90a0c2b04a5f6f5e6006155ca1e9a09db4e3)
2020-02-12 17:12:06 +00:00
Makoto Onuki
553df30582 Finalize @SystemApi annotation for StatsFrameworkInitializer (retry)
Change-Id: I3c8bce84fbdbe4e65ec430eb5046a1a46cc6fbfb
Fix: 148225705
Test: build / treehugger
2020-02-11 16:26:18 -08:00
Makoto Onuki
8f9c37006f Revert "Finalize @SystemApi annotation for StatsFrameworkInitializer"
This reverts commit d74a3b3ca753b3308ac9ebb56b253c5a658d789d.

Reason for revert: Broke build(?)

Bug: 148225705


Change-Id: I46e4aec3385d178234d3ea609c190b14aca5c8a1
2020-02-10 17:24:09 +00:00
Anton Hansson
ca03ef4de6 Add @Nullable and @NonNull to module API
These two annotations are already in the public/system stubs,
but are re-written to be package private instead of public. This
makes them inaccessible to libs building against these stubs.

When setting sdk_version:<X>, the stubs of X will appear before any
other libraries on the classpath. This also makes it impossible for
modules to add Nullable annotations of their own when setting sdk_version.

Exposing these annotations as public in the module stubs makes it
possible for modules using these annotation to specify an sdk_version.

Bug: 146758669
Test: m
Test: downstream CLs using sdk_version:module_current
Change-Id: I71fb766d02f833ed9a1b3a7dbfbc1c8118882b30
2020-02-08 13:11:40 +00:00
Makoto Onuki
d74a3b3ca7 Finalize @SystemApi annotation for StatsFrameworkInitializer
Change-Id: I2a7f8fcecbd12da4d8244fd848dff53ba86d4e31
Fix: 148225705
Test: build / treehugger
2020-02-07 15:59:35 -08:00
Anton Hansson
7d6704e4b0 Add new class with APIs of varying visibility
To be used to verify SDK updatability end-to-end.

Bug: 148945438
Test: run SdkExtensionsVerifier
Change-Id: I92e4082496890a1e809671c36bf016a2c52e12d2
2020-02-07 16:44:26 +00:00
markchien
2c153703e4 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
Neil Fuller
4222b7bec8 Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Merged-In: If022a726a058a90cb5446d220628c76800da8e96
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 21:21:34 +00:00
Neil Fuller
567a91279f Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 18:59:23 +00:00
Automerger Merge Worker
0cb8f6af54 Merge "More API council tidy up" am: f4e1ac840c am: 5846bfad68 am: 941751a606
Change-Id: I6d3b688fdd0c3cc8a9f40e3aaff5d1142569ed3a
2020-02-04 12:08:09 +00:00
Neil Fuller
f4e1ac840c Merge "More API council tidy up" 2020-02-04 11:35:11 +00:00
Automerger Merge Worker
b3fc3ce03f Merge "Rename phoneId to slotIndex" am: 4e540a1c59 am: d0045fbffd am: 5b54abfa84
Change-Id: I59bf3ec187cb59d17860b85ad5cead58fc1017c0
2020-02-03 12:28:16 +00:00
Neil Fuller
4e540a1c59 Merge "Rename phoneId to slotIndex" 2020-02-03 11:55:39 +00:00
Neil Fuller
d8da3387c4 Rename phoneId to slotIndex
Rename phoneId to slotIndex. Some of the classes are being put in an API
surface and phoneId is an internal concept. slotIndex is its replacement
and should be identical.

Bug: 148403082
Test: treehugger build only
Change-Id: Iecbf347c9d13877f2e3f74b6daa22661bade257a
2020-01-31 17:06:33 +00:00
Automerger Merge Worker
36a7559516 Merge "Tidy up module-lib API and locks" am: 98ab83c37d am: 779b5c6ee0 am: 1fc568f878
Change-Id: I4c7039b54aa185447108622b0608689ddf45bc2f
2020-01-29 14:33:36 +00:00
Neil Fuller
98ab83c37d Merge "Tidy up module-lib API and locks" 2020-01-29 14:10:18 +00:00
Automerger Merge Worker
3daccde526 Merge "Extract TimeDetector/TimeZoneDetector interfaces" am: 17ac92f460 am: a9e81b53a9 am: f751b9ec06
Change-Id: Ic029c262cc34f8c0232cda3558a57f2fcaceb797
2020-01-29 10:38:45 +00:00
Neil Fuller
45a0c412e9 More API council tidy up
Behavioral change to remove the possibility of null from getTimeZone().
The rest are naming and documentation improvements.

Bug: 148450671
Test: treehugger
Change-Id: I412046ce343e76463bf27d8dc5fea46adfd85b0d
2020-01-28 18:11:32 +00:00
Neil Fuller
6a0664d702 Tidy up module-lib API and locks
Fixing various nits.

Test: treehugger
Change-Id: I636d1b9ef084be58ea07caa0a04ba70de18a030b
2020-01-28 15:24:15 +00:00
Neil Fuller
ad6eb2b2d5 Extract TimeDetector/TimeZoneDetector interfaces
Extract TimeDetector/TimeZoneDetectors interfaces due to API council
feedback.

Bug: 148402378
Test: treehugger
Change-Id: I22b12c8c5cc1cca9e3a788ef76c38b77198a3bce
2020-01-28 12:18:46 +00:00
Automerger Merge Worker
ac3c3256aa Merge "Add new module-lib APIs for MTS testing" am: b9e3e9e34c am: 876c59823e am: 8c4c7d0039
Change-Id: I37488a81d4066d240bdc0a22dbd3c72cafd55749
2020-01-22 15:35:36 +00:00
Neil Fuller
2551c033df Add new module-lib APIs for MTS testing
Several android.timezone classes have already been exposed for the
telephony module work, so these tests provide coverage for those.
Additional APIs have been exposed for MTS testing, i.e. to provide
greater confidence that the tzdata module data is correct / is
being read correctly.

Also, small changes to existing code to make them consistent with new
classes. Small docs improvements.

Bug: 147884233
Test: see system/timezone change
Change-Id: I047b29f17a41993f859947a6d6c3685896fe4cb6
2020-01-21 17:17:31 +00:00
Meng Wang
aa2ba8e941 Expose logToRadioBuffer as system API
Bug: 144374158
Test: make
Change-Id: I2d25a5844733ed7f1e0bb3f66d39f746f0f7acd8
2020-01-16 12:02:33 -08:00
Neil Fuller
f7346ecb1f System API proxies for the telephony module
Introduce classes that exist to give the telephony module something
stable to call for in-process utilities: libcore cannot directly expose
System APIs today and the package names are internal. The APIs are the
subset of internal libcore.timezone APIs used by telephony code
currently.

Bug: 139091367
Test: See associated frameworks/opt/telephony commit
Merged-In: I6109aef77171346ecb103c190526b7b9b81012b2
Change-Id: I6109aef77171346ecb103c190526b7b9b81012b2
(cherry picked from commit 944aeffa85ab0a94e20a4edc7293fe70f904bddd)
2020-01-15 09:48:36 +00:00
Neil Fuller
efe063e5dc Expose time / time zone system apis for telephony
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.

There are also small improvements for @Nullable.

Bug: 147012511
Test: build only
Merged-In: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
(cherry picked from commit 2be7ac4531d641910c34037b4bf63624dbf593e3)
2020-01-14 19:30:40 +00:00
Neil Fuller
944aeffa85 System API proxies for the telephony module
Introduce classes that exist to give the telephony module something
stable to call for in-process utilities: libcore cannot directly expose
System APIs today and the package names are internal. The APIs are the
subset of internal libcore.timezone APIs used by telephony code
currently.

Bug: 139091367
Test: See associated frameworks/opt/telephony commit
Change-Id: I6109aef77171346ecb103c190526b7b9b81012b2
2020-01-14 13:34:29 +00:00
Neil Fuller
2be7ac4531 Expose time / time zone system apis for telephony
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.

There are also small improvements for @Nullable.

Bug: 147012511
Test: build only
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
2020-01-13 13:56:54 +00:00
Jiyong Park
2e6cdcc524 Add API stubs for module APIs
The following two stub libraries are added:

- android_module_app_stubs_current: @SystemApis that are available for
modules implemented as apps. @SystemApis with client=PRIVILEGED_APPS
and client=MODULE_APPS are included here.

- android_module_lib_stubs_current: @SystemApis that are available for
modules implemented as bootclasspath jars. @SystemApis with
client=PRIVILEGED_APPS, MODULE_APPS, and MODULE_LIBRARIES are all
included here.

For now, the compatibility check against the last release API is not
done, but this is not a problem because this is the first time these
APIs are released.

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

Bug: 139391334
Bug: 140202860
Bug: 146727827
Test: m

Merged-In: I0254a5f7751c58029fa7a8d5c342b731a7deb69a
Change-Id: I0254a5f7751c58029fa7a8d5c342b731a7deb69a
(cherry picked from commit e309516406a1ec2ce095713cc3adfacdedbcbefe)
2020-01-13 21:42:24 +09:00
Jiyong Park
e309516406 Add API stubs for module APIs
The following two stub libraries are added:

- android_module_app_stubs_current: @SystemApis that are available for
modules implemented as apps. @SystemApis with client=PRIVILEGED_APPS
and client=MODULE_APPS are included here.

- android_module_lib_stubs_current: @SystemApis that are available for
modules implemented as bootclasspath jars. @SystemApis with
client=PRIVILEGED_APPS, MODULE_APPS, and MODULE_LIBRARIES are all
included here.

For now, the compatibility check against the last release API is not
done, but this is not a problem because this is the first time these
APIs are released.

Bug: 139391334
Bug: 140202860
Bug: 146727827
Test: m

Change-Id: I0254a5f7751c58029fa7a8d5c342b731a7deb69a
2020-01-13 10:13:06 +09:00