Commit Graph

1952 Commits

Author SHA1 Message Date
David Brazdil
68e1c1dcf4 Whitelist all @SystemApi and @TestApi for hidden API
We used to greylist @SystemApi and @TestApi individually, but we should
allow all of them to be used. Run Doclava in a separate pass to generate
a list of private APIs, assuming that @SystemApi and @TestApi override
the @hide annotation.

Bug: 64382372
Bug: 74346885
Test: check generated files
Change-Id: Ie3726a294a4fdeb03fc8888878b013c9ad5bd04b
2018-03-08 14:54:56 +00:00
Tobias Thierer
dda16e8e6b Remove com.android.internal{.util} from generated documentation.
com.android.internal.* is meant to be hidden from documentation,
but most of it is erroneously not hidden via @hide or -hidePackage
directives; why documentation is currently generated for Predicate
but not other classes from com.android.internal.util, and why some
but not all classes from that package show up in package-level
documentation (package-summary.html), is not currently understood.

There appears to be a behavior difference between OpenJDK 8 and
OpenJDK 9's javadoc that results in additional classes showing up
in package-summary.html. This CL fixes this by adding -hidePackage
directives for com.android.internal{.util}; other sub-packages of
com.android.internal do not currently show up in documentation and
are not touched by this CL.

Test: Patched this CL into the internal-master branch and ran:
      USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true make offline-sdk-docs
      Checked that this removes all documentation for com.*
      (com.android.internal.util was the only com.* package for which
      documentation was previously generated).
      In other words: Before this CL, [1] existed, but after
      this CL, the entire directory subtree [2] does not exist.
Test: Checked that Predicate was already missing from stubs before this
      CL. In other words, [3] already did not exist before this CL.

[1] out/target/common/docs/offline-sdk/reference/com/android/internal/util/Predicate.html
[2] out/target/common/docs/offline-sdk/reference/com
[3] out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes/com

Bug: 69736344
Bug: 69736236

(cherry picked from commit 97bb6cf371)

Merged-In: Ic9757f4966f54092aac0191896581fa4222cc634
Change-Id: Ic9757f4966f54092aac0191896581fa4222cc634
2018-03-07 13:57:16 +00:00
Scott Main
b437f30f28 Merge "Enable new yaml file for reference nav that lists all framework files." into oc-mr1-dev am: e3c0216f95
am: 91ca55c174

Change-Id: I04555e22ddd6a26904e0c83d1113d67ff13e69a2
2018-03-01 19:37:38 +00:00
Scott Main
91ca55c174 Merge "Enable new yaml file for reference nav that lists all framework files." into oc-mr1-dev
am: e3c0216f95

Change-Id: I535787ff921cb6e6978e57dd775e7446f67195f8
2018-03-01 19:21:50 +00:00
Scott Main
4f9b48cce4 Enable new yaml file for reference nav that lists all framework files.
This depends on DocLava changes in ag/3382461

bug: b/69845924

test: make ds-docs

Change-Id: I4acd2c2034581b349ab4c00cbfe195ee5eca2354
2018-03-01 19:03:25 +00:00
Andrew Solovay
73cf7bfd90 Merge "docs: Adding P to the API levels" 2018-02-27 19:46:36 +00:00
Andrew Solovay
61204ce7fe docs: Adding P to the API levels
Based this on SMain@ 's changes in ag/1936024 , which added the O
API level for the O preview.

Doc is staged to:

go/dac-stage/reference/

For an example of a new API class with the watermark, see:

go/dac-stage/reference/android/media/MediaPlayer2.html

Test: make ds-docs
Bug: 73009741
Change-Id: I591419c903222c9ad0c541dcd4bfce6a38ba1f2c
2018-02-26 14:02:22 -08:00
Neil Fuller
76ac7e6319 Remove icu4j dependency.
This dependency is no longer required: it was added
for libcore when libcore was implemented in terms of
com.icu classes. libcore has since moved to android.icu
(in core-libart) and so the droiddoc dependency is no
longer required.

