266 Commits

Author SHA1 Message Date
Anton Hansson
3a8e03610b Remove unused monolithic jars
Nothing depends on these. They were only here for easy comparison
with the merged variant while we ironed out diffs.

Rename the merged variants instead of having duplicate compilation
rules.

Bug: 171029603
Test: m nothing
Change-Id: I7859589b93b861439fb1b7de084e52294da53671
Merged-In: I7859589b93b861439fb1b7de084e52294da53671
2020-11-03 19:38:55 +00:00
Anton Hansson
533fb47c7e Dist merged jar instead of monolithic one
The monolithic ones are being deleted in a follow-up CL.

Bug: 158465496
Test: m sdk dist
Change-Id: I41b38d4828f8dc5d90dbb3ae59462812b8c036f2
2020-11-03 19:33:50 +00:00
Anton Hansson
ad2bb796b0 Merge "Move non-updatable-api/ to core/api/" 2020-10-30 15:22:45 +00:00
Anton Hansson
5715f92949 Merge "Move non-updatable-api/ to core/api/" 2020-10-30 11:03:28 +00:00
Anton Hansson
5cbcb587af Merge "Remove the module-lib-api target" am: 36bd16e5ab am: 0a354a95f4 am: 0a111c1280 am: 1befdc9e4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1480536

Change-Id: I312eb37caed125f12fd3bd8c4e3e1741062b2810
2020-10-30 10:37:08 +00:00
Anton Hansson
6cbaff2471 Move non-updatable-api/ to core/api/
This achieves two things:
- it's been noted that non-updatable-api is a confusing term as it has
  to be updated every time the API changes
- the api-review logic trigers on txt files in subdirs named 'api',
  which non-updatable-api does not trigger on

I will (less urgently) try to get rid of the term "non-updatable" from
other places too, perhaps going for "non-module" or "core" as a
replacement.

Bug: 171029603
Test: m checkapi
Change-Id: I843efb4880b6caaf3872e9b0918fd710fb93d979
2020-10-30 08:23:20 +00:00
Anton Hansson
7bfceb87e1 Move non-updatable-api/ to core/api/
This achieves two things:
- it's been noted that non-updatable-api is a confusing term as it has
  to be updated every time the API changes
- the api-review logic trigers on txt files in subdirs named 'api',
  which non-updatable-api does not trigger on

I will (less urgently) try to get rid of the term "non-updatable" from
other places too, perhaps going for "non-module" or "core" as a
replacement.

Bug: 171029603
Test: m checkapi
Change-Id: I843efb4880b6caaf3872e9b0918fd710fb93d979
Merged-In: I843efb4880b6caaf3872e9b0918fd710fb93d979
2020-10-29 18:59:10 +00:00
Anton Hansson
43cc8bf55c Remove the module-lib-api target
This target existed just to track the "full" module lib API surface,
until the individual pieces had the same standards. However, now:
- the full current.txt file is available as a build target
- all the individual .txt files are API reviewed, checked against
last api, linted, and changes result on API council bug updates

The .txt files will be removed in a separate CL.

Bug: 171029603
Test: m checkapi
Change-Id: Ib8ec547871045f77fb73aa82f192b5a7767d0c33
2020-10-29 18:56:10 +00:00
Anton Hansson
cf42dd7c97 Merge "Annotate large droidstubs modules high_mem" am: 6aebdcbcb8 am: 13444871fb am: 9563c9801a am: 6ba7230ad9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473726

Change-Id: Ifca23833fd586b4dc82d076df51d47018416649c
2020-10-27 09:39:42 +00:00
Anton Hansson
3514689f05 Annotate large droidstubs modules high_mem
Previously all droidstubs modules were classified as highmem. Annotate
only the huge modules as such, to allow more parallelization of lowmem
droidstubs modules.

Bug: 170701554
Test: NINJA_HIGHMEM_NUM_JOBS=3 m checkapi
Change-Id: I83ae88222110d7afe4009076e951c88a5188ca83
2020-10-26 11:38:44 +00:00
Anton Hansson
7ce31c12ab Remove module source code from test-api-stubs-docs
This makes it impossible to add new @TestApi in modules, of which
there are none right now and we don't want any going forwards, either.

Bug: 170395679
Test: m test-api-stubs-docs-check-current-api
Change-Id: I527ca7b580350372bee72b65f6596a46eab2ce04
2020-10-15 18:38:49 +01:00
Anton Hansson
7110ae7a28 Remove module source code from test-api-stubs-docs
This makes it impossible to add new @TestApi in modules, of which
there are none right now and we don't want any going forwards, either.

