Skip to content
Snippets Groups Projects
  1. May 21, 2024
  2. May 15, 2024
  3. May 07, 2024
    • Ryan Prichard's avatar
      aapt2: fix dangling reference to diag · cbcff740
      Ryan Prichard authored
      The lambdas that ManifestFixer::BuildRules attach to XmlActionExecutor
      outlive ManifestFixer::BuildRules, so they need to capture diag
      by-value instead of by-reference.
      
      Bug: 339119172
      Test: aapt2_tests
      Change-Id: I6b9b6a8733875247a5be12111413b45b99727e1f
      cbcff740
  4. Apr 29, 2024
    • Mark Punzalan's avatar
      [aapt2] Add --non-updatable-system flag · cc694e55
      Mark Punzalan authored
      This adds `updatableSystem="false"` to the root <manifest> tag if no
      versionCode is specified (either explicitly or through --version-code).
      This attribute makes the APK not updatable (see b/266131956).
      
      Bug: 328302305
      Test: atest aapt2_tests
      Test: Manually ran `aapt2 link --non-updatable-system` and verified the
      resulting APK.
      
      Change-Id: I51cdbcdac7c03de10aac9bc22f5081e12fa142ab
      cc694e55
  5. Apr 26, 2024
    • Dario Freni's avatar
      Remove aapt2_results. · f4d8b9c2
      Dario Freni authored
      This rule was introduced in 2017 as a way to run unit tests in a continuous build target. We have better ways to achieve the same today.
      
      Bug: 337281646
      Bug: 332609042
      Test: presubmit
      Change-Id: Iba9934f39df2ebb883ded941d438b3528b3f29c2
      f4d8b9c2
    • Dario Freni's avatar
      Fix typo in aapt2_results genrule. · 3577d5d0
      Dario Freni authored
      Test: presubmit
      Change-Id: Ie32c7af67c17e4ffee8d5ce1fc74aa184925b755
      3577d5d0
  6. Apr 24, 2024
    • Jeff DeCew's avatar
      Support new generated CustomFeatureFlags · c2556685
      Jeff DeCew authored
      * Broaden jarjar Flags rules for NFC.  Note that this brings the NFC rules in line with other packages
      * Opt classes named CustomFeatureFlags into Ravenwood
      
      Flag: none
      Bug: 336768870
      Test: presubmit
      Change-Id: Ib1e76ebd04915554f464ec9a3d101b07925e18be
      c2556685
  7. Apr 18, 2024
    • Kean Mariotti's avatar
      Avoid outer/inner class name clashes · 804f0134
      Kean Mariotti authored
      In some cases, protoc-gen-javastream could emit outer classes
      and inner classes with the same name, which is invalid java.
      
      This commit extends protoc-gen-javastream to append an "OuterClass"
      suffix, if the outer class name clashes with any message.
      This behavior is consistent with the standard protoc.
      
      Bug: 276433199
      Test: presubmit
      Change-Id: I4e92d70c10c4d92d103b00f15b159acc08dffff2
      804f0134
    • Kean Mariotti's avatar
      Emit extension fields · 2163c8ae
      Kean Mariotti authored
      Extend protoc-gen-javastream to emit a message's extension fields
      (in addition to the current enums, nested types and regular fields).
      
      Bug: 276433199
      Test: presubmit
      Change-Id: Ibf25ff58796abcd59aa242bdf4295ba3ff2baf67
      2163c8ae
    • Kean Mariotti's avatar
      cleanup messages allow list · 18a165ea
      Kean Mariotti authored
      - Pass around container by reference instead of value
        (avoid unneeded deep-copies)
      - Use std::unordered_set instead of std::set (no need to be sorted)
      - Rename variable "messages_to_compile" to "messages_allowlist"
        to reduce confusion with other message lists in the code
      - Remove raw pointer
      
      Bug: 321668269
      Test: presubmit
      Change-Id: I43eaf5c1db3d15b066a95f34373211aadf6417b4
      18a165ea
  8. Mar 08, 2024
    • Sorin Basca's avatar
      Update the golden image after building with JDK 21 · 833fa691
      Sorin Basca authored
      This was generated by running:
      
      m droid && $ANDROID_BUILD_TOP/frameworks/base/tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh -u
      
      Bug: 313924276
      Fixes: 328674570
      Test: TH
      Merged-In: Ia238ca246c4607984beaaa229ec21f2181f6f6a8
      Change-Id: Ia238ca246c4607984beaaa229ec21f2181f6f6a8
      833fa691
  9. Mar 05, 2024
    • Pablo Gamito's avatar
      Add option to only compile certain Proto messages · 6ca20ea9
      Pablo Gamito authored
      Used to save space in the framework.jar which isn't r8 optimized to
      remove unused constants.
      
      Bug: 321668269
      Test: abtd running v2/android-crystalball-eng/health/microbench/bootup/idle/aosp/system-processes-memory and checking pinner_system_/system/framework/framework.jar_bytes metric value
      Change-Id: I32d16f80364e3446799498318e40844bc8adfc5a
      6ca20ea9
  10. Feb 28, 2024
  11. Feb 14, 2024
    • Dan Willemsen's avatar
      Set static timestamps in protologtool output · d0473319
      Dan Willemsen authored
      When build outputs are deterministic, that helps improve the RBE cache
      hit rate.
      
      Bug: 325124724
      Test: m out/soong/.intermediates/frameworks/base/libs/WindowManager/Shell/wm_shell_protolog_src/6c826b466f2421b82c3ec7d86f8481e7/gen/wm_shell_protolog.srcjar; zipinfo $!
      Change-Id: I838eb379531ae5434d576828e6be43663122187b
      d0473319
  12. Feb 12, 2024
  13. Feb 05, 2024
  14. Feb 02, 2024
    • Nelson Li's avatar
      Adding dist for aapt2_results · ffe60238
      Nelson Li authored
      In the previous transition to Android.bp change(aosp/2935114), the
      $(call dist-for-goals,aapt2_run_host_unit_tests, ...) was overlooked.
      This change added `dist` for `aapt2_results` to fix this issue.
      
      Bug: 322285259
      Test: m -j aapt2_run_host_unit_tests dist;
            Then, check ./out/dist/gtest/aapt2_host_unit_tests_result_x86.xml
            and ./out/dist/gtest/aapt2_host_unit_tests_result_x86_64.xml
      Change-Id: Ieaa67fef4a47b08fd97f3dc1810f4cd1933f155d
      ffe60238
  15. Feb 01, 2024
  16. Jan 30, 2024
    • Nelson Li's avatar
      Convert `aapt2_run_host_unit_tests` to Android.bp · 08b87e4c
      Nelson Li authored
      The handling of `declare-1p-target` will be deferred for future
      processing.
      
      Bug: 322285259
      Test: m aapt2_results
      Test: m aapt2_run_host_unit_tests
      Test: m -j out/host/linux-x86/gen/META/lic_intermediates/./out/soong/.intermediates/frameworks/base/tools/aapt2/aapt2_results.meta_lic
      Change-Id: I65ff18c9f4b490726011a490ba9045bf2078068e
      08b87e4c
  17. Jan 25, 2024
    • Mark Punzalan's avatar
      [aapt2] Always generate code for permissions · 12dc2b8a
      Mark Punzalan authored
      We will generate the String constant in Manifest.java for a permission
      or permission group even if it is removed via feature flag. This is so
      that code referencing the string will still compile.
      
      Bug: 297373084
      Bug: 318014882
      Test: atest aapt2_tests
      Test: Modified framework-res to build with SDK version 34 and forced
      removal of a permission with a disabled feature flag. The entire
      Android source could still be built even if the framework-res.apk no
      longer had the removed permission in the manifest.
      
      Change-Id: I982a8988e35e09e73bcbe065f0d7cf47c2907d54
      12dc2b8a
  18. Jan 11, 2024
    • Nelson Li's avatar
      Remove unused Android.mk in NamespaceTest · a276b963
      Nelson Li authored
      After checking, the modules under these directories can not be built
      because the upper-level directories lack Android.mk.
      Even if these Android.mk are included, they cannot be tested correctly
      with atest.
      
      Bug: 319568429
      Test: N/A
      Change-Id: I797d2327e340fcd38cde03dd0f520ec756be5fc3
      a276b963
    • Nelson Li's avatar
      Remove unused Android.mk in MergeOnlyTest · a8bb9e40
      Nelson Li authored
      After checking, the modules under these directories can not be built
      because the upper-level directories lack Android.mk.
      In addition, the format of the Android.mk in these directories is also
      incorrect, and if it is included, it will cause the build to break.
      
      Bug: 319565408
      Test: N/A
      Change-Id: I1a7b2fc2ad78bcbcd6cd3f65c0a5043656711dae
      a8bb9e40
  19. Jan 10, 2024
    • Mark Punzalan's avatar
      [aapt2] Allow multi-line argument files · 8c4d4ea3
      Mark Punzalan authored
      Previously, aapt2 would read arguments from files but they all have to
      be in one line, separated by spaces. Now they can be spread over
      multiple lines in the file.
      
      Bug: 297373084
      Bug: 315329624
      Test: Called `aapt2 link ... --feature_flags @args.txt` with args.txt
      containing flag values over multiple lines. Verified the resulting APK
      has the expected output.
      
      Change-Id: I91be6c7a869f63eafd88c04de69401d248f05545
      8c4d4ea3
  20. Jan 05, 2024
    • Mark Punzalan's avatar
      [aapt2] Use FeatureFlagsFilter in link command · 4b564ded
      Mark Punzalan authored
      The behavior of the filter depends on the minSdkVersion. If > UDC,
      manifest elements will be untouched. Otherwise, they will be removed
      depending on the value of the flag in the `android:featureFlag`
      attribute.
      
      Bug: 297373084
      Test: atest aapt2_tests
      Change-Id: Ib07c45752a4cc00bfdae7fedc745ce267ec7082a
      4b564ded
  21. Dec 15, 2023
    • Tor Norbye's avatar
      Update EnforcePermissionFix to set fix name · 9bb21bc2
      Tor Norbye authored
      Lint now forces you to explicitly set an explicit
      display name for composite quick fixes (it used to
      just default to the nested quickfix' display name,
      but this is sometimes misleading so now lint checks
      need to explicitly do this.)
      
      Test: SimpleManualPermissionEnforcementDetectorTest.kt
      Bug: Not filed
      Change-Id: Ie46d32833efc7bd9f7051acf6b45327d4fda7927
      9bb21bc2
  22. Dec 12, 2023
    • Jeff Sharkey's avatar
      Support "probing" ignored tests; more Parcel impl. · 06e55aba
      Jeff Sharkey authored
      As test authors onboard their bivalent tests, they'll be using the
      `@IgnoreUnderRavenwood` annotation to quietly ignore tests that
      don't currently have enough Ravenwood support to run.
      
      However, over time the Ravenwood environment will continue to
      gain new functionality, and we'd like an easy way to "probe" those
      previously-ignored tests to see if any of them started passing.
      
      This change implements this using a locally-configured flag
      that unconditionally runs all tests under Ravenwood, and reports
      failures for any tests marked as `@IgnoreUnderRavenwood` that
      are now passing.  (As these "failures" might be confusing for normal
      test authors, we leave it disabled by default in the build, and
      leave it for internal Ravenwood maintainers.)
      
      To confirm this works, implement two new methods on Parcel, and
      detect the relevant tests that started passing.
      
      Bug: 292141694
      Test: atest CtsUtilTestCasesRavenwood CtsUtilTestCases
      Change-Id: Ied2a5e3d1781c76a4f3506192d015309f2f424b2
      06e55aba
  23. Dec 11, 2023
    • Cole Faust's avatar
      Add compile_data to AaptSymlinkTest · f30995fa
      Cole Faust authored
      A change is being made to how sandboxed actions work,
      and now the targets of symlinks need to be listed in
      the Android.bp file. Add them to compile_data.
      
      Bug: 307824623
      Test: m out/soong/.intermediates/frameworks/base/tools/aapt2/integration-tests/SymlinkTest/AaptSymlinkTest/android_common/lint/lint-baseline.xml
      Change-Id: I304a1e98045ba6ff19dc8052b2187d53c29e02bc
      f30995fa
    • Colin Cross's avatar
      Disable use_resource_processor for aapt2 integration tests · 1894f3ff
      Colin Cross authored
      These tests are testing aapt2 outputs and shouldn't use
      ResourceProcessorBusyBox.
      
      Bug: 294256649
      Test: m javac-check
      Change-Id: I28f093d697448131968ed4c4c32e31b9a8fb3036
      Merged-In: I28f093d697448131968ed4c4c32e31b9a8fb3036
      1894f3ff
    • Dmitri Plotnikov's avatar
      Migrate several PowerStats tests to Ravenwood · 6d288fe1
      Dmitri Plotnikov authored
      Bug: 314797745
      Test: atest PowerStatsTestsRavenwood
      Test: atest PowerStatsTests
      
      Change-Id: I4af6e9c532285dc935f6d2156cc9cb3531d9aeaa
      6d288fe1
  24. Dec 08, 2023
  25. Dec 07, 2023
    • Jeff Sharkey's avatar
      Ravenwood support for feature flags. · 9ac0521c
      Jeff Sharkey authored
      Since feature flags are becoming an important part of development
      work, ensure that Ravenwood tests can use existing tools such as
      `SetFlagsRule` to populate values for code-under-test to consume.
      
      To enable this, we extend `AndroidHeuristicsFilter` to recognize
      feature flags generated code, and include that in the Ravenwood
      environment by default.
      
      Bug: 311370221
      Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests
      Change-Id: I526af65f816d153cb6e365cf6810a5a304d3e6a6
      9ac0521c
  26. Dec 05, 2023
    • Jeff Sharkey's avatar
      Support more internal utils under Ravenwood. · 256d9070
      Jeff Sharkey authored
      Tests for these internal utils are local within the frameworks/base/
      repo, instead of in CTS.
      
      To help future-proof, bring the entire utils/* test directory by
      default into the Ravenwood suites, and give developers the way to
      easily opt-out with @IgnoreUnderRavenwood at the class level.
      
      Bug: 292141694
      Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests
      Test: atest FrameworksUtilTestsRavenwood FrameworksUtilTests
      Change-Id: I5251dca752396faa77774659d0923d8cdb719830
      256d9070
    • Yi Kong's avatar
      Fix -Wunused-variable compiler warning · d650788b
      Yi Kong authored
      frameworks/base/tools/aapt2/link/ManifestFixer.cpp:341:23: error: unused variable 'attr' [-Werror,-Wunused-variable]
        341 |   if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
            |                       ^~~~
      
      Test: presubmit
      Change-Id: Icec4737a5f8076173a2aff54532a79fa123df326
      d650788b
  27. Dec 04, 2023
  28. Dec 01, 2023
    • Makoto Onuki's avatar
      HostStubGen: Make sure substitution methods have right visibility · 6b19707b
      Makoto Onuki authored
      Bug: 292141694
      Test: ./scripts/run-all-tests.sh
      Change-Id: I9b1db65d9c0cdac1012637d60a3bc6c3bbe3f5d6
      6b19707b
    • Makoto Onuki's avatar
      Update TEST_MAPPING for ravenwood · ededd7e6
      Makoto Onuki authored
      Bug: 292141694
      Test: Tree hugger
      Change-Id: Ica5cfff6bc209376ab39f665d48f992c143c49a2
      ededd7e6
    • Makoto Onuki's avatar
      HostStubGen: Inject more annotations in output jar · 0622dd1c
      Makoto Onuki authored
      Now we inject 5 annotations:
      HostStubGenKeptInImpl
      HostStubGenKeptInStub
      
      HostStubGenProcessedAsIgnore
      HostStubGenProcessedAsSubstitute
      HostStubGenProcessedAsThrow
      
      Bug: 311174191
      Test: ./scripts/run-all-tests.sh
      Change-Id: I9bf399bfdb789bc95be77fe51cd1579358e2dcee
      0622dd1c
    • Makoto Onuki's avatar
      HostStubGen: Fix direct outer class detection · 0e7dca65
      Makoto Onuki authored
      If there's a nested class like A$B$C and C doesn't have a class-wide
      policy, HSG was supposed to look at A$B's ("direct outer class") policy,
      but it was using A's policy. Fixed it.
      
      Bug: 311174191
      Test: ./scripts/run-all-tests.sh
      Test: atest --host CtsGraphicsTestCasesRavenwood \
          CtsTextTestCasesRavenwood \
          CtsOsTestCasesRavenwood \
          CtsAccountManagerTestCasesRavenwood \
          CtsContentTestCasesRavenwood \
          CtsProtoTestCasesRavenwood \
          CtsUtilTestCasesRavenwood \
          CtsDatabaseTestCasesRavenwood
      Change-Id: I4881caac5e91366cf60e1aa232ecaf6b7c88aecf
      0e7dca65
  29. Nov 30, 2023
Loading