Commit Graph

21637 Commits

Author SHA1 Message Date
Jooyung Han 7e00c13d0e Merge "apex: file_contexts for override_apex flattened" into rvc-dev am: d5c7ad63ec
Change-Id: I75cd5ce07f79f1ea4cee8791ed8cf3c9ddd22c0d
2020-04-28 03:19:19 +00:00
Jooyung Han d5c7ad63ec Merge "apex: file_contexts for override_apex flattened" into rvc-dev 2020-04-28 03:03:26 +00:00
Jiyong Park f6645305fb [automerger skipped] Merge "mark platform un-availability" into rvc-dev am: 28cb10ea68 -s ours
am skip reason: Change-Id Ia304cc5f41f173229e8a154e90cea4dce46dcebe with SHA-1 89e850ab84 is in history

Change-Id: I673236256225fed1a93e1f4ecc317144ce227f7e
2020-04-28 02:48:18 +00:00
Robert Shih 5d878b8369 Merge "Removing filter to allow widevine fuzzers addition" am: 4a748c99f0 am: 870e1e02c6
Change-Id: I747361b6c842dc63ee579727bb59698619fd6dff
2020-04-28 02:30:24 +00:00
Jiyong Park 28cb10ea68 Merge "mark platform un-availability" into rvc-dev 2020-04-28 02:29:55 +00:00
Robert Shih 870e1e02c6 Merge "Removing filter to allow widevine fuzzers addition" am: 4a748c99f0
Change-Id: I16fd1a566258db6ac784430d71f4bc465ccc36d3
2020-04-28 02:08:00 +00:00
Jaewoong Jung 85ad968694 [automerger skipped] Merge "Add overrides to runtime_resource_overlay" am: bf5ed2d676 am: 486c709759 -s ours
am skip reason: Change-Id Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0 with SHA-1 bfc6ac0096 is in history

Change-Id: I5dd5fb0a7545625f9ece26dbef7a116568842676
2020-04-28 02:01:59 +00:00
Robert Shih 4a748c99f0 Merge "Removing filter to allow widevine fuzzers addition" 2020-04-28 01:49:48 +00:00
Jaewoong Jung 486c709759 Merge "Add overrides to runtime_resource_overlay" am: bf5ed2d676
Change-Id: I028ea1a720c9beeae745d34dcb3abdbcb4bf2494
2020-04-28 01:42:26 +00:00
Jaewoong Jung bf5ed2d676 Merge "Add overrides to runtime_resource_overlay" 2020-04-28 01:19:50 +00:00
Jiyong Park 6a9ddc37a9 mark platform un-availability
A module is marked unavailable for platform when 1) it does not have
"//apex_available:platform" in its apex_available property, or 2)
it depends on another module that is unavailable for platform.

In that case, LOCAL_NOT_AVAILABLE_FOR_PLATFORM is set to true for the
module in the Make world. Later, that flag is used to ensure that there
is no module with the flag is installed to the device.

The reason why this isn't entirely done in Soong is because Soong
doesn't know if a module will be installed to the device or not. To
explain this, let's have an example.

cc_test { name: "mytest", static_libs: ["libfoo"]}
cc_library_static { name: "libfoo", static_libs: ["libbar"]}
cc_library { name: "libbar", apex_available: ["com.android.xxx"]}

Here, libbar is not available for platform, but is used by libfoo which
is available for platform (apex_available defaults to
"//apex_available:platform"). libfoo is again depended on by mytest
which again is available for platform. The use of libbar should be
allowed in the context of test; we don't want to make libbar available
to platform just for the dependency from test because it will allow
non-test uses of the library as well.

Soong by itself can't tell whether libfoo and libbar are used only in the
context of a test. There could be another module depending them, e.g.,

cc_library_shared { name: "mylib", static_libs: ["libfoo"] }

can exist and it might be installed to the device, in which case
we really should trigger an error.

Since Make has the knowledge of what's installed and what's not,
the check should be done there.

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