Bug: 170395679
Test: m test-api-stubs-docs-check-current-api
Change-Id: I527ca7b580350372bee72b65f6596a46eab2ce04
Merged-In: I527ca7b580350372bee72b65f6596a46eab2ce04
2020-10-15 18:38:33 +01:00
Anton Hansson
ae26decc8e Merge "Have test_current be a union of system and test APIs" 2020-10-14 14:43:03 +00:00
Anton Hansson
1af66d72f2 Merge "Remove removed-dex-api generation" am: 83d9ddc6cb am: 4f3d7a966f am: cbeab42fd6 am: 82cbd820f8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1457761

Change-Id: Iab0d1daf4c564c69460f4241b3269e38f769d537
2020-10-14 13:34:51 +00:00
Anton Hansson
3142e68403 Merge "Remove jdiff_enabled from platform metalava runs" am: 02ca5fcbe7 am: 0e45be9aa5 am: 525db31892 am: 4b76503c8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1454976

Change-Id: Ia7fbdc74de136ff4140bf34adf43e472381ccfff
2020-10-13 09:31:54 +00:00
Anton Hansson
03b48e3fbe Remove removed-dex-api generation
Nothing uses these outputs anymore. The compat tools have been
migrated to use a new file in I082d18fc2b8a57ea8c5941d5c955a7970ab9d860.

Bug: 158465496
Test: presubmit
Change-Id: I51a1f3f5e43092f5431358d705379cc33b60b835
2020-10-13 09:38:44 +01:00
Anton Hansson
84ffba267e Have test_current be a union of system and test APIs
Include @SystemApi APIs in the test_current stub jar, while keeping
the @TestApi and @SystemApi API txt files tracked separately.

A side-effect of this change is that string constants of @SystemApi
permissions are no longer inlined in the test api tracking, possibly
because metalava was previously incorrectly peeking at @SystemApi
whereas it is now explicitly forbidden to do so. I don't believe the
API txt change has any practical effects.

Bug: 129133308
Test: presubmit
Change-Id: I23d3c88624ee7599485c3390a0440b78bc18a0a2
Merged-In: I23d3c88624ee7599485c3390a0440b78bc18a0a2
2020-10-13 08:25:03 +01:00
Anton Hansson
2da95f38c1 Merge "Have test_current be a union of system and test APIs" 2020-10-13 07:22:24 +00:00
Amy Zhang
782aa9006b Add Tuner 1.1 constants as a required lib of framework-non-updatable-sources
Test: make -j44 dist
Bug: 158816517
Bug: 159058358
Change-Id: Ia47c05a8094b28a3e84b7e57386ced7a70d26a98
2020-10-12 13:55:52 -07:00
Anton Hansson
374c51141a Remove jdiff_enabled from platform metalava runs
The official API differences report is not produced from the
artifacts this rule creates, but by manually running metalava
with the right txt files.

As there are no other known users of these jdiff files, remove them
for now.

Bug: 158465496
Test: m
Change-Id: Iee9dd1a5d5543f3f629e3631c8224e6bfe4dddcb
2020-10-12 18:49:44 +01:00
Anton Hansson
34529139fd Merge "Move the dist rules from monolithic to merged rules" am: 99398da506 am: 3b8ec2dcac am: 88901af27b am: b5fcebde9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1454979

Change-Id: Id64f6017e54e27d97c822e62a85e0221a2454bfa
2020-10-12 12:27:13 +00:00
Anton Hansson
186229a227 Merge "Add appsearch and graphics to module lists" 2020-10-12 10:45:55 +00:00
Anton Hansson
99398da506 Merge "Move the dist rules from monolithic to merged rules" 2020-10-12 10:45:13 +00:00
Anton Hansson
a2b349773a Have test_current be a union of system and test APIs
Include @SystemApi APIs in the test_current stub jar, while keeping
the @TestApi and @SystemApi API txt files tracked separately.

A side-effect of this change is that string constants of @SystemApi
permissions are no longer inlined in the test api tracking, possibly
because metalava was previously incorrectly peeking at @SystemApi
whereas it is now explicitly forbidden to do so. I don't believe the
API txt change has any practical effects.

Bug: 129133308
Test: presubmit
Change-Id: I23d3c88624ee7599485c3390a0440b78bc18a0a2
2020-10-10 09:34:28 +01:00
Anton Hansson
ae4332dc69 Move the dist rules from monolithic to merged rules
These API tracking files are identical except for 2 inlined permission
constants in the public API, which do not matter.

```
@@ -31606 +31606 @@
-    method @Deprecated @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", "android.permission.NETWORK_SETUP_WIZARD"}) public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
+    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
@@ -31634 +31634 @@
-    method @Deprecated @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", "android.permission.NETWORK_CARRIER_PROVISIONING"}) public void removePasspointConfiguration(String);
+    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_CARRIER_PROVISIONING}) public void removePasspointConfiguration(String);
```