Test: make droid docs
Merged-In: I6e4e79a7df201fdc2cefa60037adf831593eaa0f
Change-Id: I6e4e79a7df201fdc2cefa60037adf831593eaa0f
2018-02-26 21:22:38 +00:00
Neil Fuller
34f7230512 Remove icu4j dependency.
This dependency is no longer required: it was added
for libcore when libcore was implemented in terms of
com.icu classes. libcore has since moved to android.icu
(in core-libart) and so the droiddoc dependency is no
longer required.

Test: make droid docs
Change-Id: I6e4e79a7df201fdc2cefa60037adf831593eaa0f
2018-02-26 21:03:12 +00:00
Andreas Gampe
7b9b5d7544 Framework: Disable [MissingOverride] for platformprotos
Bug: 72714520
Test: m javac-check-platformprotos RUN_ERROR_PRONE=true
Merged-In: I00f5a588fa74621d4c35dc4e39b54536815ad476
Change-Id: I00f5a588fa74621d4c35dc4e39b54536815ad476
2018-02-16 01:34:21 +00:00
Andreas Gampe
3e429f33dd Framework: Disable [MissingOverride] for platformprotos
Bug: 72714520
Test: m javac-check-platformprotos RUN_ERROR_PRONE=true
Change-Id: I00f5a588fa74621d4c35dc4e39b54536815ad476
2018-02-15 17:13:03 -08:00
TreeHugger Robot
05d08d808d Merge "Fix link-type check warnings for platformprotosnano" 2018-02-13 23:18:11 +00:00
Colin Cross
7d07ad1ef2 Merge "Don't put android.os.Parcelable in framework.aidl" am: 0872f6d5e3 am: 6864210fe2
am: 37ba3de333

Change-Id: Ib8d8277171ede82ea4626b6d2de2fcb9c1a1d307
2018-02-13 08:41:41 +00:00
Jiyong Park
f0048397a4 Fix link-type check warnings for platformprotosnano
platformprotosnano is used by cts-amwm-util and this is causing
link-type check warning because cts-amwm-util is built using SDK but
platformprotosnano isn't.

Since platformprotosnano can actually be built with SDK APIs only,
setting LOCAL_SDK_VERSION to 'current' instead of building against
core-oj and core-libart which contain private APIs.

LOCAL_SDK_VERSION := core_current has been tried but it didn't work
because libprotobuf-java-nano is using Android APIs (thus marked as
java:sdk). java:core -> java:sdk dependency is not allowed.

Bug: 69899800
Test: m -j platformprotosnano
Change-Id: I14a9a80bb218dae63e8320b7aab40d7ad48a7a13
2018-02-12 21:57:59 +09:00
Colin Cross
fdbe7d1ca9 Don't put android.os.Parcelable in framework.aidl
Parcelable shouldn't be in the list of parcelables in framework.aidl.
Remove it to fix warning when running aidl:
framework.aidl:287 attempt to redefine built in class android.os.Parcelable

Also make the dependency on sdk_parcelables not be order-only so
framework.aidl gets rebuilt when sdk_parcelables changes.

Bug: 73135791
Test: ParcelableDetectorTest
Test: out/target/common/obj/framework.aidl does not contain android.os.Parcelable
Change-Id: If5222879be9ec1e5fa08810adc624ec526ddc0ec
2018-02-09 11:29:15 -08:00
Nicolas Geoffray
90fa8ef4c9 Revert "Make blacklist the default hidden API list"
Bug: 64382372

This reverts commit 3f4136c3b7.

Reason for revert: Causing too many downstream issues together
    with I2c1353d31386da447456b17f9643c0470128ee3d. Revert to
    unblock pi-release and testing.

Bug: 73105914
Bug: 73103669
Bug: 73106486
Bug: 64382372
Bug: 73103081
Bug: 73119220
Bug: 73114663

Change-Id: I072dd571f779e2b5e405d21eecce5a60d1b3c7f2
2018-02-08 21:44:24 +00:00
David Brazdil
3f4136c3b7 Make blacklist the default hidden API list
Starting with DP1 we will move private APIs that have not been
explicitly greylisted into the blacklist. Modify Android.mk to
generate the API lists accordingly.