Bug: 153073816
Test: m
Test: remove "//apex_available:platform" from libmdnssd (it is currently
installed to /system/lib), and check that `m system_image` fails

Merged-In: Ia304cc5f41f173229e8a154e90cea4dce46dcebe
(cherry picked from commit 89e850ab84)
Change-Id: Ia304cc5f41f173229e8a154e90cea4dce46dcebe
2020-04-28 09:27:24 +09:00
TreeHugger Robot 908532dd69 [automerger skipped] Merge "Remove libopus from apex_available whitelist" into rvc-dev am: ba505df1c4 -s ours
am skip reason: Change-Id I4cff3ebb7e017a1fb629b18b72238acf3df0d26e with SHA-1 47db5adb06 is in history

Change-Id: I0cb18b9b303295ba507f7bbd451549d51585693c
2020-04-28 00:09:43 +00:00
TreeHugger Robot ba505df1c4 Merge "Remove libopus from apex_available whitelist" into rvc-dev 2020-04-27 23:54:39 +00:00
Jaewoong Jung ad0177b1fb Add overrides to runtime_resource_overlay
(This is a cherry-pick change.)

Bug: 154928457
Test: app_test.go
Change-Id: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0
Merged-In: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0
2020-04-27 16:44:33 -07:00
Makoto Onuki 7f7c886fbc [automerger skipped] Don't use metalava for "check-current" am: b52c8eafaa -s ours
am skip reason: Change-Id I47b146c6fe4caa65775ecf5425ab09b57f43f839 with SHA-1 5405a737c3 is in history

Change-Id: I289a0f298b3f5122fb62b2a7234b8af375636ef0
2020-04-27 22:34:17 +00:00
Bill Peckham 83b6e371e6 Merge "Propagate Soong header_libs to module-info.json" am: 6c2962e458 am: 2a8937968f
Change-Id: Ieaaf421db6119753252ea8f89bc530120522ecbd
2020-04-27 21:32:58 +00:00
Bill Peckham 2a8937968f Merge "Propagate Soong header_libs to module-info.json" am: 6c2962e458
Change-Id: I75f20832c5f39899aa9a51dd42f336cbe829be73
2020-04-27 21:16:39 +00:00
Bill Peckham 6c2962e458 Merge "Propagate Soong header_libs to module-info.json" 2020-04-27 20:59:48 +00:00
Hamzeh Zawawy 0540ae78b9 Removing filter to allow widevine fuzzers addition
Bug: 150900870
Test: make haiku ran locally include widevine fuzzer after change
Change-Id: I0942a3d61674a90e99792141567bd6ce35dfee2e
2020-04-27 19:58:04 +00:00
Treehugger Robot 449d81cdf6 Merge "Add support for remotely executing header-abi-dumper actions." am: 867dfd52f5 am: 7cb58ab378
Change-Id: I118593627936a3f0192c471457c5f77b75c56d03
2020-04-27 19:47:00 +00:00
Treehugger Robot 7cb58ab378 Merge "Add support for remotely executing header-abi-dumper actions." am: 867dfd52f5
Change-Id: I4197621918965243c123688a5fde41ec731485a1
2020-04-27 19:29:29 +00:00
Treehugger Robot 867dfd52f5 Merge "Add support for remotely executing header-abi-dumper actions." 2020-04-27 19:16:41 +00:00
Makoto Onuki b52c8eafaa Don't use metalava for "check-current"
Because we already generate the latest current.txt and removed.txt
during the "main" metalava invocation (i.e. stub generation),
we don't have to use metalava for current API check.

Just use diff instead.

Bug: 151160048

