Commit Graph

1026 Commits

Author SHA1 Message Date
markchien
986750b327 Fix some @hide usage in Tethering
Using alternative way to replace some @hide API.

Bug: 144814072
Test: build, flash, boot
      atest TetheringTests

Change-Id: I1e12d69db1ad91dff553e142e17c6a70808e1639
2020-01-07 21:29:52 +08:00
Treehugger Robot
a6a681768c Merge "Make TokenBucket available to the network stack" 2020-01-07 06:57:46 +00:00
johnson.yeh
095b7a0ce8 Make TokenBucket available to the network stack
Bug: b/144826001

Test: Build Pass: OK
Test: Power ON/OFF: OK
Test: Verify CPU loading improvement: OK

Change-Id: I75d55c3e53fce57e50533dc74af3381a6cee4b96
2019-12-23 19:50:51 +08:00
Jiyong Park
7fb4b183d8 Separate modules for API docs and API stubs
frameworks/base/Android.bp became too big. Modularize it into multiple
files for better readability and extensibility.

droidstubs and java_library modules for API stub libraries are moved to
StubLibraries.bp.

droidstubs and droiddoc modules for API documents are moved to
ApiDocs.bp

Also, added some documentation to explain the roles of the many modules
and how they are related with each other.

Bug: N/A
Test: m

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

Merged-In: I285e8c82078d5bd3ed85b0343db2f6375ce7ffb7
(cherry picked from commit 0d7e86d03c)
Change-Id: I285e8c82078d5bd3ed85b0343db2f6375ce7ffb7
2019-12-22 17:27:49 +09:00
Jiyong Park
5640e1d836 Merge changes I4af73809,Iba6a564a,I3305b71e
* changes:
  Hide com.android.server package with @hide javadoc tag
  Add more enums for the client and process attributes of SystemApi
  SystemApi is parameterized