Bug: 64382372
Test: make, inspect out/target/common/obj/PACKAGING/hiddenapi-*
Change-Id: I1d817ba6b95058ad052a2c7663ef99257bdeffc1
2018-02-08 03:51:55 +00:00
David Brazdil
7d69d3a855 Merge "Droidfood only: Move private APIs to dark greylist by default" 2018-02-01 11:07:39 +00:00
David Brazdil
b43351f84a Droidfood only: Move private APIs to dark greylist by default
In order to tune the API lists, we initialize the light greylist with
APIs we know are used by popular apps. All the other private APIs are
moved into dark greylist. Light greylist will be set to not warn at
all, while dark greylist will produce warnings. This will allow us to
collect logs and tune the lists without breaking all of our dogfooders.

Bug: 64382372
Bug: 72793280
Test: make
Change-Id: Ice6c487eeca8900e6a70abe1b87e8c211ef1066e
2018-02-01 09:47:59 +00:00
Andreas Gampe
93b64c9a62 Frameworks: Disable Errorprone warnings for platformprotoslite
Protos are very noisy with MissingOverride and other warnings.

Bug: 72714520
Test: m javac-check-platformprotoslite RUN_ERROR_PRONE=true
Change-Id: I91cf96df12e82866dde36ab4f58b6ba7be9f2c4e
2018-01-30 18:50:34 -08:00
David Brazdil
a85b43b80b Merge "Copy hidden API blacklist/dark greylist into build folder" am: 656096516c am: 47f632d48f
am: 43f511a928

Change-Id: Ibf3581193d88df1916b1c2d57c94d01095cdac97
2018-01-26 19:51:11 +00:00
David Brazdil
f16ac00fe8 Copy hidden API blacklist/dark greylist into build folder
This change is meant for ART buildbots which build against a pinned
commit of the framework and thus do not have the commit which
introduced hidden API lists. Normal builds will now copy the blacklist
and dark greylist into the build folder first, and then generate the
light greylist as usual. If a buildbot does not have the framework
changes, it can create dummy API lists in the build folder before
starting the build and avoid the issue.

Test: make
Bug: 64382372
Change-Id: Ib6e53a45bcc917abb4ba67fdcbf01d4a19c2d56f
2018-01-26 11:49:54 +00:00
David Brazdil
e87f629e8c Merge "Create hidden API lists" am: b6a5c92b50 am: 265863f9d9
am: a5cc0bb027

Change-Id: I6e85de117103f62cea394f7d00478ffba3ea0622
2018-01-25 15:57:31 +00:00
David Brazdil
0649c8d5b3 Create hidden API lists
Android is beginning to put restrictions on the usage of private APIs.
In order to facilitate a transitionary period, some APIs will remain
accessible but issue a warning (greylist), other will see restrictions
right away (blacklist).

This patch create two new text files which will be used to store manual
lists of dex signatures of hidden APIs. These are the blacklist and
dark greylist. They should be mutually exclusive and both be subsets of
INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE. The last list, light greylist,
is generated as INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE minus the two
manual lists.

Bug: 64382372
Test: m
Change-Id: Ia694ef79bece819c87db853ccaea5e95f38d3e84
2018-01-24 20:48:37 +00:00
TreeHugger Robot
b5253b65a4 Merge "Add more information to incident header. Especially add config keys to check if the report is uploadable." 2018-01-22 09:20:52 +00:00
Yi Jin
437aa6e8ad Add more information to incident header. Especially add config keys
to check if the report is uploadable.

Move incidentheader.proto to libincident so statds is able to include a lite
proto class for incident header.

Change IncidentReportArgs to add the proto object instead of serialized
bytes to prevent caller gives meaningless data.

Bug: 70241842
Test: push config to statsd and verify incidentd generate the report
with correct header.

Change-Id: If95b655be71047b019b229e5903a08f3c21a1f29
2018-01-21 22:36:01 -08:00
David Brazdil
ae5ba1e5cd Merge "Generate new API signatures from doclava" am: fa208b4226 am: 72b7f03179
am: ccc31988ee

Change-Id: Ibc40df91d9aa4f1258856ddcd85204ce62297bf1
2018-01-20 11:43:40 +00:00
Primiano Tucci
e4d44919aa Statsd -> Perfetto integration
This CL invokes the perfetto client utility to start the
collection of a trace when an anomaly that subscribed to
Perfetto is detected. The code simply spawns the
/system/bin/perfetto client and passes the trace config via
stdin. The client takes care of the dropbox upload.
The CollectPerfettoTraceAndUploadToDropbox() function does
NOT wait for the full trace collection (in order to avoid
blocking statsd) and instead returns immediately after having
spawned perfetto.