Test: Remove @hide from Intent.EXTRA_INSTALL_RESULT, and do `m out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/check_current_api.timestamp`.
Result is:
```
FAILED: out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/check_current_api.timestamp
( true && diff -u -F '{ *$' frameworks/base/api/current.txt out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api-stubs-docs_api.txt && diff -u -F '{ *$' frameworks/base/api/removed.txt out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api-stubs-docs_removed.txt && touch out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/check_current_api.timestamp ) || ( echo -e "\n******************************\nYou have tried to change the API from what has been previously approved.\n\nTo make these errors go away, you have two choices:\n   1. You can add '@hide' javadoc comments (and remove @SystemApi/@TestApi/etc)\n      to the new methods, etc. shown in the above diff.\n\n   2. You can update current.txt and/or removed.txt by executing the following command:\n         make api-stubs-docs-update-current-api\n\n      To submit the revised current.txt to the main Android repository,\n      you will need approval.\n******************************\n" ; exit 38 )

Change-Id: Ib391ca2afb296b5c5174d755c7ffb66d3fa5810c

--- frameworks/base/api/current.txt     2020-04-16 17:50:21.911899599 -0700
+++ out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api-stubs-docs_api.txt       2020-04-16 17:51:35.211792638 -0700
@@ -10415,6 +10415,7 @@ public class Intent implements java.lang
     field public static final String EXTRA_INDEX = "android.intent.extra.INDEX";
     field public static final String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
     field public static final String EXTRA_INSTALLER_PACKAGE_NAME = "android.intent.extra.INSTALLER_PACKAGE_NAME";
+    field public static final String EXTRA_INSTALL_RESULT = "android.intent.extra.INSTALL_RESULT";
     field public static final String EXTRA_INTENT = "android.intent.extra.INTENT";
     field public static final String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT";
     field public static final String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY";

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1. You can add '@hide' javadoc comments (and remove @SystemApi/@TestApi/etc)
      to the new methods, etc. shown in the above diff.

   2. You can update current.txt and/or removed.txt by executing the following command:
         make api-stubs-docs-update-current-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************

ninja: build stopped: subcommand failed.
```

Test: Remove @removed and @SystemApi from Intent.ACTION_MASTER_CLEAR, and do `m out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/check_current_api.timestamp`
Result is:
```
( true && diff -u -F '{ *$' frameworks/base/api/system-current.txt out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs_api.txt && diff -u -F '{ *$' frameworks/base/api/system-removed.txt out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs_removed.txt && touch out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/check_current_api.timestamp ) || ( echo -e "\n******************************\nYou have tried to change the API from what has been previously approved.\n\nTo make these errors go away, you have two choices:\n   1. You can add '@hide' javadoc comments (and remove @SystemApi/@TestApi/etc)\n      to the new methods, etc. shown in the above diff.\n\n   2. You can update current.txt and/or removed.txt by executing the following command:\n         make system-api-stubs-docs-update-current-api\n\n      To submit the revised current.txt to the main Android repository,\n      you will need approval.\n******************************\n" ; exit 38 )
--- frameworks/base/api/system-removed.txt      2020-04-16 17:50:21.911899599 -0700
+++ out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs_removed.txt     2020-04-16 17:53:45.319602905 -0700
@@ -55,7 +55,6 @@ package android.content {

   public class Intent implements java.lang.Cloneable android.os.Parcelable {
     field @Deprecated public static final String ACTION_DEVICE_INITIALIZATION_WIZARD = "android.intent.action.DEVICE_INITIALIZATION_WIZARD";
-    field @Deprecated public static final String ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR";
     field @Deprecated public static final String ACTION_SERVICE_STATE = "android.intent.action.SERVICE_STATE";
     field @Deprecated public static final String EXTRA_CDMA_DEFAULT_ROAMING_INDICATOR = "cdmaDefaultRoamingIndicator";
     field @Deprecated public static final String EXTRA_CDMA_ROAMING_INDICATOR = "cdmaRoamingIndicator";

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1. You can add '@hide' javadoc comments (and remove @SystemApi/@TestApi/etc)
      to the new methods, etc. shown in the above diff.

   2. You can update current.txt and/or removed.txt by executing the following command:
         make system-api-stubs-docs-update-current-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************
```

Test: Add `baseline_file` to `check_api.current` and run `m`
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: frameworks/base/StubLibraries.bp:86:1: module "api-stubs-docs" variant "android_common": current API check can't have a baseline file. (module %s): api-stubs-docs
ninja: build stopped: subcommand failed.