Bug: 158465496
Test: lunch sdk_phone_armv7 ; m sdk dist ; diff artifacts
Change-Id: Ibde9310bb1f5c0921962c022e158a861b233f6d1
2020-10-09 14:45:24 +01:00
Anton Hansson
59e35965ee Merge "Convert appsearch to java_sdk_library" 2020-10-09 12:49:43 +00:00
Anton Hansson
d74139eea7 Add appsearch and graphics to module lists
These two were missing from some of the lists of all modules,
as they either weren't standardized or not available in the branch
where the list was first added.

Bug: 169034951
Test: m
Change-Id: I16c67ef8a433e6720953a2046c09add13a8102ed
2020-10-08 15:33:40 +01:00
Anton Hansson
25a0a2baa7 Convert appsearch to java_sdk_library
AppSearch build file only defined a subset of the stubs and api
tracking, which prevents making progress on creating a correct "merged"
current.txt. Convert it to the standard build setup modules should use.

Implementation wise, this is a little bit special in that it's somewhere
between a module and not. The implementation library requires platform
internals to compile. The stubs do not, and we rely on this to make
the build work at all -- via impl_only_libs we compile the stubs
*without* framework-minus-apex, which allows framework-minus-apex to
depend on the stubs.

Bug: 169304493
Test: m checkapi
Change-Id: I10a331bb6df56072cb9e9ada99ae47c5446869fd
2020-10-08 15:33:17 +01:00
Anton Hansson
043fb71ae7 Merge "Add last_released checking for module-lib API too" am: c34ea595c2 am: 6f7f0d2e31 am: ba259ecb01 am: 64bbfefa8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1452496

Change-Id: Ica515e450842c26e52dd36c2381aaecb85d0d23f
2020-10-08 10:24:57 +00:00
Anton Hansson
c3ef1f564f Add last_released checking for module-lib API too
I missed this in If608be48276f0a7f76afd714656267ed379ce062, which added
last_released tracking to the other *-non-updatable APIs. See that
change for more context.

Bug: 170105267
Test: m checkapi
Change-Id: I32d09c7fc155c04295dc16028a568e3381c09e4b
2020-10-07 14:57:40 +01:00
Anton Hansson
a474d0e92f Merge "Add last_released checking for non-updatable API" 2020-10-05 18:41:06 +00:00
Anton Hansson
869e7e0c3f Merge "Add last_released checking for non-updatable API" 2020-10-05 18:38:12 +00:00
Anton Hansson
37e102ec70 Add last_released checking for non-updatable API
This makes the build fail when APIs are removed from the (non-updatable)
framework.jar, and e.g. into a module. This is in general not safe, so
is a reasonable default. When it needs overriding (when e.g. creating
now modules), incompatibilities.txt can be used for that.

Bug: 170105267
Test: m checkapi
Change-Id: If608be48276f0a7f76afd714656267ed379ce062
2020-10-05 16:42:40 +01:00
Anton Hansson
3258a479d3 Add last_released checking for non-updatable API
This makes the build fail when APIs are removed from the (non-updatable)
framework.jar, and e.g. into a module. This is in general not safe, so
is a reasonable default. When it needs overriding (when e.g. creating
now modules), incompatibilities.txt can be used for that.

Bug: 170105267
Test: m checkapi
Change-Id: If608be48276f0a7f76afd714656267ed379ce062
Merged-In: If608be48276f0a7f76afd714656267ed379ce062
2020-10-05 16:23:27 +01:00
Treehugger Robot
b069099836 Merge "Build stub libraries with smaller deps" am: 68d17855ea am: 88c2c1aa6f am: 1ed5aad300 am: e13d2abfb9 am: 2fe07d3a1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440213

Change-Id: Ie05c629ad2ba24517954bd4722e6a3b7e1546e7a
2020-10-05 13:18:57 +00:00
Treehugger Robot
68d17855ea Merge "Build stub libraries with smaller deps" 2020-10-05 11:17:01 +00:00
Jiyong Park
c0f8a28e54 Build stub libraries with smaller deps
The stub libraries had a dependency to framework-internal-util which is
a collection of java static libraries whose source code is
auto-genmerated (e.g. via protoc, aidl, etc.)

The library was added as a dependency because some Java files that are
fed into the metalava for the stub code generation have references to
some of the auto-generated symbols. However, this is more than
necessary. Furthermore, that setup will create a circular dependency
when framework-internal-utils (or its transitive dependencies) have a
dependency to the stub libraries due to 'sdk_version' setting.

Fixing the problem by replacing the dependency to
framework-internal-util with a few number of libraries.