Change-Id: I4f02067bad7a46ede7b6e4841cdcf381c1a4e2a7
Bug: 71795552
2018-01-19 23:50:07 +00:00
Paul Duffin
fb48139a41 Remove junit classes from android.jar
Bug: 30188076
Test: make checkbuild
Change-Id: Ia90b8a81495299165d6f8d373ab8c5937e2a5290
2018-01-19 08:16:36 +00:00
David Brazdil
a793f3ff52 Generate new API signatures from doclava
Doclava now generates API signatures of classes and their members
which are not part of the public SDK. Adjust the arguments passed
to Doclava to enable that feature.

Bug: 64382372
Test: m
Change-Id: I47de683dd2b00fce73b82581a13fbe1013ef625f
2018-01-18 10:40:11 +00:00
Holly Jiuyu Sun
5736685560 Merge "Add APIs to EuiccCardManager." am: a5bc474e2c am: f07319a6df
am: beacd5e4fa

Change-Id: I7aa42d89c69911137a86b86ee59463efe46a81c3
2018-01-18 04:28:28 +00:00
Holly Jiuyu Sun
bbc858006f Add APIs to EuiccCardManager.
The CL contains parts of the EuiccCard APIs. getEid() is sync. All the
other APIs are async.
Move ResetOptions from EuiccCard to EuiccCardManager.
The other APIs will be added in a follow-up CL.

Bug: 38206971
Test: test on phone
Change-Id: Iba098ee779b8ea4e244e0e4cf7318139666cc94b
2018-01-17 16:38:42 -08:00
Paul Duffin
2141827700 Move legacy-test to test-base
Make it consistent with the test-mock and test-runner directories.
Also renames the files in api/ subdirectory.

(cherry picked from commit f779efd62c)

Bug: 30188076
Test: make checkbuild
Change-Id: Ied3621e6201d8717223fe1ccd4ea77d458126b25
Merged-In: If4f99a65fcca416ede5b3e63481398f0b451bcb7
2018-01-12 15:52:39 +00:00
yuemingw
8e62041b84 Merge "Add public ApnSetting in android.telephony." am: f9063b378b am: f68992a6a7
am: e3d4b7d3d2

Change-Id: Ia4100787507887692c6aa5df4e331fba59993255
2018-01-11 05:21:32 +00:00
yuemingw
9361a1394c Add public ApnSetting in android.telephony.
Bug: 68208293
Test: manual

Add public ApnSetting class in android.telephony. Move APN TYPE constants out from
PhoneConstants into public ApnTypeConstants.

Design doc: https://docs.google.com/document/d/1UEYjhRGSEwwccPLs_FzFD-IeOsVq63gxmAHNtDfnzAY/edit?pli=1#

Change-Id: I74d23644a872df0abc19730285ae196b6e3e39dd
2018-01-10 03:17:05 +00:00
Colin Cross
c9f25c4ee5 Remove obsolete aidl list
Remove the obsolete aidl list, framework.aidl is now generated
from the stubs jars.

Bug: 70046217
Test: m checkbuild
Change-Id: I2417f0a8f193bd4db4058f6f0bb05c147e18de25
Merged-In: I2417f0a8f193bd4db4058f6f0bb05c147e18de25
(cherry picked from commit fac48f998e)
2018-01-05 17:40:27 -08:00
Colin Cross
fac48f998e Remove obsolete aidl list
Remove the obsolete aidl list, framework.aidl is now generated
from the stubs jars.

Bug: 70046217
Test: m checkbuild
Change-Id: I2417f0a8f193bd4db4058f6f0bb05c147e18de25
2018-01-04 14:59:10 -08:00
Colin Cross
e9727164cb Merge changes I9de0ffe9,Idc804896 am: 153fb1c6e0 am: 99161bc1c7
am: 52d4011195

Change-Id: Ia3b7f49d4dbd38660570c7c84991a69f86bf24e4
2018-01-04 01:17:42 +00:00
Colin Cross
153fb1c6e0 Merge changes I9de0ffe9,Idc804896
* changes:
  Use sdkparcelables to generate framework.aidl
  Initial sdkparcelables