Test: With the above changes, run "m api-stubs-docs-update-current-api system-api-stubs-docs-update-current-api", make sure the API files got updated, and then run "m"
Merged-in: I47b146c6fe4caa65775ecf5425ab09b57f43f839
Change-Id: I3045bd8dc95d5f70893729ed65426d8cfc88c5ec
2020-04-27 12:13:35 -07:00
Makoto Onuki a9fdacf11f Merge "Don't use metalava for "check-current"" am: ef720013ef am: cc8529716e
Change-Id: I6d21126a097c332cceeb84abce1676ebf07f097a
2020-04-27 18:56:25 +00:00
Treehugger Robot dc51d91470 Merge "Do not allow updatable apps without min_sdk_version." am: 8df4e08e53 am: 0468ffaa45
Change-Id: I70869f20c15380e1e6d5d037d9a01b62bc5b6302
2020-04-27 18:56:18 +00:00
Makoto Onuki cc8529716e Merge "Don't use metalava for "check-current"" am: ef720013ef
Change-Id: Ice4e2ff268a10fc8a7b8ffae557ead4f3d85e33c
2020-04-27 18:45:51 +00:00
Jaewoong Jung f606cc97dc Merge "Add defaults support to runtime_resource_overlay." into rvc-dev am: e3643da744
Change-Id: I6ccea172878755e4ce2edcb8e1d26edaf6d71190
2020-04-27 18:39:23 +00:00
Makoto Onuki ef720013ef Merge "Don't use metalava for "check-current"" 2020-04-27 18:39:07 +00:00
Treehugger Robot 0468ffaa45 Merge "Do not allow updatable apps without min_sdk_version." am: 8df4e08e53
Change-Id: Iaae32bc804026cb60541e46f5d228d31a4e70c90
2020-04-27 18:33:28 +00:00
Bill Peckham a46de70775 Propagate Soong header_libs to module-info.json
Adding the Soong header_libs dependencies to
module-info.json allows tools to more accurately detect
all module-level dependencies. This change adds
LOCAL_HEADER_LIBRARIES, populated from header_libs, to
the Soong's Android.mk prebulit module definition so
that it will propagate through the prebuilt into
base_rules.mk and eventually to module-info.json.

Bug: 151755703
Test: Find header_libs deps in module-info.json
Change-Id: Ic7134d33fa71822aae548ca097851dc0c1371bad
2020-04-27 18:28:26 +00:00
Jaewoong Jung e3643da744 Merge "Add defaults support to runtime_resource_overlay." into rvc-dev 2020-04-27 18:27:11 +00:00
Treehugger Robot 8df4e08e53 Merge "Do not allow updatable apps without min_sdk_version." 2020-04-27 18:20:10 +00:00
Artur Satayev f40fc858a2 Do not allow updatable apps without min_sdk_version.
All updatable modules are expected to declare their earliest platform
version they support.

Bug: 153539598
Test: m
Change-Id: I6243d276e5ab25a1007187ad34789ca1b4cc87bf
2020-04-27 16:26:31 +01:00
Ramy Medhat 31ec942ff7 Add support for remotely executing header-abi-dumper actions.
Test: built with and without RBE_ABI_DUMPER set.
Change-Id: Ie752c07325453076d191813eaa50da03e3a0c2d8
2020-04-27 08:13:42 -07:00
Jooyung Han c048d3870e [automerger skipped] enforce updatable apexes to set min_sdk_version am: ced674e0e2 -s ours
am skip reason: Change-Id I8192086eb89fa958dd8ff1b731e43e24bf217ce2 with SHA-1 548640b55f is in history

Change-Id: Ie9e4158c51e094368d9eabd92c6520e794343ea6
2020-04-27 13:50:51 +00:00
Jooyung Han 6bfc04369b apex: file_contexts for override_apex flattened
Make-var APEX_FILE_CONTEXTS_INFOS should contain entries for
override_apex modules. Otherwise flattened override_apex modules can't
be correctly labeled.

