Skip to content
Snippets Groups Projects
  1. May 21, 2024
    • Paul Duffin's avatar
      Provide complete API surfaces for *non-updatable compatibility checks · f75e9109
      Paul Duffin authored
      Previously, the non public `*api-stubs-docs-non-updatable` modules only
      provided a partial set of the previously released API against which
      compatibility checks were performed. This change provides a complete
      set of them.
      
      Bug: 316873097
      Test: m checkapi
            # Check the contents of system-*-non-updatable's
            # metalava_exportable.sbox.textproto to make sure it contains
            # system AND public, not just system APIs.
      Change-Id: Iba8ad79c264621ae0e0e4b261fc51dd50820061b
      f75e9109
  2. May 17, 2024
    • Paul Duffin's avatar
      Use full APIs for api_lint.new_since of *api-stubs-docs-non-updatable · 98bc011a
      Paul Duffin authored
      Previously, the `*api-stubs-docs-non-updatable` modules used either the
      full previously released public API or a delta for those API surfaces
      that extend another API surface. Just passing a delta meant that lint
      would not be able to properly ignore issues that already existed in
      previously released APIs.
      
      This change switches them to use the `*.api.combined.*.latest` modules
      which contains the full API for each surface, including the API
      provided by any API surface it extends. That ensures that lint will
      not report issues with previously released APIs.
      
      Bug: 341078916
      Test: m checkapi
            # Check that multiple --api-lint-previous-api options are passed
            # to metalava for system-api-stubs-docs-non-updatable
      Change-Id: I8a6d1263086466fda111266fe8bfdfedf0f8c152
      98bc011a
  3. May 03, 2024
    • Paul Duffin's avatar
      Build complete api-versions.xml files for module-lib/system-server · fb5e07d4
      Paul Duffin authored
      Previously, APIs from updatable modules and information about the SDK
      extensions was only included in `api_versions_public` and
      `api_versions_system`. This change adds the following two modules:
      * `api_versions_module_lib_complete`
      * `api_versions_system_server_complete`
      
      It did not change `api_versions_module_lib` or
      `api_versions_system_server` because Android Lint requires that they do
      not include information about APIs from updatable modules because
      otherwise it will report calls within a module as it has no way to
      determine whether a call crosses an API boundary or not.
      
      Bug: 336993217
      Test: TARGETS=$(for i in public system module-lib module-lib-complete system-server-complete; do U=$(echo $i | sed "s|-|_|g"); echo "out/target/common/obj/PACKAGING/api_versions_${U}_generated-api-versions.xml"; done)
            m $TARGETS; mkdir -p before; cp $TARGETS before
            m $TARGETS; mkdir -p after; cp $TARGETS after
            meld before after
            # Review differences.
      Change-Id: Ia542fbdc517fb223a0488f0e3f81b8727cb204e4
      fb5e07d4
  4. May 02, 2024
    • Paul Duffin's avatar
      Extract api_versions_defaults from api_versions_* modules · 0834ea7a
      Paul Duffin authored
      Splits the `api_versions_*` modules into two types:
      * Those that include the whole API surface including updatable modules
        and SDK extensions.
      * Those that do not include updatables modules or SDK extensions.
      
      Bug: 336993217
      Test: m nothing and TH
      Change-Id: Ic3d95832a30a7a5e7c4a09febd818b1aebbf17d0
      0834ea7a
  5. Apr 10, 2024
    • Yiming Pan's avatar
      APIs in a nested class can be flagged by outer class. · dd35c2f8
      Yiming Pan authored
      If a class is not an inner class, use its @FlaggedApi annotation value.
      Otherwise, use the flag value of the closest outer class that is annotated by
      @FlaggedApi.
      
      Bug: 331294167
      Test: atest extract-flagged-apis-test
      Change-Id: I9d40d3e7c5065a2a737d5420c4235445c6d16654
      dd35c2f8
    • Jihoon Kang's avatar
      Do not split struct properties based on soong_config_variables · 00f480e0
      Jihoon Kang authored
      https://r.android.com/3009280 has introduced the mechanism to modify the
      tag of the dist artifacts based on the soong_config_variable (i.e. based
      on the value of the build flag "RELEASE_HIDDEN_API_EXPORTABLE_STUBS" or
      the product variable "PRODUCT_HIDDEN_API_EXPORTABLE_STUBS"). In order to
      minimize duplication, the change has kept the common properties within
      the struct outside of the "soong_config_variables" block and only
      specified the affected (list of) struct properties (tag) in the
      "soong_config_variables" block.
      
      However, this is an unsupported feature in Soong and led to the default
      OutputFile (i.e. the output file when no tag is specified). In order to
      fix this, this change specifies all properties of the struct in the
      "soong_config_variables" block, with the cost of some duplication.
      
      Test: ABTD
      Bug: 333653043
      Change-Id: If91099b3499894d5b1c284ace0e1f23c80b84051
      00f480e0
  6. Apr 09, 2024
  7. Apr 02, 2024
    • Jihoon Kang's avatar
      Modify non updatable droidstubs dependency based on release flag · 2d295aea
      Jihoon Kang authored
      Currently, the api file generated by the non updatable droidstubs are
      copied to the dist directory regardless of the value of the
      RELEASE_HIDDEN_API_EXPORTABLE_STUBS release flag. However, to align with
      the other artifacts in the dist directory that respects the value of the
      flag, the artifact of the everything stubs should be copied to the dist
      directory when the flag value is not true, instead of the artifact of
      the exportable stubs.
      
      Test: m sdk dist && inspect the ninja dependency of out/dist/apistubs/android/test/api/android.txt
      Bug: 329683584
      Change-Id: I58b69893cf5e006691bf98465514f2320a5f7f55
      2d295aea
    • Yiming Pan's avatar
      Fix: some flagged APIs are not recorded. · 46491354
      Yiming Pan authored
      * The @FlaggedApi annotation can be used for classes. When a class is
        annotated but its APIs are not, they should be counted as flagged.
      * Class constructors are also APIs.
      
      Bug: 331294167
      Test: manual test `extract-flagged-apis <input> <output>`
      Change-Id: Ic6d25eb59faa381f033751557343ad85c1602e41
      46491354
  8. Mar 14, 2024
    • Matt Buckley's avatar
      Update HintManager to use NDK backend · 58977725
      Matt Buckley authored
      - Update HintManager and its aidl types to use NDK backend
      - Switch HintManager to using PowerHAL's WorkDuration
      - Update SDK WorkDuration.java to no longer be parcelable,
          since it isn't being sent over binders anymore.
      - Remove duplicate WorkDuration in powermanager in favor of PowerHAL's
      
      Bug: 315894228
      Test: atest HintManagerServiceTest
      Test: atest PerformanceHintNativeTestCases
      Test: atest PerformanceHintManagerTest
      Change-Id: Ibc5a3aa96e73a225fce980811694ee02bdabb963
      58977725
  9. Mar 06, 2024
    • Jihoon Kang's avatar
      Split android_non_updatable_stubs_libs · 13f59369
      Jihoon Kang authored
      This change moves the entries android-non-updatable-stubs-defaults.libs
      out of the module to an independent list, so that it can be utilized in
      both stubs_default module and a java_default module. Utilization of the
      java_default module will be done in a child change.
      
      Test: m nothing
      Bug: 327507877
      Merged-In: Ia8aec25c6c6a199f36a69062754f5b02b15fdb59
      Merged-In: I7ed37e1e1b3faa1f49bfb840833a5b7c207540cf
      Change-Id: I7ed37e1e1b3faa1f49bfb840833a5b7c207540cf
      13f59369
    • Jihoon Kang's avatar
      Split android_non_updatable_stubs_libs · e97d1125
      Jihoon Kang authored
      This change moves the entries android-non-updatable-stubs-defaults.libs
      out of the module to an independent list, so that it can be utilized in
      both stubs_default module and a java_default module. Utilization of the
      java_default module will be done in a child change.
      
      Test: m nothing
      Bug: 327507877
      Merged-In: Ia8aec25c6c6a199f36a69062754f5b02b15fdb59
      Change-Id: I7ed37e1e1b3faa1f49bfb840833a5b7c207540cf
      e97d1125
    • Jihoon Kang's avatar
      Split android_non_updatable_stubs_libs · 5b9160e9
      Jihoon Kang authored
      This change moves the entries android-non-updatable-stubs-defaults.libs
      out of the module to an independent list, so that it can be utilized in
      both stubs_default module and a java_default module. Utilization of the
      java_default module will be done in a child change.
      
      Test: m nothing
      Bug: 327507877
      Change-Id: Ia8aec25c6c6a199f36a69062754f5b02b15fdb59
      5b9160e9
  10. Feb 28, 2024
    • Jihoon Kang's avatar
      Specify `stubs_type` property in java_api_library modules · 0d639bf1
      Jihoon Kang authored
      With the effort to support non-"everything" stubs generation from api
      signature files, https://r.android.com/2977092 enforces all
      java_api_library modules to specify the `stubs_type` property. In order
      to accustom to this enforcement, this change specifies the `stubs_type`
      property as "everything" to all bp-defined "everything" stubs generating
      java_api_library modules.
      
      Test: m nothing --no-skip-soong-tests
      Bug: 319162970
      Change-Id: I0a21420b4aa9eccd1eeb2022f3c9c952f607a480
      0d639bf1
  11. Feb 15, 2024
    • Jihoon Kang's avatar
      Replace lists of aconfig modules with aconfig_declarations_group · 8ad50832
      Jihoon Kang authored
      Currently in AconfigFlags.bp, two list of aconfig modules are being
      maintained: the list of java_aconfig_library modules and the list of
      aconfig_declarations modules. When a new aconfig module is being added,
      a developer must modify the two lists, and there is no guarantee that
      the two lists are kept in sync. In order to resolve such issue, this
      change replaces the two lists with the newly introduced
      aconfig_declarations_group module.
      
      Test: m
      Bug: 320492079
      Merged-In: Ib32c06de4f0279a17e5c65314e984265592d004c
      Change-Id: Ib32c06de4f0279a17e5c65314e984265592d004c
      8ad50832
    • Jihoon Kang's avatar
      Replace lists of aconfig modules with aconfig_declarations_group · 25d562ef
      Jihoon Kang authored
      Currently in AconfigFlags.bp, two list of aconfig modules are being
      maintained: the list of java_aconfig_library modules and the list of
      aconfig_declarations modules. When a new aconfig module is being added,
      a developer must modify the two lists, and there is no guarantee that
      the two lists are kept in sync. In order to resolve such issue, this
      change replaces the two lists with the newly introduced
      aconfig_declarations_group module.
      
      Test: m
      Bug: 320492079
      Change-Id: Ib32c06de4f0279a17e5c65314e984265592d004c
      25d562ef
    • Jihoon Kang's avatar
      Replace lists of aconfig modules with aconfig_declarations_group · 59a129fd
      Jihoon Kang authored
      Currently in AconfigFlags.bp, two list of aconfig modules are being
      maintained: the list of java_aconfig_library modules and the list of
      aconfig_declarations modules. When a new aconfig module is being added,
      a developer must modify the two lists, and there is no guarantee that
      the two lists are kept in sync. In order to resolve such issue, this
      change replaces the two lists with the newly introduced
      aconfig_declarations_group module.
      
      Test: m
      Bug: 320492079
      Merged-In: Ib32c06de4f0279a17e5c65314e984265592d004c
      Change-Id: Ib32c06de4f0279a17e5c65314e984265592d004c
      59a129fd
  12. Feb 14, 2024
    • Jihoon Kang's avatar
      Set is_stubs_module for stubs modules · a7073b50
      Jihoon Kang authored
      This change sets is_stubs_module property to true for combined modules
      genreated in `combined_apis` and non-updatable stub modules, which are
      not generated via java_sdk_library but are maintained separately.
      
      Test: m nothing --no-skip-soong-tests
      Bug: 310504781
      Merged-In: I1293208e575a76db2cc4dc6c8564369804bb4ac5
      Change-Id: I1293208e575a76db2cc4dc6c8564369804bb4ac5
      a7073b50
  13. Feb 13, 2024
  14. Feb 12, 2024
    • Jihoon Kang's avatar
      Set is_stubs_module for stubs modules · daa3530b
      Jihoon Kang authored
      This change sets is_stubs_module property to true for combined modules
      genreated in `combined_apis` and non-updatable stub modules, which are
      not generated via java_sdk_library but are maintained separately.
      
      Test: m nothing --no-skip-soong-tests
      Bug: 310504781
      Change-Id: I1293208e575a76db2cc4dc6c8564369804bb4ac5
      daa3530b
    • Spandan Das's avatar
      Enforce bcp/sscp stubs do not compile against apps · 67b7906e
      Spandan Das authored
      This ensures that we do not run into circular depencies when
      UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true. When this variable
      is true, apps compile with a min_sdk_version equivalent to the sha of
      the apis (i.e. the java_genrule `api_fingerprint`). If the api stubs are
      allowed to depend on android apps, we will run into circular deps
      
      Implementation details
      1. Modify the deps mutator of combined_apis to add a dependency on the
         stub java modules
      2. Do a graph walk in GenerateAndroidBuildActions and ensure that no
         child is an android_app. This will be determined by casting to
      AndroidLibraryDependency.
      
      Re (2): this does a graph walk via ctx.WalkDeps, but should not be
      computationally intensive because
      (a) We do this for a single module (i.e. combined_apis)
      (b) The transitive closure is shallow since it starts from stubs
      
      Test: presubmits
      Test: locally, added an app to libs of `service-sdksandbox` and verified
      that the error is raised
      
      Bug: 315016205
      Change-Id: Iaf35f03171d13d75e75de6e0e744fcf34e3294fd
      67b7906e
  15. Feb 11, 2024
    • Nishant Panwar's avatar
      Add SDK library framework-pdf-v in MediaProvider · 81c51cf8
      Nishant Panwar authored
      SDK library for pdf related bootclasspath classes that were part of the non-updatable API before V, and were moved to the module in V. Other pdf related bootclasspath classes in mediaprovider should go to framework-pdf.
      
      Bug: b/324667310
      Test: presubmit and m
      Change-Id: I3f7469ac72052e7529e998179fe57db1a5b39c82
      81c51cf8
  16. Feb 07, 2024
    • Jihoon Kang's avatar
      Add merged txt filegroups that depend on the exportable non-updatable txt files · 31cf2747
      Jihoon Kang authored
      Currently, ther merged txt filegroups are dist'ed as api/*-current.txt
      and api/*-removed.txt files during droid dist build.
      
      This change adds additional merged txt filegroup modules
      that depend on the non-updatable exportable txt files instead of
      the checked in non-updatable txt files (under frameworks/base/core).
      
      These added modules will be dist'ed in droid build, instead of the
      currently existing merged txt filegroups.
      
      Test: m nothing && inspect ninja output
      Bug: 324254328
      Change-Id: Ib0b47ba032a2917d0f2df6ad585d2102d6940c50
      31cf2747
  17. Feb 06, 2024
    • Jihoon Kang's avatar
      Generate frameworks-base-api-current.srcjar from exportable stubs · f1f72ca1
      Jihoon Kang authored
      frameworks-base-api-current.srcjar is used to generate the stubs srcjar
      file in dist directory during the sdk builds. Given that the sdk build
      artifacts should depend on the exportable stubs instead of the
      everything stubs, the src of this module should also be replaced with
      the exportable stubs from the everything stubs.
      
      Given that the only usage of this module is the stubs srcjar generation
      during the sdk builds, the source of this module can be safely replaced
      with the exportable stubs instead of creating a new module.
      
      Test: patch in git_main, lunch aosp_arm-ap31-eng && m sdk dist and inspect ninja query to verify that android-stubs-src.jar does not depend on the everything stubs
      Bug: 323261972
      Change-Id: If37aa6ef862c69619768f91f2360b37459fd3cdb
      f1f72ca1
  18. Feb 02, 2024
    • Jihoon Kang's avatar
      Modify sdk-annotations-*.zip and android_*_stbs_current_with_test_libs defintions · 2a829bb5
      Jihoon Kang authored
      This change modifies the sdk-annotations-*.zip definitions so that the
      modules depend on the exportable annotations.zip files instead of the
      everything annotations.zip files.
      
      This change also modifies the definition of the
      android_*_stubs_current_with_test_libs modules definitions to depend on
      the exportable stubs.
      
      Likewise, the droiddoc modules now depend on the exportable stubs.
      
      Test: m docs dist && inspect ninja file to verify that everything stubs are not exported
      Test: m sdk dist && inspect api-versions.xml file and verify that the disabled apis are not included
      Bug: 323261972
      Change-Id: I015921f0d006bac29492be22b83043b39a8fe8eb
      2a829bb5
  19. Feb 01, 2024
  20. Jan 18, 2024
  21. Jan 17, 2024
    • Harshit Mahajan's avatar
      [CrashRecovery] Add module lib to Android SDK · 919593c8
      Harshit Mahajan authored
      Adding the module libraries to combined_apis for them to be added to
      Android SDK.
      Also adding bootclasspath-fragment to platform-bootclasspath.
      
      Bug: b/289203818
      Change-Id: If6789fee9a908231babd7624280b40515d377dfe
      Test: m
      919593c8
  22. Jan 16, 2024
    • Jihoon Kang's avatar
      Add aconfig declarations to f/b droidstubs · c537cba7
      Jihoon Kang authored
      This change pass the aconfig_declaration modules defined in
      AconfigFlags.bp to the *-api-stubs-docs-non-updatable droidstubs module,
      so that the "exportable" stubs (i.e. the stubs only containing the
      flagged apis that are enabled by the release configuration) can be
      generated.
      
      Test: m api-stubs-docs-non-updatable && m checkapi
      Bug: 317290555
      Merged-In: I944d336e474b9ed61f4554fc9325a8df3a9cf40b
      Change-Id: I944d336e474b9ed61f4554fc9325a8df3a9cf40b
      c537cba7
    • Jihoon Kang's avatar
      Add aconfig declarations to f/b droidstubs · 46c6fdd5
      Jihoon Kang authored
      This change pass the aconfig_declaration modules defined in
      AconfigFlags.bp to the *-api-stubs-docs-non-updatable droidstubs module,
      so that the "exportable" stubs (i.e. the stubs only containing the
      flagged apis that are enabled by the release configuration) can be
      generated.
      
      Test: m api-stubs-docs-non-updatable && m checkapi
      Bug: 317290555
      Change-Id: I944d336e474b9ed61f4554fc9325a8df3a9cf40b
      46c6fdd5
  23. Jan 12, 2024
    • Roshan Pius's avatar
      framework-nfc: Switch to "framework-module-defaults" · 96dac95f
      Roshan Pius authored
      Now that all the @hide usage of NFC API's from rest of platform is
      cleaned out, we can now switch to the module defaults and continue the
      separation of NFC API classes.
      
      Bug: 303286040
      Test: Compiles
      Merged-In: I8bd5e38b1482600594c41660d14537cf15b48318
      
      Change-Id: I8bd5e38b1482600594c41660d14537cf15b48318
      96dac95f
  24. Jan 11, 2024
    • Mårten Kongstad's avatar
      (Temporarily) hide Lint 101 errors · e2da2d62
      Mårten Kongstad authored
      When building SDKs that include some, but not all @FlaggedApis, a few
      Javadoc @see/@link references will point to objects that are
      inaccessible, which will trigger Lint 101 errors.
      
      The correct fix is to update the Javadoc. However, to unblock the SDK
      build for now, temporarily hide Lint 101 errors.
      
      Bug: 319541666
      Test: m sdk dist
      Change-Id: Icbd1d99d5fcd6cee37bf588ef45443e7e946f742
      e2da2d62
    • Jihoon Kang's avatar
      Define exportable full api surface stubs · 059b9493
      Jihoon Kang authored
      The two major roles of the full api surface stubs (i.e.
      android_*_stubs_current) are:
      - Appended to classpath when a module sets sdk_version
      - Input to generating hiddenapi flags and determine the accessibility of
        the api at runtime
      
      With Trunk Stable, all flagged apis that are not enabled should not be
      accessible at runtime. In other words, the currently existing full api
      surface stubs that include both non flagged and flagged apis should not
      be used to generate the hiddenapi flags.
      
      To resolve this problem, this change introduces full api surface stubs
      of the "exportable" stubs (i.e. non flagged apis + flagged apis enabled
      by release configuration).
      
      The new modules are named similarly to the currently existing full api
      surface stubs, but appends the "_exportable" prefix to differentiate
      with the currently existing modules. These modules are solely used for
      hiddenapi flags generation, and the currently existing modules continue
      to serve the first aforementioned role.
      
      The new modules will toggle between the from-text stubs module and the
      from-source stubs module when the exportable stubs can be generated from
      the from-text stubs generating `java_api_library` module. For now, these
      modules are always built from source.
      
      Test: m android_stubs_current_exportable
      Bug: 317426356
      Change-Id: I1f6f738ae9c5ebf151a1554aa1e357ef0092c89c
      059b9493
  25. Jan 10, 2024
    • Harshit Mahajan's avatar
      Add combined_api_defaults module type · b52adbcd
      Harshit Mahajan authored
      Allow specifying default combined api properties. This would be currently used to control the enablement of new mainline modules
      
      Bug:b/289203818
      Test: verified locally
      Change-Id: I9415140453ce04efd5461cb8684c70e987810ecc
      b52adbcd
    • Roshan Pius's avatar
      framework-nfc: Switch to "framework-module-defaults" · 05836fad
      Roshan Pius authored
      Now that all the @hide usage of NFC API's from rest of platform is
      cleaned out, we can now switch to the module defaults and continue the
      separation of NFC API classes.
      
      Bug: 303286040
      Test: Compiles
      Change-Id: I8bd5e38b1482600594c41660d14537cf15b48318
      05836fad
  26. Jan 08, 2024
    • Cole Faust's avatar
      Update path in comment · 24e730fc
      Cole Faust authored
      This android.bp file was moved, and the comment needs to be updated
      to reflect that.
      
      Test: Presubmits
      Change-Id: I225690505ccbf0f2234e65cbc668ade9bfbd5e17
      24e730fc
  27. Jan 05, 2024
    • Paul Duffin's avatar
      Copy system version of the api-versions.xml file to dist · 75f63607
      Paul Duffin authored
      Copies the system version of the `api-versions.xml` file to a file
      `api-versions_system.xml` in the top level dist directory.
      
      Bug: 190665366
      Test: m sdk dist
            # Check to make sure that the file exists.
      Change-Id: Ie139f81a819eb5f389363ffdefa7bc42d36804e0
      75f63607
  28. Jan 02, 2024
    • Nelson Li's avatar
      Convert .PHONY target of `checkapi ` to Android.bp · cb9a5dd7
      Nelson Li authored
      Since Soong has been able to correctly add dependencies to .PHONY
      targets since aosp/2884366, it is now possible to directly use
      `phony_deps` to add the genrules used by `checkapi` to its dependencies
      and convert them to Android.bp.
      
      Bug: 309730110
      Test: m checkapi
      Change-Id: Ideb9f647415423a5864d221b85442b995ac67906
      cb9a5dd7
  29. Dec 19, 2023
    • Paul Duffin's avatar
      Remove unnecessary --api-lint-ignore-prefix options · 48fefdd2
      Paul Duffin authored
      The `--api-lint-ignore-prefix` option adds a package prefix within
      which API lint checks will be ignored. However, the options are
      not actually necessary. That is because they are only used in the
      `android-non-updatable-stubs-defaults` and the non updatable code does
      not include any source classes from those packages.
      
      While modules that do use `android-non-updatable-stubs-defaults` do
      include classes from those packages on the classpath they are already
      excluded from having API lint checks performed on them as they do not
      contribute to the API surface being generated by those modules.
      
      Bug: 311690008
      Test: m checkapi
      Change-Id: Ife750c586edc2b5af92c0b5e9211b23345083f69
      48fefdd2
  30. Dec 14, 2023
    • Yiming Pan's avatar
      Rename to match internal storage format. · 990fd8dd
      Yiming Pan authored
      Bug: 312784289
      Test: mmm -j frameworks/base/api/coverage/tools/:extract-flagged-apis
            extract-flagged-apis <input api.text file> <output pb file>
      Change-Id: Ibc2e1af9c3346543365ce42058b6e5913161da9f
      990fd8dd
Loading