2018-01-04 00:48:50 +00:00
Jack Yu
23192ff57f Added AIDL for cell identity
Added AIDL for CellIdentityCdma, CellIdentityGsm, CellIdentityLte
and CellIdentityWcdma. This is the preliminary change for IWLAN
refactoring as network registration state will be moving into
system API.

Test: Build
bug: 64132030
Merged-In: I6763d4b6e51cf354b01ee5bfb5d37114394f3063
Change-Id: I6763d4b6e51cf354b01ee5bfb5d37114394f3063
(cherry picked from commit 31db18a4c0)
2017-12-27 23:29:49 -08:00
Jack Yu
31db18a4c0 Added AIDL for cell identity
Added AIDL for CellIdentityCdma, CellIdentityGsm, CellIdentityLte
and CellIdentityWcdma. This is the preliminary change for IWLAN
refactoring as network registration state will be moving into
system API.

Test: Build
bug: 64132030
Change-Id: I6763d4b6e51cf354b01ee5bfb5d37114394f3063
2017-12-27 16:19:20 -08:00
Paul Duffin
9f6282d0ab Remove android.test.mock classes from android.jar
This removes all android.test.mock from the main android.jar.

This change is being done now rather than wait until they can all be
removed together because the code base is a moving target. Doing this
change minimizes the window during which other developers could either
revert the previous changes that make this possible or add new code that
relies on the android.test.mock classes being in android.jar and so
would require yet more changes.

Bug: 30188076
Test: make checkbuild
Change-Id: I3d31e4528c99e2e297aaec9c4b657bdd305bd464
2017-12-21 10:58:35 +00:00
TreeHugger Robot
107f7cc4c4 Merge "Remove stream.proto and cpp-streaming-proto generates field name to id mapping by default" 2017-12-19 19:07:53 +00:00
Paul Duffin
187a48de62 Remove non-junit android.test.base classes from android.jar
This removes those android.test.** classes which are part of the
android.test.base stubs jar from the main android.jar.

The junit classes will be removed at a later date. It cannot be done at
the moment because it requires a lot of changes to the build files.

This change is being done now rather than wait until they can all be
removed together because the code base is a moving target. Doing this
change minimizes the window during which other developers could either
revert the previous changes that make this possible or add new code that
relies on the android.test.base classes being in android.jar and so
would require yet more changes.

Bug: 30188076
Test: make checkbuild
Change-Id: I9a4df968835166cc3d30c076ef3036711dfe5b7f
2017-12-19 10:42:28 +00:00
Yi Jin
f68e747e05 Remove stream.proto and cpp-streaming-proto generates field name to id
mapping by default

Test: atest incident_helper_test
Change-Id: Iab04973ea78b942e44503fcd6ae60808caf3b9e0
2017-12-18 17:37:50 -08:00
Colin Cross
77ebd08d17 Use sdkparcelables to generate framework.aidl
Use sdkparcelables to extract public parcelables from the
public, test, and system stubs jars, and combine them into
framework.aidl.

Bug: 70046217
Test: m checkbuild
Change-Id: I9de0ffe9dffbd80c8cb785b0624959c52c3200a1
2017-12-16 20:43:50 -08:00
Paul Duffin
1895f2e5bb Remove non-junit android.test.runner classes from android.jar
This removes those android.test.** classes which are part of the
android.test.runner stubs jar from the main android.jar.

The junit classes will be removed at a later date. It cannot be done at
the moment because it requires a lot of changes to the build files.

This change is being done now rather than wait until they can all be
removed together because the code base is a moving target. Doing this
change minimizes the window during which other developers could either
revert the previous changes that make this possible or add new code that
relies on the android.test.runner classes being in android.jar and so
would require yet more changes.

Bug: 30188076
Test: make checkbuild
Change-Id: I4e3c3bfea77ce15ca7a9ba7d36aee5396f67affb
2017-12-15 07:34:47 +00:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
TreeHugger Robot
4b1557d3a0 Merge "Give SliceManagerService a concept of pinned slices." 2017-12-14 04:09:55 +00:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00