Bug: 154031888
Test: lunch gsi_gms_arm64-userdebug
      m file_contexts.bin
      check ../file_contexts.bin_intermediates/file_contexts.concat.tmp
      if it contains entries for override_apex
Change-Id: I60fc3da1def0f5fe14cfeef32a4c2a07a65b056e
2020-04-27 22:18:19 +09:00
Treehugger Robot 8ffac4e19d Merge "mark platform un-availability" am: 01db260858 am: 547c6087df
Change-Id: Ida786db81d3bd1db40cfc28b6f3a013425781345
2020-04-27 13:03:05 +00:00
Treehugger Robot 547c6087df Merge "mark platform un-availability" am: 01db260858
Change-Id: I72eb614cfc7b4dee95697b69d0e0d4cdccce54a1
2020-04-27 12:51:47 +00:00
Treehugger Robot 01db260858 Merge "mark platform un-availability" 2020-04-27 12:37:45 +00:00
Jooyung Han ced674e0e2 enforce updatable apexes to set min_sdk_version
updatable APEXes should set min_sdk_version as well.

Bug: 152655956
Test: m
Merged-In: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
Change-Id: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
(cherry picked from commit 548640b55f)
2020-04-27 19:44:06 +09:00
Treehugger Robot 35d20b1a4f Merge "enforce updatable apexes to set min_sdk_version" am: 4783297585 am: 09ae364a54
Change-Id: I2b2ce7dfb1dfc9cf498a7ed26a158a61548016c0
2020-04-27 10:20:32 +00:00
Treehugger Robot 09ae364a54 Merge "enforce updatable apexes to set min_sdk_version" am: 4783297585
Change-Id: I45112b8d0d4c3b0d51ec41c604559d82913a8cdd
2020-04-27 10:07:57 +00:00
Treehugger Robot 4783297585 Merge "enforce updatable apexes to set min_sdk_version" 2020-04-27 09:56:32 +00:00
Jooyung Han 8c3b035045 Remove libopus from apex_available whitelist
libopus sets its own apex_available property.

Bug: 150999716
Test: m
Merged-In: I4cff3ebb7e017a1fb629b18b72238acf3df0d26e
Change-Id: I4cff3ebb7e017a1fb629b18b72238acf3df0d26e
(cherry picked from commit 47db5adb06)
2020-04-27 18:27:59 +09:00
Jooyung Han cd5b550fdf Merge "Revert "Apex: add NeverAllowRule for updatable"" into rvc-dev am: b6e5e512de
Change-Id: I17009a86082db0c606228df8ae7840d33186b8fa
2020-04-27 07:44:43 +00:00
Jooyung Han 548640b55f enforce updatable apexes to set min_sdk_version
updatable APEXes should set min_sdk_version as well.

Bug: 152655956
Test: m
Change-Id: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
2020-04-27 16:33:37 +09:00
Jooyung Han b6e5e512de Merge "Revert "Apex: add NeverAllowRule for updatable"" into rvc-dev 2020-04-27 07:30:27 +00:00
Jooyung Han cf75798d8f Revert "Apex: add NeverAllowRule for updatable"
This reverts commit e17caa63a6.

Reason for revert: rewrite this in ag/11250335 without neverallow

Bug: 152655956
Change-Id: I24436720056ac1b9878e37c2ee45c5806714f3e9
2020-04-27 07:30:10 +00:00
Hsin-Yi Chen d3185fa6b3 Merge "Add check_all_apis option for header ABI checker" am: 9105fa385a am: 4c01c57674
Change-Id: I19305d8977e334a8077b5d0ef4ab87a86a9f5db3
2020-04-27 04:09:15 +00:00
Hsin-Yi Chen 4c01c57674 Merge "Add check_all_apis option for header ABI checker" am: 9105fa385a
Change-Id: I1f854ad5f30c2f1f2d01e5bed6a83945eff05f7a
2020-04-27 03:56:57 +00:00