Bug: 169618843
Test: m
Change-Id: I30c953ed220e84ab295548845fff0b26e3c060b6
2020-10-05 18:30:33 +09:00
Paul Duffin
1f541e24ea Merge "Use ART stubs source generated by java_sdk_library" am: b996945678 am: 54fa7623bc am: ad9299dcdb am: 471182f89e am: 860f8b380b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1428569

Change-Id: I530d440c283af2e592a13f08a694ec788b9adf29
2020-09-29 15:50:19 +00:00
Paul Duffin
404b26a761 Use ART stubs source generated by java_sdk_library
Bug: 168301990
Test: Built offline-sdk-docs with and without the change and
      diffed them. There were some changes other than the timestamp.js
      file. With these changes classes that implemented the
      Object.equals(Object) method had some extra documentation that
      explained that the parameter could be null. The reason for this
      change is that the stubs generated with this change includes
      android.annotation.Nullable whereas previously they included
      androidx.annotation.Nullable. The change is a very minor
      improvement over what is currently uploaded to
      developer.android.com/reference so not worth backporting.
      Diffed api/public/current.txt against
      frameworks/base/api/current.txt and made sure that the latter was
      a superset of the former and there were no differences in the area
      that overlapped.
Change-Id: I3767948b4659b18b813c8eed66258af98ac4a241
2020-09-28 19:50:24 +01:00
Ytai Ben-tsvi
45c5b1c7c4 Merge "Separate AIDL packages" 2020-09-22 22:19:51 +00:00
Anton Hansson
1cb4d40ea4 Merge "Move api/*current.txt filegroups into api dir" am: 97165aa09e am: 39ce253f05 am: e206b228cd am: 933ad0fb03 am: 1d40ff6373
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432680

Change-Id: I095efc5d33f5f940bde90d418dd6f82aebce5ddf
2020-09-22 20:06:28 +00:00
Ytai Ben-Tsvi
da7c21ec51 Separate AIDL packages
This moves the android.media.audio.common, android.media.permission and
android.media.soundtrigger_middleware AIDL files to a their own
separate aidl_interface module for Java.

Previously, because of how the framework JAR is configured, those
files were automatically compiled into it and we had to disable Java
for this target, creating a discrepancy between C++ and Java, which
would require us to similarly diverge any dependent targets if we want
cross-language support.

As part of this change, we also had to switch from using the
FileDescriptor type to ParcelFileDescriptor, as this is the only type
supported outside of the framework JAR and is also the recommended
practice.

Test: Manual verification of basic soundtrigger functionality.
Change-Id: Ib65c19dd7c7f5433cfa527fa74bb61ac677f5cf5
2020-09-22 10:07:00 -07:00
Anton Hansson
fcb91d4ad0 Move api/*current.txt filegroups into api dir
The StubLibraries bp file is sufficiently humongous without them.

Bug: 169034951
Test: presubmit
Change-Id: I2809f94f950cdebb6c1fbf8de091e9d9443810d6
2020-09-21 17:03:14 +01:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Anton Hansson
7c065b9c69 Merge "Re-apply "Add bp-based disting of android stubs"" into rvc-dev-plus-aosp am: b1db8662c0 am: 4b57d15fa3 am: b75a7e0983
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12400764

Change-Id: Ia7a357d99f273dc18d602ea3f86e79800055cc32
2020-08-18 15:58:09 +00:00
Anton Hansson
bb7674fad3 Merge "Compose the main stubs jars from module stubs" 2020-08-18 15:18:07 +00:00
Anton Hansson
b1db8662c0 Merge "Re-apply "Add bp-based disting of android stubs"" into rvc-dev-plus-aosp 2020-08-18 15:16:56 +00:00
Anton Hansson
519293857a Merge "Make framework-res dep in stubs explicit" am: f0031bf353 am: dffa4110c6 am: dcd62bcecf am: 318d951bff am: abdb4390c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399179

Change-Id: If91c56f1d671c3fbbe8045f939aa24366c54cd01
2020-08-18 13:00:40 +00:00
Anton Hansson
53cf0ba71f Re-apply "Add bp-based disting of android stubs"
The issue with missing resources has been fixed.

This reverts commit 9b0a74f0a3ae653954f432bf8892533aa2522015.

Bug: 161214753
Change-Id: I863e76f199f7e209dfc86a85320f394c2285e71a
Test: diff sdk artifacts before and after
2020-08-18 12:35:31 +00:00
Anton Hansson
dcd62bcecf Merge "Make framework-res dep in stubs explicit" am: f0031bf353 am: dffa4110c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399179

Change-Id: I7975a93cbbf95a0b199348e2155eff51227f9db8
2020-08-18 12:21:53 +00:00