2019-12-22 08:15:25 +00:00
Mark Chien
2410d67357 Merge "[Tether13] Move TetheringManager into framework" 2019-12-20 13:43:46 +00:00
Jiyong Park
63bf3e4d98 Merge "Add updatable_media_stub to framework" 2019-12-19 18:04:54 +00:00
markchien
6d06f6d51a [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
Jiyong Park
025e56e7de Add updatable_media_stub to framework
The module framework is now a build-only library whose purpose is to
provide hidden APIs from the non-updatable part of the platform and APIs
from the modules. Merging updatable_media_stub to framework, like the
stub libraries from other modules.

Bug: N/A
Test: m

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

Merged-In: Ib627523aab44b7c41d27d70c6ae34cda5dc2e27c
(cherry picked from commit 92721349d9)
Change-Id: Ib627523aab44b7c41d27d70c6ae34cda5dc2e27c
2019-12-19 11:57:07 +09:00
Treehugger Robot
f65e0e3181 Merge "framework is not available to APEXes" 2019-12-18 08:24:49 +00:00
Jiyong Park
79242c2d2d framework is not available to APEXes
The modules 'framework', 'framework-minus-apex', 'framework-all' contain
private symbols that shouldn't be accessible to Mainline modules.
Restrict the access by making the framework modules to be accessible
only to the platform (the non updatable part).

Bug: 145796956
Test: m
Merged-In: I08cb61a67aef88ffe04ef52670144e1cbeff3cf9
Change-Id: I08cb61a67aef88ffe04ef52670144e1cbeff3cf9
2019-12-18 05:45:46 +00:00
Meng Wang
b713828c17 Merge "Statically link util classes into Telephony module." 2019-12-18 00:28:34 +00:00
Jiyong Park
abe6158431 SystemApi is parameterized
We have decided to reuse the existing annotation @SystemApi for all Java
APIs regardless of whether they are for apps or platform internal
modules. This was because introducing new annotation types every time
when we have to create new API surfaces will only increase the confusion
without giving much benefit.

Instead, to differenciate the different API surfaces of @SystemApi, the
annotation type is parameterized. Specifically, it has to axises.

client: specifies the intended client of the API.

process: specifies the process(es) that the API is available.

The default for client and process are priv-apps and all, respectively,
which corresponds to the today's @SystemApi for privileged apps like
GMS.

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

Bug: 140202860
Test: m
Merged-In: I3305b71e22970e80db95f3daf3d7713603c7d68d
(cherry picked from commit 119afc0695)
Change-Id: I3305b71e22970e80db95f3daf3d7713603c7d68d
2019-12-17 17:52:15 +09:00
Meng Wang
8532de9d05 Telephony module will staticlly link IState.java
to avoid hidden API dependency.

Bug: 137202333
Test: make
Merged-In: I5a9ddbebadcf6226402f6e4a37ced168fe07d55b
Change-Id: I5a9ddbebadcf6226402f6e4a37ced168fe07d55b
2019-12-16 12:22:01 -08:00
Anton Hansson
4c1f4c2bc6 Merge "Add stubs and an sdk definition for sdkext" 2019-12-16 16:00:43 +00:00
Meng Wang
9c2a8e0792 Statically link util classes into Telephony module.
- AsyncChannel
- BitwiseInputStream

Bug: 137202333
Test: make
Change-Id: I1714835d3489bc4ed5a4f289dfd9ac9ee6f194e9
2019-12-13 16:45:34 -08:00
Treehugger Robot
2626cc7089 Merge "Do not use hidden API XmlUtils." 2019-12-13 22:14:26 +00:00
Meng Wang
ae112af81d Merge "DumpUtils: Teleophony will use a local copy instead." 2019-12-13 21:34:53 +00:00
Anton Hansson
355000dc7b Add stubs and an sdk definition for sdkext
This defines both publicapi and a systemapi variants, even though
the publicapi is currently empty. Uses the newly defined module
stub_defaults.

Bug: 137191822
Test: m framework
Test: m sdkext-sdk
Change-Id: Idad8902054bef4a08953f4677689506566f146d8
2019-12-13 16:29:05 +00:00
Meng Wang
f8d5cabb71 Do not use SLog in telephony modules
Bug: 137202333
Test: make
Merged-In: Id919a18beda26c5686f77e369db6a3712dd8317b
Change-Id: Id919a18beda26c5686f77e369db6a3712dd8317b
2019-12-12 21:45:23 -08:00
Meng Wang
d4a6c06b52 DumpUtils: Teleophony will use a local copy instead.
Bug: 137202333
Test: make
Merged-In: I3366eab39ac3ac694a5b7a4a275e24130fcd5f96
Change-Id: I3366eab39ac3ac694a5b7a4a275e24130fcd5f96
2019-12-12 18:13:43 -08:00
Meng Wang
56c0ccecfc Do not use hidden API XmlUtils.
Make a local copy instead.

Bug: 137202333
Test: make
Merged-In: Ibcf7b23a8b6628aa482b34f867db57e4cb0dbb8e
Change-Id: Ibcf7b23a8b6628aa482b34f867db57e4cb0dbb8e
2019-12-12 17:16:01 -08:00
Meng Wang
e1df98d2e2 Telephony: do not use hidden API ArrayUtils.
Make a local copy instead.

Bug: 137202333
Test: make
Merged-In: I3218bca2d296c548b9d8427f70df8f7a33d0d449
Change-Id: I3218bca2d296c548b9d8427f70df8f7a33d0d449
2019-12-12 16:52:30 -08:00
Treehugger Robot
01e54d44b9 Merge "Addition of util library" 2019-12-13 00:31:06 +00:00
Michele
68370a8685 Addition of util library
Bug: 137202333
Test: Compilation
Test: Scripts to verify correct usage of rules
Change-Id: I20e48e66d6c429a67d367efc2a73991c3aad825c
Merged-In: I20e48e66d6c429a67d367efc2a73991c3aad825c
2019-12-12 10:19:51 -08:00
Treehugger Robot
938bc05883 Merge "Add new UnsupportedAppUsage annotation as lib dependency." 2019-12-12 12:10:55 +00:00
Artur Satayev
700e08b291 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
Anton Hansson
b52bd1cbbe Expose SdkExtension in the system SDK
Also tweak the javadoc a little bit.

Bug: 137191822
Bug: 143937447
Test: treehugger
Change-Id: Iae1b025685344c2ffe4ed1089850b447c82a6b83
Merged-In: Iae1b025685344c2ffe4ed1089850b447c82a6b83
2019-12-09 17:21:24 +00:00
Jordan Liu
9fd7c05eb9 Merge "Expose some SystemApis and edit framework-cellbroadcast-shared-srcs" 2019-12-07 00:06:23 +00:00
Jordan Liu
bf68dc85a4 Expose some SystemApis and edit framework-cellbroadcast-shared-srcs
The APIs are used in the CellBroadcastService, and the
framework-cellbroadcast-shared-srcs library is also linked there.

Bug: 135956699
Test: manual
Change-Id: I5e71ea1ee1a858c0520c241dc7365733441e0f50
Merged-In: I5e71ea1ee1a858c0520c241dc7365733441e0f50
2019-12-06 11:19:48 -08:00
Songchun Fan
c8b066091e Merge "[incremental] parcelable for incfs file descriptors" 2019-12-05 22:02:49 +00:00
Sarah Chin
226499214c Merge changes from topics "ngran", "update_ngran"
* changes:
  Update NGRAN bands
  Updated AccessNetworkConstants and RadioAccessSpecifier
2019-12-05 21:37:37 +00:00
Songchun Fan
000b5b5bf6 [incremental] parcelable for incfs file descriptors
This parcelable is used to pass incfs fds from vold to system_server.

Test: builds
Change-Id: I7f0af8798d12815fbae404afabf4a88229a705da
Merged-In: Ifc3a43633356951b239486d66ee80d120bc4ab76
2019-12-04 17:42:57 -08:00
Hall Liu
91e1a00846 Merge "telephony-stack util API lib" 2019-12-04 19:22:47 +00:00
Sarah Chin
e138c5e412 Updated AccessNetworkConstants and RadioAccessSpecifier
Bug: 143683654
Test: atest RadioAccessSpecifierTest
Change-Id: I307c8d09483e37d805cbfd17780523040abc9e4b
Merged-In: I307c8d09483e37d805cbfd17780523040abc9e4b
2019-12-03 11:06:58 -08:00
Anton Hansson
0223efdaa1 Merge "Put all updatable sources in one filegroup" 2019-12-02 19:30:36 +00:00
Anton Hansson
b4f3557fde Put all updatable sources in one filegroup
Avoids having to add updatable jars to a bunch of different
lists.

Test: m
Change-Id: Ieb0347a87f5bfc4a6ac8367279b3e97e05bfa6a7
2019-12-02 16:51:50 +00:00
Anton Hansson
4ec07fadef Add SdkExtensions class
It currently just reads a prop that is never set, but that will
be updated separately.

Keep the class @hide for now.

Bug: 137191822
Test: m com.android.sdkext
Change-Id: I1a874bf3d3e34676b5d767c4d03b09337b193cce
2019-12-02 15:32:39 +00:00
Anton Hansson
98460abc89 Add scaffolding for 'sdkext' module
This module will have a java framework part as well as a native
binary. Add directory and hook future java sources into the stub
rules.

Bug: 137191822
Test: m
Change-Id: I5527a055bf935178b88a1b20504b251f18f3d873
2019-12-02 13:56:06 +00:00
Tobias Thierer
8296853914 Android.bp: Add comment about APEX stub dependency for MimeMap.
This addresses a review comment on https://r.android.com/1172924

Test: Treehugger
Change-Id: Ic2106aebf707c9d347f06d5a0dab18614e0ad5a3
2019-11-29 19:42:11 +00:00
Tobias Thierer
17d0c59338 Tweak framework-mime / mimemap dependencies.
This CL addresses an outstanding review comment from
https://r.android.com/1115772 . To be honest, I don't
fully get the semantics of what I've changed, so I've
followed Jiyong's suggestions pretty blindly, except
that I've added the static dependency on mimemap to
framework-minus-apex as opposed to the (non-existing)
frameworks.

Test: Confirmed that the data files are still in framework.jar by
      rebuilding (make installclean && make droid && flashall )
      and then running:
      adb shell su 0 unzip -l /system/framework/framework.jar | grep types
Test: atest CtsMimeMapTestCases
Change-Id: Icfa5aba8455c7460063d1e4812c71c5a2c0c6c90
Merged-In: Icfa5aba8455c7460063d1e4812c71c5a2c0c6c90
2019-11-29 19:42:03 +00:00
Jeff Gaston
a08395de66 Replacing @Nullable/@NonNull with @RecentlyNullable/@RecentlyNonNull in non-android APIs
because this causes callers of those APIs to only receive warnings from kotlinc rather than errors.

Bug: 141748642

Test: m api-stubs-docs && \
      cd out/target/common && mv docs docs-new && unzip docs-new/api-stubs-docs-stubs.srcjar -d docs-new/api-stubs-docs-stubs.srcjar_unzipped && cd - && \
      cd frameworks/base && git checkout HEAD^ && cd - && m api-stubs-docs && \
      cd out/target/common && mv docs docs-old && unzip docs-old/api-stubs-docs-stubs.srcjar -d docs-old/api-stubs-docs-stubs.srcjar_unzipped && \
      diff -x "*.html" -r docs-old/ docs-new | grep -v "^diff" | sed 's/^</>/' | grep '^>' | sed 's|androidx.annotation.Recently|android.annotation.|g' | sort | uniq -c | grep "^ *1 " # And notice that there aren't any copies of "androidx.annotation.Recently" without a matching instance of "android.annotation." or vice versa

Test: m api-stubs-docs && out/target/common/docs && unzip api-stubs-docs-stubs.srcjar -d unzipped && cd unzipped && \
      grep -r "@.*NonNull" java | grep -v Recently && \
      grep -r "@.*Nullable" java | grep -v Recently

Change-Id: I156f1788880958cf3d1f030da829e76cefd6072e
Merged-In: I156f1788880958cf3d1f030da829e76cefd6072e
2019-11-27 17:18:22 -05:00
Chen Xu
c00cf99b49 telephony-stack util API lib
attach copyable hidden util API classes to create a jar
file containing these, and statically link it from
telephony mainline modules. Need to jarjar those classes
otherwise classloader will load classes with the same
name in boot class path(framework.jar)

TODO: some Util APIs like AsyncResult which returned from
telephony-common library and used by other apps like Settings.
We should decouple Settings from telephony-common first before
we make a copy and rename AsyncResult.

Bug: 137202333
Test: Manual & Build
Change-Id: I81a6948246f1453481962699855560c2f64bb413
Merged-In: I81a6948246f1453481962699855560c2f64bb413
2019-11-26 17:01:05 -08:00
Benedict Wong
091e420529 Merge changes from topics "Expose IKE ID, TS & SaProposal", "Expose IKE exception and callback", "Expose IkeManager & IkeSession", "Expose SessionOptions & EapConfig"
* changes:
  Expose IKE module API: IkeManager and IkeSession
  Expose IKE module API: Session Options & EapSessionConfig
  Expose IKE module API: IkeException, configuration & callback
  Expose IKE module API: IKE ID, TS and SaProposal
2019-11-23 03:45:53 +00:00
Ytai Ben-Tsvi
a907efc3bc Add parceling support for HIDL memory in Java
This change adds support for reading/writing a HidlMemory
instance into / out of a HwParcel and HwBlob, in a format that
is compatible with the hidl_memory C++ type.
This paves the way to be able to exchange shared memory blocks
between native and Java via HwBinder, which will be exposed
as adding Java support for the HIDL 'memory' type.

Change-Id: I6cbbf852218c8a631f9014e7caa7a97d17e11889
Bug: 143566068
Merged-In: I6cbbf852218c8a631f9014e7caa7a97d17e11889
2019-11-21 15:19:47 -08:00
Treehugger Robot
acd388baf2 Merge "Include androidx stubs in framework docs" 2019-11-20 17:32:09 +00:00
Charles Munger
1b1c0ca9ee Include androidx stubs in framework docs
This will allow javadoc links to androidx packages to resolve.

Test: No behavior changes
Bug: 144042891
Change-Id: I01c1cd637f46c666c28669c1796a1d5a0d249c24
2019-11-19 14:01:19 -08:00
Anton Hansson
d82b2f7e4a Revert "Work around b/70221552"
This reverts commit 159799d7c9.

Reason for revert: b/70221552 is fixed

Change-Id: Iaae0df6736a3141847376b9ab0115f1c7a31fdb1
2019-11-18 13:40:45 +00:00
Jiyong Park
ced28d531d remove framework_base_subdirs
Metalava no longer requires it at least for droidstubs in this
directory. Even when local_sourcepath is not set, the -sourcepath option
is set to the module directory (frameworks/base in this case), and
metalava tries to find package.html files under the directory to know if
a package is hidden or not.

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

Bug: 144264106
Test: m

Merged-In: Idfa2aa392ae1da9582e7691a8c06c986baad5088
(cherry picked from commit e53786e864)
Change-Id: Idfa2aa392ae1da9582e7691a8c06c986baad5088
2019-11-16 20:48:06 +09:00
evitayan
69d77da91a Expose IKE module API: IKE ID, TS and SaProposal
This commit updates system-current to expose APIs of IKE mainline
module. Changes include:
- Feed IKE API source file to base/Android.bp
- Update system-current.txt to expose IkeIdentification,
  IkeTrafficSelector and SaProposal

Bug: 143983419
Test: make update-api && make
Change-Id: I3826434850de7b264ab44d46ca0bd82359dc98fe
2019-11-14 06:46:25 -08:00