Commit Graph

1973 Commits

Author SHA1 Message Date
Anton Hansson
e16051a077 Merge "Update apidiff source files to use new api location." into pi-dev-plus-aosp 2018-05-02 16:25:42 +00:00
David Brazdil
51c439d79c Build hidden API DEX signatures with Soong
Internal master tree is still invoking Doclava with a Makefile build
rule for hidden API, while the remaining Doclava rules have been
migrated to Soong. Do the same for hidden API.

Test: make out/soong/.intermediates/frameworks/base/hiddenapi-lists/android_common/private-dex.txt
Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267
Change-Id: Ifa912f8751025b7de24a982a1a227a9c27d18267
(cherry picked from commit 4f9d4d566c)
2018-05-02 16:20:01 +01:00
David Brazdil
0319384019 Merge non-SDK @removed API and light greylist
am: 0585533a85

Change-Id: I3b052c65e23b813f96df9a8d28fe81961bf42a7f
2018-05-02 07:43:11 -07:00
David Brazdil
0585533a85 Merge non-SDK @removed API and light greylist
@removed APIs are not part of the public SDK but we do not want
to block access to them. Use the recently added removed-dex.txt
list of @removed API signatures and merge it into the hidden API
light greylist programmatically.

Note that due to Doclava's rule precedence, @removed APIs which
override a public SDK method are considered public and are
whitelisted. We have to intersect removed-dex.txt with private-dex.txt
to satisfy the rule that light greylist is a subset of private-dex.txt.

Bug: 78182899
Test: make out/target/common/obj/PACKAGING/removed-dex.txt
Change-Id: I44e54c405fc667d54a990b9ded1de8456802545e
2018-05-02 14:29:20 +00:00
David Brazdil
0f0abb2593 Build list of @removed API's dex signatures
CL Iba8869ce6e4f401a8e420ad83ab459d25bbbaae0 added Doclava support
to generate a list of @removed API. Add a rule which builds that
list.

Bug: 78182899
Test: make out/target/common/obj/PACKAGING/removed-dex.txt
Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267
Merged-In: I80860c2b9f7213db65d0a9ca65bd645187aa0ce0
Change-Id: I688c14e0d2fbfafe9ac212e6abdc3593cb744ef9
2018-05-02 08:54:50 +00:00
Anton Hansson
cfa700dd85 Update apidiff source files to use new api location.
Also remove some duplicated code between public api and
system, by making a new make macro.

Paths before:
  frameworks/base/../../prebuilts/sdk/api/28
  frameworks/base/../../prebuilts/sdk/system-api/28

Paths after:
  prebuilts/sdk/28/public/api/android
  prebuilts/sdk/28/system/api/android

Test: make offline-sdk-referenceonly-diff
Test: make offline-system-sdk-referenceonly-diff
Bug: 77525052
Change-Id: I54989816ea09ad7a1e2f2355926678e6d2edb27c
2018-04-23 18:03:15 +01:00
Anton Hansson
6a9e72651b Move frameworks/base off the SRC_API_DIR variable.
This directory is going away. Migrate to the new paths, and replace the
long list of "since" arguments with a loop in the makefile. Also fix the
soong buildfile to use the new path and the 28 prebuilts.

This removes the need to update it every time an API is finalized (in make,
I don't know how to make loops in soong).

Bug: 77525052
Test: Verified variable is the same before & after, except for path change
Change-Id: I1d4e87e7840e979b83779a2aefe176e7c1ed1527
2018-04-23 11:44:53 +01:00
Anton Hansson
6939c142e0 Merge "Update docs 'since' for API 28." into pi-dev
am: 93f457c531

Change-Id: I86d0f88190fa9603ac3eef6468a73d32c1a633e3
2018-04-19 08:42:56 -07:00
Anton Hansson
092d9b8088 Update docs 'since' for API 28.
I'm replacing this list with a for-loop in master, so it shouldn't need
updating in future (except for temporary apis).

Bug: 77588754
Test: make docs
Change-Id: Ib48218e303b53e2b16a13866e4423ee2ad1c2f4a
2018-04-19 14:21:44 +01:00
Alan Viverette
55d013b0fa Merge "Federate platform docs against AndroidX" into pi-dev
am: 73a66276e3

Change-Id: I037ae591cb7fbdf33260ff7494a28a0ae22919c1
2018-03-29 15:04:15 +00:00
Alan Viverette
67b51d4691 Federate platform docs against AndroidX
Bug: 76692459
Test: make docs
Change-Id: If1523ee47bcc58151a641938ac6f4a6e7ae1af0b
2018-03-28 17:13:13 -04:00
David Brazdil
9d184a24e8 Merge "Revert Revert: Enable hidden API blacklist" into pi-dev
am: c60a932ae5

Change-Id: I95c824b6107083667be474c4fc1f8d3bbd22648e
2018-03-28 15:54:06 +00:00
David Brazdil
36bbf124b8 Revert Revert: Enable hidden API blacklist
APIs which have not been explicitly greylisted have so far been put
on the dark greylist. This patch changes the default to blacklist and
therefore enables strict enforcement.

This reverts commit f712b23d56.

Bug: 64382372
Test: make
Change-Id: I1608b1adbe5dcafd13335691ddeb94abbb2c6e71
2018-03-28 15:05:22 +00:00
David Brazdil
3f3487d64e Merge "Add serialization methods to hidden API light greylist" into pi-dev
am: 02175b7847

Change-Id: Ie625488ec40b3fd18d11043a1d25f5ccb487c351
2018-03-27 17:23:54 +00:00
David Brazdil
357170b180 Add serialization methods to hidden API light greylist
This patch adds a build-time rule that adds all members with signatures:
  readObject(Ljava/io/ObjectInputStream;)V
  readObjectNoData()V
  readResolve()Ljava/lang/Object;
  serialVersionUID:J
  serialPersistentFields:[Ljava/io/ObjectStreamField
  writeObject(Ljava/io/ObjectOutputStream;)V
  writeReplace()Ljava/lang/Object;
to the hidden API light greylist. This is needed so that apps can retain
the ability to write their own serializers.

Bug: 64382372
Bug: 73255398
Test: make
Change-Id: I0103f47044e957bbff0a39230ff53562f3feddac
2018-03-27 16:54:53 +00:00
Mathieu Chartier
eff60b2742 Merge "Revert "Enable hidden API blacklist"" into pi-dev
am: 90ad15400a

Change-Id: I1d2b05e6959538b5b60a63f76fcd10b42b8e83a5
2018-03-22 20:28:44 +00:00
David Brazdil
f712b23d56 Revert "Enable hidden API blacklist"
This reverts commit 16bfa11b73.

Reason for revert: Revert until b/76138670 is fixed

Bug: 64382372
Bug: 76138670
Bug: 76157445
Change-Id: Iaf6c76b773fbea4d4710b38808dee2e7e06f5e78
2018-03-22 20:10:26 +00:00
Nicolas Geoffray
07e1fb65ba Merge "Enable hidden API blacklist" into pi-dev
am: 34aae0daad

Change-Id: Ie71f420a40afcd63b0bf758e17fefe4ea59aee1b
2018-03-21 11:04:27 +00:00
Nan Zhang
7bfac8dce2 Remove Make side (system/test-)api-stubs droiddoc targets
Remove old droiddoc targets for api-stubs, system-api-stubs, and test-api-stubs.

And also set api_tag_name, api_filename, private_api_filename, and etc.
properties in Android.bp for new droiddoc.
Test: manually compare if dependencies change after Soong based droiddoc runs.
Bug: b/70351683

Change-Id: I8d944c83de120ec8148276adc1c9872113d9d29b
Merged-In: I8d944c83de120ec8148276adc1c9872113d9d29b
2018-03-20 16:22:30 -07:00
David Brazdil
16bfa11b73 Enable hidden API blacklist
APIs which have not been explicitly greylisted have so far been put
on the dark greylist. This patch changes the default to blacklist and
therefore enables strict enforcement.

Bug: 64382372
Test: make
Test: device boots
Change-Id: Id38dd14382e9c2f0e853698ad7df7e9602084336
2018-03-20 13:54:55 +00:00
David Brazdil
873d1d30d5 Add uses of hidden APIs from vendor apps
These will move into the dark greylist once we remove the UI toast.
Merge them with light greylist for now.

Bug: 64382372
Bug: 74589747
Bug: 74588266
Bug: 74586173
Bug: 74586969
Test: make
Change-Id: I8c1d3b67b763e8b14a66874705ba7165cf421e72
Merged-In: I5d0ec308a0187d67df6d9a4f0778c9285dc1e2af
2018-03-16 10:23:09 +00:00
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